updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / bacula / PKGBUILD
blobf7742e980547a33dd7a9feb0a04631e435d843eb
1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
3 # Contributor: Calogero Lo Leggio <kalos@autistici.org>
4 # Contributor: Matias Hernandez <msdark@archlinux.cl>
6 pkgname=bacula
7 pkgver=5.0.3
8 pkgrel=4
9 pkgdesc="An advanced backup tool with network and tape changer support (MySQL backend)"
10 arch=("i686" "x86_64")
11 url="http://www.${pkgname}.org"
12 license=("GPL")
13 depends=("libmysqlclient")
14 makedepends=("qt" "wxgtk" "gtk2")
15 optdepends=("qt: for bat"
16             "wxgtk: for bwx console"
17             "gtk2: for tray monitor")
18 options=(!buildflags)
19 conflicts=("${pkgname}-sqlite" "${pkgname}-postgresql" "${pkgname}-client")
20 backup=("etc/${pkgname}/bconsole.conf"
21                 "etc/${pkgname}/${pkgname}-dir.conf"
22                 "etc/${pkgname}/${pkgname}-fd.conf"
23                 "etc/${pkgname}/${pkgname}-sd.conf")
24 install="${pkgname}.install"
25 source=(http://downloads.sourceforge.net/project/bacula/bacula/${pkgver}/${pkgname}-${pkgver}.tar.gz
26         ${pkgname}-sd.rc.d
27         ${pkgname}-fd.rc.d
28         ${pkgname}-dir.rc.d)
29 md5sums=('9de254ae39cab0587fdb2f5d8d90b03b'
30          'e7be4c9fb3c7ce334f9ee24d71652d3e'
31          'a9a070a862e9cf39ae4bc374409c721d'
32          '55619ae3094c698541a3bfedc87bdb48')
34 build() {
35         cd ${srcdir}/${pkgname}-${pkgver}
37         # Build
38         ./configure --prefix=/usr \
39                 --enable-build-dird --enable-build-stored --enable-smartalloc \
40                 --enable-bat --enable-tray-monitor --enable-bwx-console \
41                 --with-mysql --without-openssl \
42                 --with-dir-user=${pkgname} --with-dir-group=${pkgname} \
43                 --with-sd-user=${pkgname} --with-sd-group=${pkgname} \
44                 --sysconfdir=/etc/${pkgname} --with-scriptdir=/etc/${pkgname}/scripts \
45                 --with-working-dir=/var/cache/${pkgname}/working \
46                 --with-subsys-dir=/var/cache/${pkgname}/working \
47                 --with-archivedir=/var/cache/${pkgname}/archive
49         make
52 package() {
53         cd ${srcdir}/${pkgname}-${pkgver}
55         make DESTDIR=${pkgdir} install
57         # Permissions
58         chmod a+x ${pkgdir}/etc/${pkgname}/scripts/{update_${pkgname}_tables,delete_catalog_backup,update_mysql_tables,make_catalog_backup,bconsole}
60         # Daemons
61         mkdir -p ${pkgdir}/etc/rc.d/
62     install -Dm755 ${srcdir}/*.rc.d ${pkgdir}/etc/rc.d/
64         # Logs
65         install -D -m644 ${srcdir}/${pkgname}-${pkgver}/scripts/logrotate ${pkgdir}/etc/logrotate.d/${pkgname}
66         sed -i "s|/var/cache/${pkgname}/working/log|/var/log/${pkgname}.log|g" ${pkgdir}/etc/{${pkgname}/${pkgname}-dir.conf,logrotate.d/${pkgname}}