# 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") pkgver=19.2.7 pkgrel=8 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') makedepends=(acl bash cmake gcc-libs glibc jansson libcap lsb-release lzo mtx openssl postgresql-libs python python2 readline sqlite3 zlib) makedepends_x86_64=(ceph libmariadbclient) makedepends_i686=(libmariadbclient) makedepends_pentium4=(libmariadbclient) makedepends_armv6h=(libmariadbclient) makedepends_armv7h=(libmariadbclient) makedepends_aarch64=(ceph libmariadbclient) source=("$pkgbase-$pkgver.tar.gz::https://github.com/$pkgbase/$pkgbase/archive/Release/$pkgver.tar.gz" 'nullify-os-specifics.patch' 'check-if-bareos-backup-is-running') sha512sums=('cb467846a41d42a469704d48c3a1b03ebf5fdc71b9268c1e438e46b86073d55993dfd9bf26242db593db8b1814009c060fd65122d434bad2986c24613f6865c6' '724ca4e04ff4dfb3e56890a06ffb777cac8e1aeafb6142a347fa542aedcdf6604b280f2d55da3c3d7bbcf996cdd0f6184ca324e9195f3f4db090b17337f1df3a' '0235763891f368c13931f0fc43e3ae2d7ec796b7ef35896b6b9c048345d539308abe4a9bafda4e95221a89231d2f373ac3cfc2098d572d4068a1c068d27452f6') prepare() { cd "${srcdir}/${pkgbase}-Release-${pkgver}" patch -p1 -i "${srcdir}/nullify-os-specifics.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 ' /\[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" _pinned_dependencies=( 'gcc-libs=10.1.0' 'glibc>=2.31' 'jansson=2.13.1' 'libacl.so=1' 'libcap.so=2' 'lzo=2.10' 'openssl=1.1.1.g' '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)" _pinned_dependencies=( 'gcc-libs=10.1.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" _pinned_dependencies=( 'gcc-libs=10.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-mysql() { pkgdesc="${pkgdesc} - Libs and tools for mysql catalog" provides=("bareos-database=$pkgver") unset _pinned_dependencies _pinned_dependencies_ibig=( 'gcc-libs=10.1.0' 'glibc>=2.31' 'mariadb-libs=10.4.13' ) for _a in x86_64 pentium4 i686 armv6h armv7h aarch64; do eval '_pinned_dependencies_'"${_a}"'=("${_pinned_dependencies_ibig[@]}")' eval 'depends_'"${_a}"'=("${_pinned_dependencies_'"${_a}"'[@]}")' done depends=("bareos-common=$pkgver" "bareos-database-common=$pkgver") [ "${CARCH}" != 'i486' ] || return 0 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") _pinned_dependencies=( 'gcc-libs=10.1.0' 'glibc>=2.31' 'postgresql-libs=12.3' ) 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") _pinned_dependencies=( 'gcc-libs=10.1.0' 'glibc>=2.31' 'sqlite=3.32.1' ) 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)" _pinned_dependencies=( 'gcc-libs=10.1.0' 'glibc>=2.31' 'jansson=2.13.1' 'openssl=1.1.1.g' ) 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" _pinned_dependencies=( 'gcc-libs=10.1.0' 'glibc>=2.31' 'jansson=2.13.1' 'openssl=1.1.1.g' 'pam=1.3.1' ) 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" _pinned_dependencies=( 'gcc-libs=10.1.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)" _pinned_dependencies=( 'gcc-libs=10.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" _pinned_dependencies=( 'gcc-libs=10.1.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" _pinned_dependencies=( 'gcc-libs=10.1.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" _pinned_dependencies=( 'gcc-libs=10.1.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" _pinned_dependencies=( 'gcc-libs=10.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/bareos-dir.py.template" \ "$srcdir/install/usr/lib/bareos/plugins/bareos_dir_consts.py" \ "$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" _pinned_dependencies=( 'gcc-libs=10.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.py.template" \ "$srcdir/install/usr/lib/bareos/plugins/bareos-fd-local-fileset.py" \ "$srcdir/install/usr/lib/bareos/plugins/bareos-fd-mock-test.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" \ "$srcdir/install/usr/lib/bareos/plugins/bareos_fd_consts.py" \ -t "$pkgdir/usr/lib/bareos/plugins" } package_bareos-storage-python-plugin() { pkgdesc="${pkgdesc} - Python plugin for storage daemon" _pinned_dependencies=( 'gcc-libs=10.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/bareos-sd.py.template" \ "$srcdir/install/usr/lib/bareos/plugins/bareos_sd_consts.py" \ "$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" }