wok-next view backuppc/receipt @ rev 21080
Update tiff (4.0.10): libs -> into libtiff, apps -> into tiff
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Dec 24 02:07:02 2018 +0200 (2018-12-24) |
parents | 00611afb6342 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="backuppc"
4 SOURCE="BackupPC"
5 VERSION="3.3.2"
6 CATEGORY="network"
7 SHORT_DESC="high-performance, enterprise-grade system for backing up Linux"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://backuppc.sourceforge.net/"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 SUGGESTED="par2"
14 CONFIG_FILES="/etc/BackupPC/config.pl"
15 TAGS="backup"
17 DEPENDS="tar perl-file-rsyncp perl perl-compress-raw-zlib perl-archive-zip \
18 rsync bzip2 perl-xml-rss perl-libnet \
19 perl-net-ftp-retrhandle perl-net-ftp-autoreconnect smbclient postfix \
20 bzip2 openssh perl-libwww-perl"
21 BUILD_DEPENDS="par2 perl"
23 compile_rules() {
24 mkdir -p $install/etc/apache/conf.d
25 grep -q share/BackupPC/doc configure.pl ||
26 sed -i -e 's|/doc|/share/BackupPC/doc|' \
27 -e 's|bin doc|bin share/BackupPC/doc|' \
28 configure.pl
30 perl configure.pl \
31 --batch \
32 --dest-dir=$install \
33 --install-dir=/usr \
34 --data-dir=/var/lib/BackupPC \
35 --config-dir=/etc/BackupPC \
36 --log-dir=/var/log/BackupPC \
37 --backuppc-user=www \
38 --hostname=localhost \
39 --html-dir=/usr/share/BackupPC/www \
40 --html-dir-url=/BackupPC/img \
41 --cgi-dir=/usr/share/BackupPC/cgi \
42 &&
43 cp httpd/BackupPC.conf $install/etc/apache/conf.d
44 }
46 genpkg_rules() {
47 cp -a $install/* $fs
48 cp -a $stuff/* $fs
49 sed \
50 -e "s/''http/'http/;s/min''/min'/" \
51 -e 's/-E -N -d/-E -d/' \
52 -e "s/^\\\$Conf{CgiAdminUsers}.*/\$Conf{CgiAdminUsers} = 'root';/" \
53 -e 's|sshPath -q -x|sshPath -o UserKnownHostsFile=/etc/BackupPC/.ssh/known_hosts -i /etc/BackupPC/.ssh/id_rsa -q -x|' \
54 -i $fs/etc/BackupPC/config.pl
55 chown www.www $fs/etc/BackupPC/config.pl
56 chmod 755 $fs/etc $fs/var $fs/var/*
57 }
59 post_install() {
60 grep -qs backuppc "$1/etc/rcS.conf" ||
61 sed -i 's/^RUN_DAEMONS="/RUN_DAEMONS="backuppc /' "$1/etc/rcS.conf"
62 loc=$LANG
63 [ -s "$1/usr/lib/BackupPC/Lang/$loc.pm" ] || loc=${loc:0:2}
64 [ -s "$1/usr/lib/BackupPC/Lang/$loc.pm" ] &&
65 sed -i "s/'en'/'$loc'/" "$1/etc/BackupPC/config.pl"
66 [ -x /usr/bin/par2 ] &&
67 sed -i 's/{ArchivePar} =.*/{ArchivePar} = 5;/' "$1/etc/BackupPC/config.pl"
68 if [ ! -d "$1/etc/BackupPC/.ssh" ]; then
69 mkdir "$1/etc/BackupPC/.ssh"
70 chroot "$1/" ssh-keygen -t rsa -f /etc/BackupPC/.ssh/id_rsa -C '' -N ''
71 fi
72 if [ -z "$1" ]; then
73 /etc/init.d/apache stop
74 sleep 2
75 /etc/init.d/backuppc start
76 /etc/init.d/apache start
77 fi
79 [ -n "$quiet" ] || cat <<"EOT"
81 .-------------------------------------------------------------.
82 | Now you should: |
83 | - append /etc/BackupPC/.ssh/id_rsa.pub to every unix client |
84 | /root/.ssh/authorized_keys file |
85 | - update $Conf{CgiAdminUsers} in /etc/BackupPC/config.pl |
86 | - enable web access with |
87 | 'htpasswd -c root /etc/BackupPC/BackupPC.users' |
88 | - update passwords in /etc/BackupPC/*.sh |
89 | - ... and maybe jail /var/lib/BackupPC into a xfs/noatime |
90 | for ext4 users. |
91 '-------------------------------------------------------------'
92 EOT
93 }