# Maintainer: Erich Eckner # Contributor: Michael Spradling pkgbase='bareos' pkgname=("${pkgbase}-common" "${pkgbase}-bconsole" "${pkgbase}-database-common" "${pkgbase}-database-postgresql" "${pkgbase}-database-tools" # "${pkgbase}-devel" "${pkgbase}-director" "${pkgbase}-storage-fifo" "${pkgbase}-tools" "${pkgbase}-filedaemon" "${pkgbase}-storage" "${pkgbase}-storage-tape" "${pkgbase}-director-python-plugin" "${pkgbase}-filedaemon-python-plugin" "${pkgbase}-storage-python-plugin" "${pkgbase}-webui") pkgver=21.1.2 pkgrel=7 arch=(x86_64 i486 i686 pentium4 armv6h armv7h aarch64) groups=('bareos') pkgdesc="Bareos - Backup Archiving REcovery Open Sourced" url="http://www.bareos.org" license=('AGPL3') _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'jansson=2.14' 'libacl.so=1' 'libpam.so=0' 'libpq.so=5' 'libreadline.so=8' 'lzo=2.10' 'openssl=1.1.1.q' 'python2=2.7.18' 'zlib=1:1.2.12' ) _pinned_dependencies_libmariadbclient=( 'libmariadb.so=3' ) makedepends=(bash cmake lsb-release mtx python "${_pinned_dependencies[@]}") makedepends_x86_64=(ceph "${_pinned_dependencies_libmariadbclient[@]}") makedepends_i686=("${_pinned_dependencies_libmariadbclient[@]}") makedepends_pentium4=("${_pinned_dependencies_libmariadbclient[@]}") makedepends_armv6h=("${_pinned_dependencies_libmariadbclient[@]}") makedepends_armv7h=("${_pinned_dependencies_libmariadbclient[@]}") makedepends_aarch64=(ceph "${_pinned_dependencies_libmariadbclient[@]}") source=("$pkgbase-$pkgver.tar.gz::https://github.com/$pkgbase/$pkgbase/archive/Release/$pkgver.tar.gz" 'ce3339d28623b8bb771e5e0aa139168df5963c4b.patch' 'xattr.patch' 'check-if-bareos-backup-is-running') sha512sums=('acdc787ff828add93c81b2b7d293dec90f2aa22aa3aee3002662bd30e88dc0dc58b753bb63ca7c111fac6c7eeea888938236c1169f92ed6cec27941036c7b6b1' '9c5b3ff610d50d0aef5de8ca0f2ed49bb72817a5a044013b87762139b048382b9a0949129ecf1788443363ef1dd4e70e773c985490dda1fae12212a4170da5aa' 'c535f89866816669208d56e21ffb13f70aa962e578847bc7bcc76a3e8ad54b252c8e09b745b500064d6f02cb5497cb81b62dd1c156d2e907c393aaa091aa5f0e' '0235763891f368c13931f0fc43e3ae2d7ec796b7ef35896b6b9c048345d539308abe4a9bafda4e95221a89231d2f373ac3cfc2098d572d4068a1c068d27452f6') prepare() { cd $pkgbase-Release-$pkgver patch -p1 -i ../ce3339d28623b8bb771e5e0aa139168df5963c4b.patch patch -p1 -i ../xattr.patch } build() { cd $pkgbase-Release-$pkgver mkdir build cd build cmake .. \ -Dprefix=/usr \ -Dsbindir=/usr/bin \ -Dsysconfdir=/etc \ -Dconfdir=/etc/$pkgbase \ -Dworkingdir=/etc/$pkgbase \ -Dlocalstatedir=/ \ -Dlibdir=/usr/lib/$pkgbase \ -Dmandir=/usr/share/man \ -Ddisable-conio=yes \ -Ddynamic-cats-backends=yes \ -Ddynamic-storage-backends=yes \ -Dpython=yes \ -Dopenssl=yes \ -Ddisable-rpath=yes \ -Dpostgresql=yes \ -Dndmp=no \ -Dhostname='XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX' \ -Ddir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \ -Dfd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \ -Dsd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \ -Dmon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \ -Dmon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \ -Dmon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \ -Dbasename="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \ -Dlogdir=/var/log/$pkgbase \ -Ddir-user=$pkgbase \ -Ddir-group=$pkgbase \ -Dsd-user=$pkgbase \ -Dsd-group=$pkgbase \ -Dfd-user=root \ -Dpid-dir=/run/bareos \ -Dfd-group=root \ -Dconfigtemplatedir=/usr/share/$pkgbase/config \ -Dworking-dir=/var/lib/$pkgbase \ -Dplugindir=/usr/lib/$pkgbase/plugins \ -Dscriptdir=/usr/lib/$pkgbase/scripts \ -Dbackenddir=/usr/lib/$pkgbase/backends \ -Darchivedir=/var/lib/$pkgbase/storage \ -Dbsrdir=/var/lib/$pkgbase \ -Dsubsys-dir=/run/$pkgbase \ -Dsystemd=yes make make DESTDIR="$srcdir/install" install # Currently upstream systemd file does not automatically create run directory for _daemon in 'dir' 'fd' 'sd'; do sed -i ' /^StandardOutput=syslog$/d /\[Service\]/a RuntimeDirectory=bareos/'"${_daemon}"' s@^\(WorkingDirectory=\).*$@\1/run/bareos/'"${_daemon}"'@ s@^\(PIDFile=\).*/\([^/]\+\)$@\1/run/bareos/'"${_daemon}"'/\2@ ' "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-${_daemon}.service" done sed -i '1 a PID Directory = /run/bareos/dir' \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/director/bareos-dir.conf" sed -i '1 a PID Directory = /run/bareos/sd' \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/storage/bareos-sd.conf" sed -i '1 a PID Directory = /run/bareos/fd' \ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/client/myself.conf" find "$srcdir/install/usr/share/bareos/config" -type f \ -exec sed -i 's@/usr/local/bin/@/usr/bin/@g' {} \; } package_bareos-common() { # Matches bareos-common.install.in pkgdesc="${pkgdesc} - Common files" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'jansson=2.14' 'libacl.so=1' 'lzo=2.10' 'openssl=1.1.1.q' 'zlib=1:1.2.12' ) depends=('bash' "${_pinned_dependencies[@]}") install=bareos-common.install # are these really 'common'? # usr/lib/bareos/libbareoslmdb.so # usr/lib/bareos/libbareossd.so install -Dm755 \ "$srcdir/install/usr/lib/bareos"/libbareos.so* \ "$srcdir/install/usr/lib/bareos"/libbareosfind.so* \ "$srcdir/install/usr/lib/bareos"/libbareoslmdb.so* \ "$srcdir/install/usr/lib/bareos"/libbareossd.so* \ "$srcdir/install/usr/lib/bareos"/libbareosfastlz.so* \ -t "$pkgdir/usr/lib/bareos" install -Dm755 \ "$srcdir/install/usr/lib/bareos/scripts/bareos-config" \ -t "$pkgdir/usr/lib/bareos/scripts" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/bareos-config-lib.sh" \ "$srcdir/install/usr/lib/bareos/scripts/btraceback.gdb" \ -t "$pkgdir/usr/lib/bareos/scripts" install -Dm755 \ "$srcdir/install/usr/bin/bsmtp" \ "$srcdir/install/usr/bin/btraceback" \ -t "$pkgdir/usr/bin" install -Dm644 \ "$srcdir/install/usr/share/man/man1/bsmtp.1" \ -t "$pkgdir/usr/share/man/man1/" install -Dm644 \ "$srcdir/install/usr/share/man/man8/btraceback.8" \ -t "$pkgdir/usr/share/man/man8/" install -dm755 "$pkgdir/var/lib/bareos" install -dm750 "$pkgdir/etc/bareos" install -dm755 "$pkgdir/run/bareos" } package_bareos-bconsole() { pkgdesc="${pkgdesc} - Admin Tool (CLI)" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'jansson=2.14' 'libreadline.so=8' ) depends=("bareos-common=$pkgver" "${_pinned_dependencies[@]}") groups+=('bareos-client') install=bareos-bconsole.install backup=('etc/bareos/bconsole.conf') install -Dm640 "$srcdir/install/usr/share/bareos/config/bconsole.conf" \ -t "$pkgdir/etc/bareos" install -Dm755 "$srcdir/install/usr/bin/bconsole" \ -t "$pkgdir/usr/bin" install -Dm644 "$srcdir/install/usr/share/man/man1/bconsole.1" \ -t "$pkgdir/usr/share/man/man1" chmod -R o-rx "$pkgdir/etc/bareos" } package_bareos-database-common() { pkgdesc="${pkgdesc} - Generic abstration libs and tools for sql catalog" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' ) depends=("bareos-common=$pkgver" 'libcap' 'lzo' 'zlib' 'openssl' 'bash' 'jansson' "${_pinned_dependencies[@]}") install -Dm755 \ "$srcdir/install/usr/lib/bareos"/libbareoscats.so* \ "$srcdir/install/usr/lib/bareos"/libbareossql.so* \ -t "$pkgdir/usr/lib/bareos" install -Dm755 \ "$srcdir/install/usr/lib/bareos/scripts/create_bareos_database" \ "$srcdir/install/usr/lib/bareos/scripts/drop_bareos_database" \ "$srcdir/install/usr/lib/bareos/scripts/drop_bareos_tables" \ "$srcdir/install/usr/lib/bareos/scripts/grant_bareos_privileges" \ "$srcdir/install/usr/lib/bareos/scripts/make_bareos_tables" \ "$srcdir/install/usr/lib/bareos/scripts/update_bareos_tables" \ -t "$pkgdir/usr/lib/bareos/scripts" install -Dm755 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/versions.map" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl" } package_bareos-database-postgresql() { pkgdesc="${pkgdesc} - Libs and tools for postgresql catalog" provides=("bareos-database=$pkgver") local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'libpq.so=5' ) depends=("bareos-common=$pkgver" "bareos-database-common=$pkgver" "${_pinned_dependencies[@]}") install='bareos-database-postgresql.install' install -Dm755 \ "$srcdir/install/usr/lib/bareos/backends/libbareoscats-postgresql.so" \ -t "$pkgdir/usr/lib/bareos/backends" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/drops/postgresql.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/drops" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/postgresql-change_owner.dbconfig-template.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/postgresql-readonly.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/postgresql.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/grants" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/creates/postgresql.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/creates" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/"*".sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/updates" } package_bareos-database-tools() { pkgdesc="${pkgdesc} - CLI tools with database dpendencies (dbcheck, bscan)" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'jansson=2.14' 'openssl=1.1.1.q' ) depends=("bareos-common=$pkgver" "bareos-database-common=$pkgver" "${_pinned_dependencies[@]}") install -Dm755 \ "$srcdir/install/usr/bin/bareos-dbcheck" \ "$srcdir/install/usr/bin/bscan" \ -t "$pkgdir/usr/bin" install -Dm644 \ "$srcdir/install/usr/share/man/man8/bareos-dbcheck.8" \ "$srcdir/install/usr/share/man/man8/bscan.8" \ -t "$pkgdir/usr/share/man/man8" } #package_bareos-devel() { # pkgdesc="${pkgdesc} - Devel headers" # arch=(any) # # TODO # install -d $pkgdir/usr/include/bareos #} package_bareos-director() { pkgdesc="${pkgdesc} - Director daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'jansson=2.14' 'libpam.so=0' 'openssl=1.1.1.q' ) depends=("bareos-common=$pkgver" "bareos-database=$pkgver" "bareos-database-common=$pkgver" 'bash' "${_pinned_dependencies[@]}") install=bareos-director.install install -Dm755 \ "$srcdir/install/usr/lib/bareos/scripts/delete_catalog_backup" \ "$srcdir/install/usr/lib/bareos/scripts/make_catalog_backup" \ "$srcdir/install/usr/lib/bareos/scripts/make_catalog_backup.pl" \ -t "$pkgdir/usr/lib/bareos/scripts" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/query.sql" \ -t "$pkgdir/usr/lib/bareos/scripts" backup=( 'etc/bareos/bareos-dir.d/catalog/MyCatalog.conf' 'etc/bareos/bareos-dir.d/client/bareos-fd.conf' 'etc/bareos/bareos-dir.d/console/bareos-mon.conf' 'etc/bareos/bareos-dir.d/director/bareos-dir.conf' 'etc/bareos/bareos-dir.d/fileset/Catalog.conf' 'etc/bareos/bareos-dir.d/fileset/LinuxAll.conf' 'etc/bareos/bareos-dir.d/fileset/SelfTest.conf' 'etc/bareos/bareos-dir.d/fileset/Windows All Drives.conf' 'etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf' 'etc/bareos/bareos-dir.d/job/BackupCatalog.conf' 'etc/bareos/bareos-dir.d/job/RestoreFiles.conf' 'etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf' 'etc/bareos/bareos-dir.d/messages/Daemon.conf' 'etc/bareos/bareos-dir.d/messages/Standard.conf' 'etc/bareos/bareos-dir.d/pool/Differential.conf' 'etc/bareos/bareos-dir.d/pool/Full.conf' 'etc/bareos/bareos-dir.d/pool/Incremental.conf' 'etc/bareos/bareos-dir.d/pool/Scratch.conf' 'etc/bareos/bareos-dir.d/profile/operator.conf' 'etc/bareos/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf' 'etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf' 'etc/bareos/bareos-dir.d/storage/File.conf' ) install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/catalog/MyCatalog.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/catalog" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/client/bareos-fd.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/client" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/console/bareos-mon.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/console" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/director/bareos-dir.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/director" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/Catalog.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/LinuxAll.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/SelfTest.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/fileset/Windows All Drives.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/fileset" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/job/backup-bareos-fd.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/job/BackupCatalog.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/job/RestoreFiles.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/job" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/jobdefs/DefaultJob.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/jobdefs" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/messages/Daemon.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/messages/Standard.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/messages" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Differential.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Full.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Incremental.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/pool/Scratch.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/pool" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/profile/operator.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/profile" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/schedule/WeeklyCycle.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/schedule" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/storage/File.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/storage" install -Dm755 \ "$srcdir/install/usr/bin/bareos-dir" \ -t "$pkgdir/usr/bin" install -Dm644 \ "$srcdir/install/usr/share/man/man8/bareos-dir.8" \ "$srcdir/install/usr/share/man/man8/bareos.8" \ -t "$pkgdir/usr/share/man/man8" install -Dm644 \ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-dir.service" \ -t "$pkgdir/usr/lib/systemd/system/" chmod -R o-rx "$pkgdir/etc/bareos" } package_bareos-storage-fifo() { pkgdesc="${pkgdesc} - FIFO support for storage daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' ) depends=("bareos-storage=$pkgver" 'libcap' 'openssl' 'jansson' 'lzo' "${_pinned_dependencies[@]}") install=bareos-storage-fifo.install install -Dm755 \ "$srcdir/install/usr/lib/bareos/backends/libbareossd-fifo.so" \ -t "$pkgdir/usr/lib/bareos/backends" backup=( 'etc/bareos/bareos-dir.d/storage/NULL.conf.example' 'etc/bareos/bareos-sd.d/device/NULL.conf.example' ) install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/storage/NULL.conf.example" \ -t "$pkgdir/etc/bareos/bareos-dir.d/storage" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/device/NULL.conf.example" \ -t "$pkgdir/etc/bareos/bareos-sd.d/device" chmod -R o-rx "$pkgdir/etc/bareos" } package_bareos-tools() { pkgdesc="${pkgdesc} - CLI tools (bcopy, bextract, bls, bregeq, bwild)" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' ) depends=("bareos-common=$pkgver" "${_pinned_dependencies[@]}") install -Dm755 \ "$srcdir/install/usr/bin/bregex" \ "$srcdir/install/usr/bin/bwild" \ "$srcdir/install/usr/bin/bcopy" \ "$srcdir/install/usr/bin/bextract" \ "$srcdir/install/usr/bin/bls" \ "$srcdir/install/usr/bin/bpluginfo" \ -t "$pkgdir/usr/bin" install -Dm644 \ "$srcdir/install/usr/share/man/man1/bwild.1" \ "$srcdir/install/usr/share/man/man1/bregex.1" \ -t "$pkgdir/usr/share/man/man1" install -Dm644 \ "$srcdir/install/usr/share/man/man8/bcopy.8" \ "$srcdir/install/usr/share/man/man8/bextract.8" \ "$srcdir/install/usr/share/man/man8/bls.8" \ "$srcdir/install/usr/share/man/man8/bpluginfo.8" \ -t "$pkgdir/usr/share/man/man8" } package_bareos-filedaemon() { pkgdesc="${pkgdesc} - File daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'jansson=2.14' 'zlib=1:1.2.12' ) depends=("bareos-common=$pkgver" "${_pinned_dependencies[@]}") groups+=('bareos-client') install=bareos-filedaemon.install backup=( 'etc/bareos/bareos-fd.d/client/myself.conf' 'etc/bareos/bareos-fd.d/director/bareos-dir.conf' 'etc/bareos/bareos-fd.d/director/bareos-mon.conf' 'etc/bareos/bareos-fd.d/messages/Standard.conf' ) install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/client/myself.conf" \ -t "$pkgdir/etc/bareos/bareos-fd.d/client" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/director/bareos-dir.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/director/bareos-mon.conf" \ -t "$pkgdir/etc/bareos/bareos-fd.d/director" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-fd.d/messages/Standard.conf" \ -t "$pkgdir/etc/bareos/bareos-fd.d/messages" install -Dm755 \ "$srcdir/install/usr/bin/bareos-fd" \ "$srcdir/check-if-bareos-backup-is-running" \ -t "$pkgdir/usr/bin" install -Dm755 \ "$srcdir/install/usr/lib/bareos/plugins/bpipe-fd.so" \ -t "$pkgdir/usr/lib/bareos/plugins" install -Dm644 \ "$srcdir/install/usr/share/man/man8/bareos-fd.8" \ -t "$pkgdir/usr/share/man/man8" install -Dm644 \ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-fd.service" \ -t "$pkgdir/usr/lib/systemd/system" chmod -R o-rx "$pkgdir/etc/bareos" } package_bareos-storage() { pkgdesc="${pkgdesc} - Storage daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' ) depends=("bareos-common=$pkgver" 'lzo' 'jansson' 'openssl' 'libcap' "${_pinned_dependencies[@]}") install=bareos-storage.install install -Dm755 \ "$srcdir/install/usr/lib/bareos/plugins/autoxflate-sd.so" \ -t "$pkgdir/usr/lib/bareos/plugins" install -Dm755 \ "$srcdir/install/usr/lib/bareos/scripts/disk-changer" \ -t "$pkgdir/usr/lib/bareos/scripts" backup=( 'etc/bareos/bareos-sd.d/device/FileStorage.conf' 'etc/bareos/bareos-sd.d/director/bareos-dir.conf' 'etc/bareos/bareos-sd.d/director/bareos-mon.conf' 'etc/bareos/bareos-sd.d/messages/Standard.conf' 'etc/bareos/bareos-sd.d/storage/bareos-sd.conf' ) install -Dm644 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/device/FileStorage.conf" \ -t "$pkgdir/etc/bareos/bareos-sd.d/device" install -Dm644 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/director/bareos-dir.conf" \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/director/bareos-mon.conf" \ -t "$pkgdir/etc/bareos/bareos-sd.d/director" install -Dm644 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/messages/Standard.conf" \ -t "$pkgdir/etc/bareos/bareos-sd.d/messages" install -Dm644 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/storage/bareos-sd.conf" \ -t "$pkgdir/etc/bareos/bareos-sd.d/storage" install -Dm755 \ "$srcdir/install/usr/bin/bareos-sd" \ -t "$pkgdir/usr/bin" install -Dm644 \ "$srcdir/install/usr/share/man/man8/bareos-sd.8" \ -t "$pkgdir/usr/share/man/man8" install -Dm644 \ "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-sd.service" \ -t "$pkgdir/usr/lib/systemd/system" install -dm750 "$pkgdir/var/lib/bareos/storage" chmod -R o-rx "$pkgdir/etc/bareos" } package_bareos-storage-tape() { pkgdesc="${pkgdesc} - Tape support for storage daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' ) depends=("bareos-common=$pkgver" "bareos-storage=$pkgver" 'libcap' 'bash' 'openssl' 'jansson' 'lzo' 'mtx' "${_pinned_dependencies[@]}") install=bareos-storage-tape.install backup=( 'etc/bareos/mtx-changer.conf' 'etc/bareos/bareos-dir.d/storage/Tape.conf.example' 'etc/bareos/bareos-sd.d/autochanger/autochanger-0.conf.example' 'etc/bareos/bareos-sd.d/device/tapedrive-0.conf.example' ) install -Dm640 \ "$srcdir/install/etc/bareos/mtx-changer.conf" \ -t "$pkgdir/etc/bareos" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-dir.d/storage/Tape.conf.example" \ -t "$pkgdir/etc/bareos/bareos-dir.d/storage" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/autochanger/autochanger-0.conf.example" \ -t "$pkgdir/etc/bareos/bareos-sd.d/autochanger" install -Dm640 \ "$srcdir/install/usr/share/bareos/config/bareos-sd.d/device/tapedrive-0.conf.example" \ -t "$pkgdir/etc/bareos/bareos-sd.d/device" install -Dm755 \ "$srcdir/install/usr/lib/bareos/backends/libbareossd-gentape.so" \ "$srcdir/install/usr/lib/bareos/backends/libbareossd-tape.so" \ -t "$pkgdir/usr/lib/bareos/backends" install -Dm755 \ "$srcdir/install/usr/lib/bareos/scripts/mtx-changer" \ -t "$pkgdir/usr/lib/bareos/scripts" install -Dm644 \ "$srcdir/install/usr/share/man/man8/bscrypto.8" \ "$srcdir/install/usr/share/man/man8/btape.8" \ -t "$pkgdir/usr/share/man/man8" install -Dm755 \ "$srcdir/install/usr/bin/bscrypto" \ "$srcdir/install/usr/bin/btape" \ -t "$pkgdir/usr/bin" chmod -R o-rx "$pkgdir/etc/bareos" } package_bareos-director-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for director daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'python2=2.7.18' ) depends=("bareos-common=$pkgver" "bareos-director=$pkgver" 'libcap' 'jansson' 'lzo' 'python' "${_pinned_dependencies[@]}") install -Dm755 \ "$srcdir/install/usr/lib/bareos/plugins/python-dir.so" \ "$srcdir/install/usr/lib/bareos/plugins/BareosDirWrapper.py" \ "$srcdir/install/usr/lib/bareos/plugins/BareosDirPluginBaseclass.py" \ "$srcdir/install/usr/lib/bareos/plugins/bareos-dir-class-plugin.py" \ -t "$pkgdir/usr/lib/bareos/plugins" } package_bareos-filedaemon-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for file daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'python2=2.7.18' ) depends=("bareos-common=$pkgver" "bareos-filedaemon=$pkgver" 'python' "${_pinned_dependencies[@]}" 'libcap' 'lzo' 'jansson') install -Dm755 \ "$srcdir/install/usr/lib/bareos/plugins/python-fd.so" \ "$srcdir/install/usr/lib/bareos/plugins/bareos-fd-local-fileset.py" \ "$srcdir/install/usr/lib/bareos/plugins/BareosFdPluginBaseclass.py" \ "$srcdir/install/usr/lib/bareos/plugins/BareosFdPluginLocalFileset.py" \ "$srcdir/install/usr/lib/bareos/plugins/BareosFdWrapper.py" \ -t "$pkgdir/usr/lib/bareos/plugins" } package_bareos-storage-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for storage daemon" local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=12.1.0' 'glibc>=2.31' 'python2=2.7.18' ) depends=("bareos-common=$pkgver" "bareos-storage=$pkgver" 'lzo' 'python' 'libcap' 'jansson' "${_pinned_dependencies[@]}") install -Dm755 \ "$srcdir/install/usr/lib/bareos/plugins/python-sd.so" \ "$srcdir/install/usr/lib/bareos/plugins/BareosSdPluginBaseclass.py" \ "$srcdir/install/usr/lib/bareos/plugins/BareosSdWrapper.py" \ "$srcdir/install/usr/lib/bareos/plugins/bareos-sd-class-plugin.py" \ -t "$pkgdir/usr/lib/bareos/plugins" } package_bareos-webui() { arch=('any') pkgdesc="${pkgdesc} - Webui (Bareos web administration)" local _pinned_dependencies _pinned_dependencies=( ) depends=('php' 'php-fpm' 'jansson') optdepend=('nginx' 'apache') backup=('etc/bareos-webui/directors.ini' 'etc/bareos-webui/configuration.ini' 'etc/bareos/bareos-dir.d/console/admin.conf.example' 'etc/bareos/bareos-dir.d/profile/webui-admin.conf') install -dm755 \ "$pkgdir/etc" \ "$pkgdir/usr/share/webapps" mv \ "$srcdir/install/usr/local/share/bareos-webui" \ "$pkgdir/usr/share/webapps/" mv \ "$srcdir/install/etc/bareos-webui" \ "$pkgdir/etc/" install -Dm644 \ "$srcdir/install/etc/httpd/conf.d/bareos-webui.conf" \ -t "$pkgdir/etc/httpd/conf.d/extra" install -Dm644 \ "$srcdir/install/etc/bareos/bareos-dir.d/console/admin.conf.example" \ -t "$pkgdir/etc/bareos/bareos-dir.d/console" install -Dm644 \ "$srcdir/install/etc/bareos/bareos-dir.d/profile/webui-admin.conf" \ -t "$pkgdir/etc/bareos/bareos-dir.d/profile" } makedepends+=( $( for _pn in "${pkgname[@]}"; do ( eval "$( declare -f "package_${_pn}" \ | sed ' s/^\s*_pinned_dependencies=(\(.*\));\?$/echo \1/ t /\[ "${CARCH}" /!d s/return/exit/ ' )" ) \ | tr ' ' '\n' \ | tr -d '"'"'" done \ | sort -u ) )