summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhvalera2022-05-28 15:13:17 +0300
committerkhvalera2022-05-28 15:13:17 +0300
commitc1055a2fd8a838b987543cd5e580d2a3cfee9f5c (patch)
treee2a4a2888fcb3f86617b97a463b35fe9e5bd5ba8
parent763e5e628adff6a8d91f5ac69c20eb527900d811 (diff)
downloadaur-c1055a2fd8a838b987543cd5e580d2a3cfee9f5c.tar.gz
Add python2-bareos and python-bareos
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD54
-rw-r--r--bareos-traymonitor.install9
3 files changed, 50 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a64131b9e9ae..09d9099819ba 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -286,6 +286,13 @@ pkgname = bareos-traymonitor
groups = bareos-client
depends = bareos-common=21.1.3
backup = etc/bareos/tray-monitor.d/monitor/bareos-mon.conf
- backup = etc/bareos/tray-monitor.d/client/file-daemon.conf
- backup = etc/bareos/tray-monitor.d/director/director.conf
- backup = etc/bareos/tray-monitor.d/storage/storage-daemon.conf
+
+pkgname = python2-bareos
+ pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - python-bareos is a Python2 module to access a backup system.
+ depends = python2
+ depends = jansson
+
+pkgname = python-bareos
+ pkgdesc = Bareos - Backup Archiving Recovery Open Sourced - python-bareos is a Python module to access a backup system.
+ depends = python
+ depends = jansson
diff --git a/PKGBUILD b/PKGBUILD
index f54575ee57a8..65a546705f2d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -37,11 +37,13 @@ pkgname=("bareos-bconsole"
"bareos-webui"
"bareos-devel"
"bareos-traymonitor"
+ "python2-bareos"
+ "python-bareos"
)
pkgver=21.1.3
pkgmajor=${pkgver%%.*}
-pkgrel=2
+pkgrel=3
arch=(i686 x86_64 armv7h aarch64)
groups=('bareos')
pkgdesc="Bareos - Backup Archiving Recovery Open Sourced"
@@ -131,6 +133,10 @@ build() {
-Dtraymonitor=yes
make DESTDIR="${srcdir}/install" install
+
+ cd "${srcdir}/${pkgbase}/python-bareos"
+ python2 setup.py build
+ python setup.py build
}
#=========================================
@@ -705,31 +711,23 @@ package_bareos-traymonitor() {
groups+=("bareos-client")
pkgdesc="${pkgdesc} - This package contains the tray monitor (QT based)"
depends=("bareos-common=${pkgver}")
- backup=("etc/bareos/tray-monitor.d/monitor/bareos-mon.conf"
- "etc/bareos/tray-monitor.d/client/file-daemon.conf"
- "etc/bareos/tray-monitor.d/director/director.conf"
- "etc/bareos/tray-monitor.d/storage/storage-daemon.conf")
+ backup=("etc/bareos/tray-monitor.d/monitor/bareos-mon.conf")
install=bareos-traymonitor.install
+
for f in \
- usr/bin/bareos-tray-monitor \
- usr/share/bareos/config/tray-monitor.d/client/FileDaemon-local.conf \
- usr/share/bareos/config/tray-monitor.d/director/Director-local.conf \
- usr/share/bareos/config/tray-monitor.d/monitor/bareos-mon.conf \
- usr/share/bareos/config/tray-monitor.d/storage/StorageDaemon-local.conf \
- usr/share/man/man1/bareos-tray-monitor.1 \
- usr/share/applications/bareos-tray-monitor.desktop \
- etc/xdg/autostart/bareos-tray-monitor.desktop \
- usr/share/pixmaps/bareos-tray-monitor.png \
+ +etc/bareos/tray-monitor.d/monitor \
+ etc/xdg/autostart/bareos-tray-monitor.desktop \
+ usr/share/bareos/config/tray-monitor.d/monitor/bareos-mon.conf \
+ usr/bin/bareos-tray-monitor \
+ usr/share/man/man1/bareos-tray-monitor.1* \
+ usr/share/applications/bareos-tray-monitor.desktop \
+ usr/share/pixmaps/bareos-tray-monitor.png \
; do
cp_pkgdir "$f" "$srcdir/install/"
done
# tray-monitor needs configuration files to run
- install -d -m750 ${pkgdir}/etc/bareos/tray-monitor.d/{client,director,monitor,storage}
- install -m640 "${pkgdir}/usr/share/bareos/config/tray-monitor.d/monitor/bareos-mon.conf" "${pkgdir}/etc/bareos/tray-monitor.d/monitor/bareos-mon.conf"
- install -m640 "${pkgdir}/usr/share/bareos/config/tray-monitor.d/client/FileDaemon-local.conf" "${pkgdir}/etc/bareos/tray-monitor.d/client/file-daemon.conf"
- install -m640 "${pkgdir}/usr/share/bareos/config/tray-monitor.d/director/Director-local.conf" "${pkgdir}/etc/bareos/tray-monitor.d/director/director.conf"
- install -m640 "${pkgdir}/usr/share/bareos/config/tray-monitor.d/storage/StorageDaemon-local.conf" "${pkgdir}/etc/bareos/tray-monitor.d/storage/storage-daemon.conf"
+ install -m640 "${pkgdir}/usr/share/bareos/config/tray-monitor.d/monitor/bareos-mon.conf" "${pkgdir}/etc/bareos/tray-monitor.d/monitor/bareos-mon.conf"
}
#=========================================
@@ -774,3 +772,21 @@ package_bareos-webui() {
cp ${srcdir}/bootstrap-table-locale-all.min.js ${pkgdir}/usr/share/bareos-webui/public/js/bootstrap-table-locale-all.min.js
install -Dm644 ${srcdir}/bareos/webui/{README.md,LICENSE,doc/README-TRANSLATION.md} "${pkgdir}/usr/share/licenses/${pkgname}/"
}
+
+#=========================================
+package_python2-bareos() {
+ pkgdesc="${pkgdesc} - python-bareos is a Python2 module to access a backup system."
+ depends=('python2' 'jansson')
+
+ cd "${srcdir}/${pkgbase}/python-bareos"
+ python2 setup.py install --skip-build --root="${pkgdir}" --optimize='1'
+}
+
+#=========================================
+package_python-bareos() {
+ pkgdesc="${pkgdesc} - python-bareos is a Python module to access a backup system."
+ depends=('python' 'jansson')
+
+ cd "${srcdir}/${pkgbase}/python-bareos"
+ python setup.py install --skip-build --root="${pkgdir}" --optimize='1'
+}
diff --git a/bareos-traymonitor.install b/bareos-traymonitor.install
index 926a09620bd5..407370f41049 100644
--- a/bareos-traymonitor.install
+++ b/bareos-traymonitor.install
@@ -1,8 +1,9 @@
-## arg 1: the new package version
post_install() {
- /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
- /usr/lib/bareos/scripts/bareos-config initialize_passwords
- chown -R bareos:bareos /etc/bareos/tray-monitor.d/monitor/
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+ CONFIGDIR="/etc/bareos/tray-monitor.d/"
+ chown -R root:bareos ${CONFIGDIR}
+ chmod -R u=rwX,go=rX ${CONFIGDIR}
}
post_upgrade() {