1 # Maintainer: Sébastien Luttringer
8 pkgdesc='Enterprise-grade system for backing up Linux, Windows and MacOS PCs'
9 url='https://github.com/backuppc/'
13 depends=('glibc' 'popt' 'perl' 'par2cmdline' 'perl-archive-zip' 'perl-io-dirent'
14 'perl-file-listing' 'perl-time-modules' 'perl-cgi' 'perl-xml-rss'
15 'perl-json-xs' 'smtp-forwarder')
16 optdepends=('openssh: ssh transfert support'
17 'rsync: rsync transfert support'
18 'smbclient: smb/cifs transfert support'
19 'rrdtool: graphs of the pool usage ')
20 source=("https://github.com/backuppc/backuppc/releases/download/$pkgver/BackupPC-$pkgver.tar.gz"
21 "https://github.com/backuppc/backuppc-xs/releases/download/${_xsver}/BackupPC-XS-${_xsver}.tar.gz"
22 "https://github.com/backuppc/rsync-bpc/releases/download/${_rbpcver}/rsync-bpc-${_rbpcver}.tar.gz"
27 "$pkgname.profile.csh"
29 'https://github.com/backuppc/backuppc/commit/2c9270b9b849b2c86ae6301dd722c97757bc9256.patch')
30 install=$pkgname.install
31 backup=("etc/$pkgname/config.pl"
33 "etc/httpd/conf/extra/$pkgname.conf"
34 "etc/$pkgname/$pkgname.users")
35 sha256sums=('8bc04cd513d47629508bd2fd6f455ced38316974913638e971f44e37786c6365'
36 '94d863083a466558f82f10b1b95db7742ea99ebce808214f20897b343dc32b18'
37 '3eeb137319b608512b2d23c54ea8b52b511db806ffbd5fa730a394431d556f3f'
38 '70b414d681b47b8b41a228d8155761eac5f67b63bcdc6e0e4da7a0d27f3b6810'
39 '82598186b24b28d7e76c174ac90b046831954d3ebfe22219fa67a9011e306f3f'
40 'ef5c4fde24e14ab5828fed085a7dd8fd699dfdbbd875bc6c29b41ec2b0ae645b'
41 'daa9690efe856b01dc749be0dcc8f3daebf7c1c62500df2431eeb2762b446284'
42 '2c96d3be7ce0f681ea4b34abab93154b086132166658a747a7a8ed8c7ed2757e'
43 '97dbe6a0c8302d0e6ff6f97e77ca9fb4187272abb43dd01fff431170b6d39e6e'
44 'b4547f90f903d067fd09c4f2c168e204d818b69543defa8cad5dbdd2dfc258eb')
48 # apply patch from the source array (should be a pacman feature)
50 for filename in "${source[@]}"; do
51 if [[ "$filename" =~ \.patch$ ]]; then
52 echo "Applying patch ${filename##*/}"
53 patch -p1 -N -i "$srcdir/${filename##*/}"
61 cd "$srcdir"/rsync-bpc-$_rbpcver
62 ./configure --prefix=/usr/share/backuppc
68 cd "$srcdir"/rsync-bpc-$_rbpcver
69 make install DESTDIR="$pkgdir"
72 cd "$srcdir"/BackupPC-XS-$_xsver
73 perl Makefile.PL INSTALLDIRS=vendor
74 make -j1 # parallel build fail
75 make install DESTDIR="$pkgdir"
78 cd "$srcdir"/BackupPC-$pkgver
79 export PERLLIB=$(echo "$pkgdir"/usr/lib/perl5/*/vendor_perl/)
84 --hostname __HOSTNAME__ \
86 --backuppc-user=backuppc \
87 --dest-dir "$pkgdir" \
89 --install-dir /usr/share/$pkgname \
90 --config-dir /etc/$pkgname \
91 --cgi-dir /usr/share/$pkgname/cgi-bin \
92 --html-dir /usr/share/$pkgname/html \
93 --html-dir-url /backuppc \
94 --data-dir /var/lib/$pkgname \
95 --log-dir /var/log/$pkgname \
96 --run-dir /run/$pkgname \
97 --bin-path rsync_bpc=/usr/share/backuppc/bin/rsync_bpc \
98 --bin-path smbclient=/usr/bin/smbclient \
99 --bin-path nmblookup=/usr/bin/nmblookup \
100 --bin-path rsync=/usr/bin/rsync \
101 --bin-path ssh=/usr/bin/ssh \
102 --bin-path sendmail=/usr/bin/sendmail \
103 --bin-path ping=/usr/bin/ping \
104 --bin-path ping6=/usr/bin/ping \
105 --bin-path rrdtool=/usr/bin/rrdtool \
109 install -D -m 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
110 install -D -m 644 $pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
111 install -D -m 644 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
112 # install shell profiles
113 install -D -m 755 $pkgname.profile.sh "$pkgdir/etc/profile.d/$pkgname.sh"
114 install -D -m 755 $pkgname.profile.csh "$pkgdir/etc/profile.d/$pkgname.csh"
115 # install apache http
116 install -D -m 644 $pkgname.httpd "$pkgdir/etc/httpd/conf/extra/$pkgname.conf"
117 install -D -m 640 /dev/null "$pkgdir/etc/$pkgname/$pkgname.users"
118 # set correct permissions
120 chown 126:126 -R etc/$pkgname
121 chown 126:126 -R var/{log,lib}/$pkgname
123 chmod 755 -R var usr/share/$pkgname/{cgi-,}bin
124 chmod 750 var/log/$pkgname etc/$pkgname
125 chmod 750 -R var/lib/$pkgname
126 chmod 640 etc/$pkgname/{config.pl,hosts}
129 # no core_perl directory
130 rm -rv "$pkgdir"/usr/lib/perl5/*/core_perl
133 # vim:set ts=2 sw=2 et: