aboutsummaryrefslogtreecommitdiffstats
path: root/main/backuppc/APKBUILD
blob: b71667b0ed3ac44ac6a4b34af823c7d69917dbab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="backuppc"
_realname="BackupPC"
pkgver=3.3.1
_realver=$pkgver
pkgrel=4
pkgdesc="High-performance, enterprise-grade backup system"
url="http://backuppc.sourceforge.net/"
arch="noarch"
license="GPL2+"
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
	configure.pl.patch
	backuppc.initd
	"

_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

	install -m755 configure.pl \
		"$pkgdir"/usr/lib/BackupPC/bin/configure.pl || return 1
	install -D -m755 "$srcdir"/backuppc.initd \
		"$pkgdir"/etc/init.d/backuppc || return 1

	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"
	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
2a25b036d273ea67b69aa62e4cd7c28f  configure.pl.patch
d53014f185a18bd23bb52fe0fc622ca7  backuppc.initd"
sha256sums="c9cc4aec28a7474a68d40f4bc460ff15140e05c96900c7f98ff3ef06c4f6ae4c  BackupPC-3.3.1.tar.gz
86988fbe8e8763abee8861f5bb03bf6bb7fd2430623f78fc921502b6759ad48d  configure.pl.patch
54d26ee05424c6ad679f5307f9c687d48fe438cd89b789a8d0c16b2fa813cd39  backuppc.initd"
sha512sums="b6bb9de3103c5062098d80755055b7461ae9133a4a46a66b3d0af89d081086571694db1898e7d85880defa15b030bad522812116ae5361c0fbde90b877d139c6  BackupPC-3.3.1.tar.gz
a38361fd0e54a4c0100a7bf94b09483e5ba246dc45d6955d275542dd5662d8da11d9580685195b7d4dfa9a07c0487a52a14a95340737e70889ffe5c5e26d5ff8  configure.pl.patch
fb8558b0c9fb465084c848e32d072e6078a9ba3f1ccb2d602b8551ff51a2b88cd52177094519e741b3261e34eadbab50e6fb3be5ceed2fe476b8e6df0123d5b6  backuppc.initd"