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