# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=bareos pkgver=15.2.3 pkgrel=0 pkgdesc="Bareos - Backup Archiving REcovery Open Sourced" url="http://www.bareos.org" arch="all" license="AGPL3" depends="" depends_dev="libpcap-dev lzo-dev sqlite-dev postgresql-dev openssl-dev mariadb-dev acl-dev qt-dev python-dev readline-dev ncurses-dev" makedepends="$depends_dev libtool" install="$pkgname.pre-install" subpackages="$pkgname-dev $pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-sqlite" pkgusers="bareos" pkggroups="bareos" source="$pkgname-$pkgver.tar.gz::https://github.com/bareos/bareos/archive/Release/$pkgver.tar.gz bareos-dir-init bareos-dir-conf bareos-sd-init bareos-sd-conf bareos-fd-init bareos-fd-conf bareos-path-mounted.patch" builddir="$srcdir"/${pkgname}-Release-${pkgver} build() { cd "$builddir" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --docdir=/usr/share/doc \ --infodir=/usr/share/info \ --with-confdir=/etc/bareos \ --with-archivedir=/var/lib/bareos/archive \ --with-scriptdir=/etc/bareos/scripts \ --with-working-dir=/var/lib/bareos \ --with-pid-dir=/var/run \ --with-logdir=/var/log/bareos \ --with-subsys-dir=/var/lock \ --enable-smartalloc \ --enable-largefile \ --enable-conio \ --enable-readline \ --enable-batch-insert \ --enable-acl \ --enable-xattr \ --enable-scsi-crypto \ --enable-lmdb \ --enable-ipv6 \ --disable-nls \ --with-postgresql \ --with-mysql \ --with-sqlite3 \ --with-openssl \ --with-python \ --enable-includes \ --disable-rpath \ --without-systemd \ --with-dir-user=$pkgusers \ --with-dir-group=$pkggroups \ --with-sd-user=$pkgusers \ --with-sd-group=$pkggroups \ --with-fd-user=root \ --with-fd-group=root make || return 1 } package() { cd "$builddir" make DESTDIR="$pkgdir" install for DAEMON in dir sd fd do install -Dm755 "$srcdir"/bareos-${DAEMON}-init \ "$pkgdir"/etc/init.d/bareos-${DAEMON} install -Dm644 "$srcdir"/bareos-${DAEMON}-conf \ "$pkgdir"/etc/conf.d/bareos-${DAEMON} done # Install logrotate script install -Dm644 scripts/logrotate $pkgdir/etc/logrotate.d/bareos # Use shell script for catalog backup instead of perl sed -i -e 's/make_catalog_backup.pl/make_catalog_backup/' \ "$pkgdir"/etc/bareos/bareos-dir.conf for dir in /var/lib/bareos /etc/bareos/scripts/make_catalog_backup* \ /etc/bareos/scripts/mtx-changer* do chown bareos.bareos "$pkgdir"$dir || return 1 done find "$pkgdir"/usr/lib -iname libbareoscats* -type l -delete } _mv_backend() { mkdir -p "$subpkgdir"/usr/lib mkdir -p "$subpkgdir"/etc/bareos/scripts mv "$pkgdir"/usr/lib/libbareoscats-${1}-${pkgver}.so \ "$subpkgdir"/usr/lib || return 1 ln -s libbareoscats-${pkgver}.so "$subpkgdir"/usr/lib/libbareoscats.so ln -s libbareoscats-${1}-${pkgver}.so \ "$subpkgdir"/usr/lib/libbareoscats-${pkgver}.so } mysql() { pkgdesc="Bareos MySQL backend" depends="bareos" _mv_backend mysql } pgsql() { pkgdesc="Bareos PGSQL backend" depends="bareos" pkgusers="postgres" _mv_backend postgresql } sqlite() { pkgdesc="Bareos SQLite backend" depends="bareos" _mv_backend sqlite3 } md5sums="b15872bcda22363ea9a87be7a2e3201a bareos-15.2.3.tar.gz 3967099975a3eafe5811482b231b159f bareos-dir-init 20f28a16f34e3f20ed18ed81b010e765 bareos-dir-conf 5ae1fba6860a320394d65744e5640bdb bareos-sd-init afe2f9a4d79d7d96eb9372d003d10f86 bareos-sd-conf 6ae93e570f95fa845fa534c2d2efaac0 bareos-fd-init 4500ce2d62bf9df33c07f70dc40f7b85 bareos-fd-conf 12a609832cdec5e03bc93c09c93aaeac bareos-path-mounted.patch" sha256sums="37821804727f06c58badc2b738ea2be5237111726c89f1306c1926cba261fc55 bareos-15.2.3.tar.gz 3dcba6d60dd2c67b1378a791d730588ff7d29eb59024fc731d4f4be01660e293 bareos-dir-init 5891bdb3a8ec581f8a2fd404a5a8995d8950d80da71a3b732474fb45e80d22c2 bareos-dir-conf 7c08606bbd391fa73773ef52bcee2dd989530c8c44b9dfae0b82cfe73976a400 bareos-sd-init 88808b3b971825acffc9dc3b6d418e52d9bd89df8527052c555cba4336ead784 bareos-sd-conf 12a62dd9c7a7931060c2c21e52cb9069a3774ebe7c8370455068e2dded0c2f80 bareos-fd-init 64124036c19e849cc580b981887be35b5746acb584397190a0afe2797b2d1ace bareos-fd-conf d20fa8fade3cd3551e1e4cff1a736d1901be1c650bf1386a5a336bfec19fea4c bareos-path-mounted.patch" sha512sums="c6d5e8d9ac31b6b06a7b2a692136e2173e9276c717888d69a57867c52223681bb345f357c8c6054734ca2c7cf5712725b67542f5aecc90c007412cb5e5e514a8 bareos-15.2.3.tar.gz 852df12c6555ad65661345e15872ca75b99a9d3e5b9e6ed80d82021006c9716a04919dabe88ff672aa550ac0b00b31eaa2e739469557fc326e6bb4216e2308b9 bareos-dir-init e06e5f8821d4a9a3f40cc8f11feeb5004780b82e2ad5e645f69a0f8faff78d8a8c6e66b36e105619b2a78d6b2f294dedd0e00e9bbf568af201cf299387135fef bareos-dir-conf ee8a9206d3e604f5ac81bc70bece97ec77dae87b463a6ff4d08fba9418bf37e99a30895f115b2e9fbba1ec5f92b5d9368fd155717fedae12792f255b02413208 bareos-sd-init 80f6cf74cc14e722747d92e6e7b073bdf32456d395c6b4b63daa1ddcaf75f3d76d1b9a0e8e2da512e8f82e4d59a4a93cc38117af91d974fe7db644516bdb9909 bareos-sd-conf e4c09734ccf9e1ac197ac4684c8294dddae817cf764b168ce7357b2529d11314f948ed2807d501b3c7cd7725ba488981fe573d7b389fca7feedfa9c8a1cce6fa bareos-fd-init ff312e8952b31de27f22b257d12b570e151794d985f854ff19bab34363ea974d7583edced6b125518da3ecfe2b2a229b732473958b10484d988fcc8a67a372cc bareos-fd-conf eac4614c1b29ff0f12061837e425ae495890076021b6d1b0f1beb93501cfb905170342dac5dab69b09f825d5b9416eea25fa02e2174b5a704315c7feb08ff3d3 bareos-path-mounted.patch"