wok-current annotate backuppc/receipt @ rev 25282
updated rlwrap (0.43 -> 0.45.2)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jul 18 15:29:34 2022 +0100 (2022-07-18) |
parents | 4b2bd5a4b92c |
children | 7dd01dedad38 |
rev | line source |
---|---|
pascal@9282 | 1 # SliTaz package receipt. |
pascal@9282 | 2 |
pascal@9282 | 3 PACKAGE="backuppc" |
pascal@9282 | 4 SOURCE="BackupPC" |
pascal@19957 | 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 |
pascal@9282 | 17 DEPENDS="tar perl-file-rsync perl perl-compress-raw-zlib perl-archive-zip \ |
erjo@13409 | 18 rsync bzip2 perl-xml-rss perl-net-ftp \ |
erjo@13409 | 19 perl-net-ftp-retrhandle perl-net-ftp-autoreconnect smbclient postfix \ |
slaxemulator@9838 | 20 bzip2 openssh perl-libwww" |
pascal@9282 | 21 BUILD_DEPENDS="par2" |
pascal@9282 | 22 |
pascal@24340 | 23 # What is the latest version available today? |
pascal@24340 | 24 current_version() |
pascal@24340 | 25 { |
pascal@24340 | 26 wget -O - https://sourceforge.net/projects/backuppc/files/backuppc/ 2>/dev/null | \ |
pascal@24340 | 27 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ |
pascal@24340 | 28 sed '/scope="row/!d;s|.*/backuppc/||;s|/.*||;q' |
pascal@24340 | 29 } |
pascal@24340 | 30 |
pascal@9282 | 31 # Rules to configure and make the package. |
pascal@9282 | 32 compile_rules() |
pascal@9282 | 33 { |
pascal@15603 | 34 mkdir -p $DESTDIR/etc/apache/conf.d |
pascal@9285 | 35 grep -q share/BackupPC/doc configure.pl || |
pascal@9285 | 36 sed -i -e 's|/doc|/share/BackupPC/doc|' \ |
pascal@9285 | 37 -e 's|bin doc|bin share/BackupPC/doc|' \ |
pascal@9285 | 38 configure.pl |
pascal@15602 | 39 perl configure.pl --batch --dest-dir=$DESTDIR --install-dir=/usr \ |
pascal@9282 | 40 --data-dir=/var/lib/BackupPC --config-dir=/etc/BackupPC \ |
pascal@9282 | 41 --log-dir=/var/log/BackupPC --backuppc-user=www \ |
pascal@9282 | 42 --hostname=localhost --html-dir=/usr/share/BackupPC/www \ |
pascal@9283 | 43 --html-dir-url=/BackupPC/img \ |
pascal@9283 | 44 --cgi-dir=/usr/share/BackupPC/cgi && |
pascal@15603 | 45 cp httpd/BackupPC.conf $DESTDIR/etc/apache/conf.d |
pascal@9282 | 46 } |
pascal@9282 | 47 |
pascal@9282 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@9282 | 49 genpkg_rules() |
pascal@9282 | 50 { |
pascal@15603 | 51 cp -a $install/* $fs |
pankso@9697 | 52 cp -a $stuff/* $fs |
pascal@9282 | 53 sed -i -e "s/''http/'http/;s/min''/min'/" \ |
pascal@9282 | 54 -e 's/-E -N -d/-E -d/' \ |
pascal@9282 | 55 -e "s/^\\\$Conf{CgiAdminUsers}.*/\$Conf{CgiAdminUsers} = 'root';/" \ |
pascal@9285 | 56 -e 's|sshPath -q -x|sshPath -o UserKnownHostsFile=/etc/BackupPC/.ssh/known_hosts -i /etc/BackupPC/.ssh/id_rsa -q -x|' \ |
pascal@9282 | 57 $fs/etc/BackupPC/config.pl |
pascal@9282 | 58 chown www.www $fs/etc/BackupPC/config.pl |
pascal@9282 | 59 chmod 755 $fs/etc $fs/var $fs/var/* |
pascal@19960 | 60 mkdir -p $install/usr/share/doc |
pascal@19960 | 61 cp $src/doc/*.html $src/README $install/usr/share/doc |
pascal@9282 | 62 } |
pascal@9282 | 63 |
pascal@9282 | 64 post_install() |
pascal@9282 | 65 { |
pascal@18730 | 66 grep -qs backuppc "$1/etc/rcS.conf" || |
pascal@18730 | 67 sed -i 's/^RUN_DAEMONS="/RUN_DAEMONS="backuppc /' "$1/etc/rcS.conf" |
pascal@9282 | 68 loc=$LANG |
pascal@18730 | 69 [ -s "$1/usr/lib/BackupPC/Lang/$loc.pm" ] || loc=${loc:0:2} |
pascal@18730 | 70 [ -s "$1/usr/lib/BackupPC/Lang/$loc.pm" ] && |
pascal@18730 | 71 sed -i "s/'en'/'$loc'/" "$1/etc/BackupPC/config.pl" |
pascal@9282 | 72 [ -x /usr/bin/par2 ] && |
pascal@18730 | 73 sed -i 's/{ArchivePar} =.*/{ArchivePar} = 5;/' "$1/etc/BackupPC/config.pl" |
pascal@18730 | 74 if [ ! -d "$1/etc/BackupPC/.ssh" ]; then |
pascal@18730 | 75 mkdir "$1/etc/BackupPC/.ssh" |
pascal@18730 | 76 chroot "$1/" ssh-keygen -t rsa -f /etc/BackupPC/.ssh/id_rsa -C '' -N '' |
pascal@9282 | 77 fi |
pascal@9282 | 78 if [ -z "$1" ]; then |
pascal@9282 | 79 /etc/init.d/apache stop |
pascal@9282 | 80 sleep 2 |
pascal@9282 | 81 /etc/init.d/backuppc start |
pascal@9282 | 82 /etc/init.d/apache start |
pascal@9282 | 83 fi |
pascal@9282 | 84 cat <<EOT |
al@18668 | 85 |
pascal@9282 | 86 Now you should : |
pascal@18730 | 87 - append /etc/BackupPC/.ssh/id_rsa.pub to every unix client /root/.ssh/authorized_keys file |
pascal@18730 | 88 - update \$Conf{CgiAdminUsers} in /etc/BackupPC/config.pl |
pascal@9282 | 89 - enable web access with 'htpasswd -c root /etc/BackupPC/BackupPC.users' |
pascal@9282 | 90 - update passwords in /etc/BackupPC/*.sh |
pascal@18889 | 91 - ... and maybe jail /var/lib/BackupPC into a xfs/noatime for ext4 users. |
pascal@9282 | 92 EOT |
pascal@9282 | 93 } |