summaryrefslogtreecommitdiff
path: root/testing/burp/APKBUILD
blob: aa5edd9fde4a254380f312d4c6d3e8cb57353ed9 (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
# Contributor: Bernhard J. M. Gruen <bernhard.gruen@googlemail.com>
# Maintainer:
pkgname=burp
pkgver=2.5.4
pkgrel=1
pkgdesc="A network backup and restore program"
url="https://burp.grke.org"
arch="all"
license="AGPL-3.0-only"
makedepends="
	autoconf
	automake
	bsd-compat-headers
	librsync-dev
	libtool
	linux-headers
	uthash-dev
	openssl-dev>3
	zlib-dev
	"
checkdepends="check-dev"
subpackages="
	$pkgname-doc
	$pkgname-server
	"
source="https://github.com/grke/burp/archive/$pkgver.zip
	burp.init
	"
# Check is deactivated as it needs --enable-forks in check/check-dev
options="!check"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--prefix=/usr \
		--sbindir=/usr/bin \
		--sysconfdir=/etc/burp \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-acl \
		--disable-xattr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install-all

	cd "$pkgdir"
	rm -rf var \
		etc/burp/autoupgrade \
		etc/burp/clientconfdir
	chmod -R go-rwx etc/burp
}

server() {
	pkgdesc="$pkgdesc (server configuration and helper scripts)"
	# bash is needed on the server to run burp_ca, timer and notify scripts
	# I am working on a version that does not need bash anymore
	depends="bash openssl"

	cd "$builddir"

	mkdir -p "$subpkgdir"/var/spool/burp
	chmod 0755 "$subpkgdir"/var/spool
	chmod 0700 "$subpkgdir"/var/spool/burp

	mkdir -p "$subpkgdir"/usr/share/burp/scripts
	mv "$pkgdir"/usr/share/burp/scripts "$subpkgdir"/usr/share/burp
	rm -rf "$pkgdir"/usr/share

	mkdir -p "$subpkgdir"/etc/burp
	mv "$pkgdir"/etc/burp/CA.cnf "$subpkgdir"/etc/burp/CA.cnf
	mv "$pkgdir"/etc/burp/burp-server.conf \
		"$subpkgdir"/etc/burp/burp-server.conf

	install -Dm755 "$srcdir"/burp.init "$subpkgdir"/etc/init.d/burp

	mkdir -p "$subpkgdir"/usr/bin
	local name; for name in bedup bsigs bsparse burp_ca vss_strip; do
		mv "$pkgdir"/usr/bin/$name "$subpkgdir"/usr/bin/$name
	done
}

sha512sums="
e2f4a922dd93ed4312839bd8bc0070d09ad2626fdc7ed6b7917d05012254b6b5695f8fa9c5b1166fceb9aabee5b7019fe1943913d37ef2f022d881c5aaffd9d0  2.5.4.zip
ef98c1fb938063fee35cc5ae5ff9179a759b89b3c2629320ff4dffb4c42395cac1ad6b4615c6c1f34cc4be3ce54397b00f583ba5f3cd2fe8498902d4d9445e8f  burp.init
"