void-packages/srcpkgs/bacula-common/template
Matthias Fulz b5d09dc79a New package: bacula-common-7.4.7
Closes: #5701 [via git-merge-pr]
2017-05-06 21:47:12 +02:00

119 lines
3.9 KiB
Bash

# Template file for 'bacula-common'
pkgname="bacula-common"
version="7.4.7"
revision=1
build_style=gnu-configure
_common_desc="Bacula - A Network Backup Tool "
short_desc="${_common_desc} (common libs)"
maintainer="Matthias Fulz <mfulz@olznet.de>"
license="AGPL-3"
homepage="http://www.bacula.org"
distfiles="${SOURCEFORGE_SITE}/bacula/bacula-${version}.tar.gz"
checksum="6f6075c2ca90a63cdeeca39b0b82a3ea07ce9999dedc68951d88bed7fbc0be40"
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"
wrksrc="${pkgname%-*}-${version}"
shlib_provides="libbaccats-${version}.so"
alternatives="bacula-db-backend:/usr/lib/libbaccats-${version}.so:/usr/lib/libbaccats-sqlite3-${version}.so"
post_install() {
rm "${DESTDIR}/usr/bin/bacula"
rm -rf "${DESTDIR}/usr/share/doc"
rm "${DESTDIR}/usr/share/man/man1/bat.1.gz"
}
bacula-console_package() {
short_desc="Bacula - A Network Backup Tool (management 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="Bacula - A Network Backup Tool (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="Bacula - A Network Backup Tool (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="Bacula - A Network Backup Tool (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="${_common_desc} (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="${_common_desc} (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
}
}