# Template file for 'bacula-common' pkgname=bacula-common version=9.4.2 revision=1 wrksrc="${pkgname%-*}-${version}" build_style=gnu-configure configure_args="--with-openssl --with-sqlite3 --with-mysql --with-postgresql --enable-smartalloc --sysconfdir=/etc/bacula --with-scriptdir=/etc/bacula/scripts --with-working-dir=/run/bacula" makedepends="sqlite-devel libmariadbclient-devel postgresql-libs-devel libressl-devel ncurses-devel zlib-devel acl-devel" short_desc="Bacula - A Network Backup Tool (common libs)" maintainer="Matthias Fulz " license="AGPL-3.0-only, BSD-2-Clause, BSD-3-Clause" homepage="https://www.bacula.org" distfiles="${SOURCEFORGE_SITE}/bacula/bacula-${version}.tar.gz" checksum=a40d04d2c48135972cecb6578405e835c4b9d798c0950017de0fad40ca94e8a0 alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-sqlite3-${version}.so" shlib_provides="libbaccats-${version}.so" case "$XBPS_TARGET_MACHINE" in armv[56]*) makedepends+=" libatomic-devel" ;; esac post_install() { rm "${DESTDIR}/usr/bin/bacula" rm -rf "${DESTDIR}/usr/share/doc" rm "${DESTDIR}/usr/share/man/man1/bat.1.gz" vlicense LICENSE vlicense LICENSE-FOSS } bacula-console_package() { short_desc="${short_desc/common libs/managment cli}" conf_files="/etc/${pkgname%-*}/bconsole.conf" depends="bacula-common" pkg_install() { vmove "etc/${pkgname%-*}/bconsole.conf" vmove "etc/${pkgname%-*}/scripts/bconsole" vmove "usr/bin/bconsole" vmove "usr/share/man/man8/bconsole.8.gz" } } bacula-fd_package() { short_desc="${short_desc/common libs/file daemon}" conf_files="/etc/${pkgname%-*}/${pkgname}.conf" depends="bacula-common" pkg_install() { vmove "etc/${pkgname%-*}/${pkgname}.conf" vmove "usr/bin/${pkgname}" vmove "usr/lib/bpipe-fd.so" vmove "usr/share/man/man8/${pkgname}.8.gz" vsv "${pkgname}" } } bacula-sd_package() { short_desc="${short_desc/common libs/storage daemon}" conf_files="/etc/${pkgname%-*}/${pkgname}.conf" depends="bacula-common" pkg_install() { vmove "etc/${pkgname%-*}/${pkgname}.conf" for x in ${pkgname} bextract bls bcopy bscan btape; do vmove "usr/bin/$x" vmove "usr/share/man/man8/$x.8.gz" done vsv "${pkgname}" } } bacula-dir_package() { short_desc="${short_desc/common libs/director daemon}" conf_files="/etc/${pkgname%-*}/${pkgname}.conf" depends="bacula-common" pkg_install() { vmove "etc/${pkgname%-*}/${pkgname}.conf" vmove "etc/${pkgname%-*}/scripts/query.sql" vmove "etc/${pkgname%-*}/scripts/create_${pkgname%-*}_database" vmove "etc/${pkgname%-*}/scripts/delete_catalog_backup" vmove "etc/${pkgname%-*}/scripts/drop_${pkgname%-*}_database" vmove "etc/${pkgname%-*}/scripts/drop_${pkgname%-*}_tables" vmove "etc/${pkgname%-*}/scripts/grant_${pkgname%-*}_privileges" vmove "etc/${pkgname%-*}/scripts/make_${pkgname%-*}_tables" vmove "etc/${pkgname%-*}/scripts/make_catalog_backup.pl" vmove "etc/${pkgname%-*}/scripts/make_catalog_backup" vmove "etc/${pkgname%-*}/scripts/update_${pkgname%-*}_tables" vmove "usr/bin/bsmtp" vmove "usr/share/man/man1/bsmtp.1.gz" for x in ${pkgname} bregex bwild dbcheck; do vmove "usr/bin/$x" vmove "usr/share/man/man8/$x.8.gz" done vsv "${pkgname}" } } bacula-common-mariadb_package() { short_desc="${short_desc/common libs/MariaDB support}" depends="bacula-common" alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-mysql-${version}.so" pkg_install() { vmove "usr/lib/libbaccats-mysql-${version}.so" vmove "usr/lib/libbaccats-mysql.so" for file in etc/bacula/scripts/*mysql*; do vmove "$file" done } } bacula-common-postgresql_package() { short_desc="${short_desc/common libs/PostgreSQL support}" depends="bacula-common" alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-postgresql-${version}.so" pkg_install() { vmove "usr/lib/libbaccats-postgresql-${version}.so" vmove "usr/lib/libbaccats-postgresql.so" for file in etc/bacula/scripts/*postgresql*; do vmove "$file" done } }