# Maintainer: Erich Eckner # Contributor: Michael Spradling pkgbase='bareos' # bareos-database-mysql ist absichtlich nicht any ohne ELF Dateien pkgname=("${pkgbase}-common" "${pkgbase}-bconsole" "${pkgbase}-database-common" "${pkgbase}-database-mysql" "${pkgbase}-database-postgresql" "${pkgbase}-database-sqlite3" "${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=20.0.1 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=10.2.0' 'glibc>=2.31' 'jansson=2.13.1' 'libacl.so=1' 'libcap.so=2' 'libpam.so=0' 'libpq.so=5' 'libreadline.so=8' 'lzo=2.10' 'openssl=1.1.1.k' 'python2=2.7.18' 'sqlite=3.35.4' 'zlib=1:1.2.11' ) _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" 'xattr.patch' 'check-if-bareos-backup-is-running') sha512sums=('94023b21a8c8a020ad5f01153a115c45e7479b204bbd834cdc89aa0f10878ea199738835f9d831922ca10b2a077aa8725f8356f205d5dc414712ef24d1c3e7d4' 'e2e1af7110b8b99897e00bdd9ec599c662b298a2861bf4cd8945ca718585c13255fc9849e1b9f0d050e43e46fa42d6c0fbb7dd5cadc8b72b1c3445d79612e290' '0235763891f368c13931f0fc43e3ae2d7ec796b7ef35896b6b9c048345d539308abe4a9bafda4e95221a89231d2f373ac3cfc2098d572d4068a1c068d27452f6') prepare() { cd $pkgbase-Release-$pkgver patch -p1 -i ../xattr.patch } build() { cd $pkgbase-Release-$pkgver mkdir build cd build [ "${CARCH}" = 'i486' ] && mysql=no || mysql=yes 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 \ -Dmysql=${mysql} \ -Ddisable-rpath=yes \ -Dpostgresql=yes \ -Dsqlite3=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=10.2.0' 'glibc>=2.31' 'jansson=2.13.1' 'libacl.so=1' 'libcap.so=2' 'lzo=2.10' 'openssl=1.1.1.k' 'zlib=1:1.2.11' ) 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=10.2.0' 'glibc>=2.31' 'jansson=2.13.1' '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=10.2.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-mysql() { pkgdesc="${pkgdesc} - Libs and tools for mysql catalog" provides=("bareos-database=$pkgver") local _pinned_dependencies_ibig local _pinned_dependencies_soprov local _pinned_dependencies_nsoprov [ "${CARCH}" != 'i486' ] || return 0 _pinned_dependencies_ibig=( 'gcc-libs=10.2.0' 'glibc>=2.31' ) _pinned_dependencies=( 'libmariadb.so=3' ) for _a in x86_64 pentium4 i686 armv6h armv7h aarch64; do eval 'local _pinned_dependencies_'"${_a}" eval '_pinned_dependencies_'"${_a}"'=("${_pinned_dependencies_ibig[@]}")' done for _a in x86_64 pentium4 i686 armv6h armv7h aarch64; do eval 'depends_'"${_a}"'=("${_pinned_dependencies[@]}" "${_pinned_dependencies_'"${_a}"'[@]}")' done depends=("bareos-common=$pkgver" "bareos-database-common=$pkgver") install=bareos-database-mysql.install install -Dm755 \ "$srcdir/install/usr/lib/bareos/backends/libbareoscats-mysql.so" \ -t "$pkgdir/usr/lib/bareos/backends" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/drops/mysql.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/drops" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/grants/mysql.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/grants" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/creates/mysql.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/creates" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.10_11.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.11_12.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.12_14.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.14_2001.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2001_2002.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2002_2003.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2003_2004.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/mysql.2004_2171.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/updates" } package_bareos-database-postgresql() { pkgdesc="${pkgdesc} - Libs and tools for postgresql catalog" provides=("bareos-database=$pkgver") local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=10.2.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/postgresql.10_11.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.11_12.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.12_14.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.14_2001.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2001_2002.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2002_2003.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2003_2004.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.2004_2171.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/postgresql.bee.1017_2004.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/updates" } package_bareos-database-sqlite3() { pkgdesc="${pkgdesc} - Libs and tools for sqlite3 catalog" provides=("bareos-database=$pkgver") local _pinned_dependencies _pinned_dependencies=( 'gcc-libs=10.2.0' 'glibc>=2.31' 'sqlite=3.35.4' ) depends=("bareos-common=$pkgver" "bareos-database-common=$pkgver" "${_pinned_dependencies[@]}") install -Dm755 \ "$srcdir/install/usr/lib/bareos/backends/libbareoscats-sqlite3.so" \ -t "$pkgdir/usr/lib/bareos/backends" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/creates/sqlite3.sql" \ -t "$pkgdir/usr/lib/bareos/scripts/ddl/creates" install -Dm644 \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.10_11.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.11_12.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.12_14.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.14_2001.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2001_2002.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2002_2003.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2003_2004.sql" \ "$srcdir/install/usr/lib/bareos/scripts/ddl/updates/sqlite3.2004_2171.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=10.2.0' 'glibc>=2.31' 'jansson=2.13.1' 'openssl=1.1.1.k' ) 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=10.2.0' 'glibc>=2.31' 'jansson=2.13.1' 'libpam.so=0' 'openssl=1.1.1.k' ) 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=10.2.0' 'glibc>=2.31' ) depends=("bareos-storage=$pkgver" 'zlib' '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=10.2.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=10.2.0' 'glibc>=2.31' 'jansson=2.13.1' 'zlib=1:1.2.11' ) 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=10.2.0' 'glibc>=2.31' 'zlib=1:1.2.11' ) depends=("bareos-common=$pkgver" 'zlib' '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=10.2.0' 'glibc>=2.31' ) depends=("bareos-common=$pkgver" "bareos-storage=$pkgver" 'zlib' '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=10.2.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=10.2.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=10.2.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() { pkgdesc="${pkgdesc} - Webui (Bareos web administration)" 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 ) )