diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-12-04 14:16:34 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-12-04 15:06:46 +0100 |
commit | 2d4c75fe4f9782ba3d6904ca120fb9145ad2485c (patch) | |
tree | 9897a51d86cf1ced746c87e051c1e94438e1f673 /main/backuppc | |
parent | b2c637d91b1c2ee8f99840550b668cbdede3cb73 (diff) | |
download | aports-2d4c75fe4f9782ba3d6904ca120fb9145ad2485c.tar.bz2 aports-2d4c75fe4f9782ba3d6904ca120fb9145ad2485c.tar.xz |
main/backuppc: improve abuild
Diffstat (limited to 'main/backuppc')
-rw-r--r-- | main/backuppc/APKBUILD | 88 |
1 files changed, 36 insertions, 52 deletions
diff --git a/main/backuppc/APKBUILD b/main/backuppc/APKBUILD index b71667b0ed..006272c376 100644 --- a/main/backuppc/APKBUILD +++ b/main/backuppc/APKBUILD @@ -3,7 +3,6 @@ pkgname="backuppc" _realname="BackupPC" pkgver=3.3.1 -_realver=$pkgver pkgrel=4 pkgdesc="High-performance, enterprise-grade backup system" url="http://backuppc.sourceforge.net/" @@ -13,61 +12,47 @@ depends="perl busybox rsync perl-archive-zip perl-io-compress perl-libwww perl-file-rsync samba-client" pkgusers="backuppc" pkggroups="backuppc" -makedepends="" install="$pkgname.pre-install" -subpackages="" -source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$_realver/$_realname-$_realver.tar.gz +source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$_realname-$pkgver.tar.gz configure.pl.patch - backuppc.initd - " + backuppc.initd" +builddir="$srcdir/$_realname-$pkgver" + +package() { + cd "$builddir" -_builddir="$srcdir/$_realname-$_realver" -prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done mkdir -p "$pkgdir"/etc/BackupPC \ "$pkgdir"/var/www/cgi-bin \ "$pkgdir"/var/www/htdocs/BackupPC || return 1 -} -build() { - return 0 -} - -package() { - cd "$_builddir" perl configure.pl \ - --batch \ - --backuppc-user=backuppc \ - --bin-path bzip2=/usr/bin/bzip2 \ - --bin-path cat=/bin/cat \ - --bin-path df=/bin/df \ - --bin-path tar=/bin/tar \ - --bin-path hostname=/bin/hostname \ - --bin-path nmblookup=/usr/bin/nmblookup \ - --bin-path perl=/usr/bin/perl \ - --bin-path ping=/bin/ping \ - --bin-path rsync=/usr/bin/rsync \ - --bin-path sendmail=/usr/sbin/sendmail \ - --bin-path smbclient=/usr/bin/smbclient \ - --bin-path split=/usr/bin/split \ - --bin-path ssh=/usr/bin/ssh \ - --compress-level=3 \ - --dest-dir="$pkgdir" \ - --config-dir /etc/BackupPC \ - --cgi-dir /var/www/cgi-bin \ - --data-dir /var/lib/BackupPC \ - --hostname backuppc \ - --html-dir /var/www/htdocs/BackupPC \ - --html-dir-url /BackupPC \ - --install-dir /usr/lib/BackupPC \ - --log-dir /var/log/BackupPC \ - --uid-ignore \ - --no-set-perms || return 1 + --batch \ + --backuppc-user=backuppc \ + --bin-path bzip2=/usr/bin/bzip2 \ + --bin-path cat=/bin/cat \ + --bin-path df=/bin/df \ + --bin-path tar=/bin/tar \ + --bin-path hostname=/bin/hostname \ + --bin-path nmblookup=/usr/bin/nmblookup \ + --bin-path perl=/usr/bin/perl \ + --bin-path ping=/bin/ping \ + --bin-path rsync=/usr/bin/rsync \ + --bin-path sendmail=/usr/sbin/sendmail \ + --bin-path smbclient=/usr/bin/smbclient \ + --bin-path split=/usr/bin/split \ + --bin-path ssh=/usr/bin/ssh \ + --compress-level=3 \ + --dest-dir="$pkgdir" \ + --config-dir /etc/BackupPC \ + --cgi-dir /var/www/cgi-bin \ + --data-dir /var/lib/BackupPC \ + --hostname backuppc \ + --html-dir /var/www/htdocs/BackupPC \ + --html-dir-url /BackupPC \ + --install-dir /usr/lib/BackupPC \ + --log-dir /var/log/BackupPC \ + --uid-ignore \ + --no-set-perms || return 1 install -m755 configure.pl \ "$pkgdir"/usr/lib/BackupPC/bin/configure.pl || return 1 @@ -76,13 +61,12 @@ package() { chmod 775 "$pkgdir"/usr/lib/BackupPC/bin/* - for dir in etc var/log var/lib;do - chown -R backuppc.backuppc ${pkgdir}/${dir}/BackupPC - chmod 755 "$pkgdir/$dir" + local dir; for dir in etc var/log var/lib; do + chown -R backuppc:backuppc "$pkgdir"/$dir/BackupPC || return 1 + chmod 755 "$pkgdir"/$dir || return 1 done ln -s /var/www/cgi-bin/BackupPC_Admin "$pkgdir"/var/www/htdocs/index.cgi || return 1 - } md5sums="5efdcdd48e9e0d4ef7a706902d1f8b3d BackupPC-3.3.1.tar.gz |