summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-02-22 12:09:09 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-02-22 12:09:09 +0000
commit39d012f9e2e675679bcadd399d501c6bc96de082 (patch)
tree00ae03c9915e295115d8c859556d65679e5bca79 /testing
parent3fd530c5dced2e9a5af2e9a504cf72624c0d5e05 (diff)
downloadaports-39d012f9e2e675679bcadd399d501c6bc96de082.tar.bz2
aports-39d012f9e2e675679bcadd399d501c6bc96de082.tar.xz
testing/backuppc: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/backuppc/APKBUILD62
-rwxr-xr-xtesting/backuppc/backuppc.pre-install2
-rw-r--r--testing/backuppc/configure.pl.patch66
3 files changed, 130 insertions, 0 deletions
diff --git a/testing/backuppc/APKBUILD b/testing/backuppc/APKBUILD
new file mode 100644
index 00000000..5b4cb98e
--- /dev/null
+++ b/testing/backuppc/APKBUILD
@@ -0,0 +1,62 @@
+# Contributor:
+# Maintainer: Leonardo Arena <rnalrd@gmail.com>
+pkgname="backuppc"
+_realname="BackupPC"
+pkgver="3.2.0b1"
+_realver="3.2.0beta1"
+pkgrel=0
+pkgdesc="High-performance, enterprise-grade backup system"
+url="http://backuppc.sourceforge.net/"
+license="GPL"
+depends="perl busybox rsync"
+makedepends=""
+install="$pkgname.pre-install"
+subpackages=""
+source="http://downloads.sourceforge.net/project/$pkgname/$pkgname-beta/$_realver/$_realname-$_realver.tar.gz
+configure.pl.patch"
+
+prepare () {
+ cd "$srcdir/$_realname-$_realver"
+ mkdir -p "$pkgdir"/etc/BackupPC
+ mkdir -p "$pkgdir"/var/www/cgi-bin
+ patch -p2 < ../../configure.pl.patch
+}
+
+build() {
+ cd "$srcdir/$_realname-$_realver"
+ 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/bin/sendmail \
+ --bin-path smbclient=/usr/bin/smbclient \
+ --bin-path split=/usr/bin/split \
+ --bin-path ssh=/usr/bin/ssh \
+ --compress-level=3 \
+ --config-dir "$pkgdir"/etc/BackupPC \
+ --cgi-dir "$pkgdir"/var/www/cgi-bin \
+ --data-dir "$pkgdir"/data/BackupPC \
+ --hostname backuppc \
+ --html-dir "$pkgdir"/var/www/htdocs/BackupPC \
+ --html-dir-url /BackupPC \
+ --install-dir "$pkgdir"/usr/lib/BackupPC \
+ --log-dir "$pkgdir"/var/log/BackupPC \
+ --uid-ignore \
+ --no-set-perms || return 1
+}
+
+package() {
+ cd "$srcdir/$_realname-$_realver"
+# make DESTDIR="$pkgdir" install
+}
+
+md5sums="34c85b43136954c81d543fa0a7b0b121 BackupPC-3.2.0beta1.tar.gz
+f57ad7fdcce804f20f2fe82bee91e813 configure.pl.patch"
diff --git a/testing/backuppc/backuppc.pre-install b/testing/backuppc/backuppc.pre-install
new file mode 100755
index 00000000..1a1736fa
--- /dev/null
+++ b/testing/backuppc/backuppc.pre-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+adduser -h /var/lib/backuppc -s /bin/false -S -D -H &>/dev/null
diff --git a/testing/backuppc/configure.pl.patch b/testing/backuppc/configure.pl.patch
new file mode 100644
index 00000000..24d5e3bb
--- /dev/null
+++ b/testing/backuppc/configure.pl.patch
@@ -0,0 +1,66 @@
+--- src/BackupPC-3.2.0beta1/configure.pl
++++ configure.pl
+@@ -327,25 +327,8 @@
+
+ EOF
+ my($name, $passwd, $Uid, $Gid);
+-while ( 1 ) {
+- $Conf{BackupPCUser} = prompt("--> BackupPC should run as user",
+- $Conf{BackupPCUser} || "backuppc",
+- "backuppc-user");
+- if ( $opts{"set-perms"} ) {
+ ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
+- last if ( $name ne "" );
+- print <<EOF;
+
+-getpwnam() says that user $Conf{BackupPCUser} doesn't exist. Please
+-check the name and verify that this user is in the passwd file.
+-
+-EOF
+- exit(1) if ( $opts{batch} );
+- } else {
+- last;
+- }
+-}
+-
+ print <<EOF;
+
+ Please specify an install directory for BackupPC. This is where the
+@@ -532,12 +515,6 @@
+ ) ) {
+ next if ( -d "$DestDir$Conf{InstallDir}/$dir" );
+ mkpath("$DestDir$Conf{InstallDir}/$dir", 0, 0755);
+- if ( !-d "$DestDir$Conf{InstallDir}/$dir"
+- || !my_chown($Uid, $Gid, "$DestDir$Conf{InstallDir}/$dir") ) {
+- die("Failed to create or chown $DestDir$Conf{InstallDir}/$dir\n");
+- } else {
+- print("Created $DestDir$Conf{InstallDir}/$dir\n");
+- }
+ }
+
+ #
+@@ -546,11 +523,6 @@
+ foreach my $dir ( ($Conf{CgiImageDir}) ) {
+ next if ( $dir eq "" || -d "$DestDir$dir" );
+ mkpath("$DestDir$dir", 0, 0755);
+- if ( !-d "$DestDir$dir" || !my_chown($Uid, $Gid, "$DestDir$dir") ) {
+- die("Failed to create or chown $DestDir$dir");
+- } else {
+- print("Created $DestDir$dir\n");
+- }
+ }
+
+ #
+@@ -566,12 +538,6 @@
+ "$Conf{LogDir}",
+ ) ) {
+ mkpath("$DestDir$dir", 0, 0750) if ( !-d "$DestDir$dir" );
+- if ( !-d "$DestDir$dir"
+- || !my_chown($Uid, $Gid, "$DestDir$dir") ) {
+- die("Failed to create or chown $DestDir$dir\n");
+- } else {
+- print("Created $DestDir$dir\n");
+- }
+ }
+
+ printf("Installing binaries in $DestDir$Conf{InstallDir}/bin\n");