aboutsummaryrefslogtreecommitdiffstats
path: root/community/rtpengine/APKBUILD
blob: 96114d6f98a06690e2db867864c4549785471d74 (plain) (blame)
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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=rtpengine
pkgver=9.0.1.10
pkgrel=0
pkgdesc="Proxy for RTP traffic and other UDP based media traffic"
url="https://github.com/sipwise/rtpengine"
arch="all"
license="GPL-3.0-only"
makedepends="
	curl-dev
	ffmpeg-dev
	gperf
	glib-dev
	hiredis-dev
	iptables-dev
	json-glib-dev
	libevent-dev
	libpcap-dev
	mariadb-dev
	openssl-dev
	pcre-dev
	perl
	spandsp-dev
	xmlrpc-c-dev
	zlib-dev
	"
# checkdepends="perl-bencode perl-net-interface perl-socket6"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc $pkgname-recording"
pkgusers="rtpengine"
pkggroups="rtpengine"
source="$pkgname-$pkgver.tar.gz::https://github.com/sipwise/rtpengine/archive/mr$pkgver.tar.gz
	$pkgname.initd

	disable-O3.patch
	fix-default-config.patch
	"
builddir="$srcdir"/$pkgname-mr$pkgver

build() {
	make
}

# TODO: There's a real test suite available,
# but some needed packages are missing
check() {
	./daemon/rtpengine --version
	# make check
}

package() {
	install -Dm644 LICENSE "$pkgdir"/usr/share/doc/$pkgname/LICENSE

	install -Dm755 daemon/rtpengine "$pkgdir"/usr/bin/rtpengine
	install -Dm644 etc/${pkgname}.sample.conf "$pkgdir"/etc/rtpengine/rtpengine.conf
	install -Dm755 "$srcdir"/${pkgname}.initd "$pkgdir"/etc/init.d/$pkgname
	ln -s rtpengine "$pkgdir"/etc/init.d/${pkgname}-recording

	install -d "$pkgdir"/usr/share/man/man1
	gzip -c daemon/rtpengine.8 > "$pkgdir"/usr/share/man/man1/rtpengine.1.gz
	gzip -c recording-daemon/rtpengine-recording.8 \
		> "$pkgdir"/usr/share/man/man1/rtpengine-recording.1.gz

	install -Dm755 iptables-extension/libxt_RTPENGINE.so \
		"$pkgdir"/usr/lib/xtables/libxt_RTPENGINE.so
}

recording() {
	depends="$pkgname"

	install -Dm755 "$builddir"/recording-daemon/rtpengine-recording \
		"$subpkgdir"/usr/bin/rtpengine-recording
	install -Dm644 "$builddir"/etc/rtpengine-recording.sample.conf \
		"$subpkgdir"/etc/$pkgname/rtpengine-recording.conf

	local dir
	for dir in lib spool; do
		install -d -o rtpengine -g rtpengine "$subpkgdir"/var/$dir/$pkgname
	done
}

sha512sums="ee870f0cc1f3a2b860dcb9a0e8519c535c5fc82efc2ef75022e3f09bcc75df2d9024390f474765d5a711ee1e0af90441764649f14c98d1c8b3ab2e93ab7423da  rtpengine-9.0.1.10.tar.gz
a696277b8ef477420db13e4628818b728f318a8ba52f727ce8b7969f5f0182f9389f3b931eb4542ce1fe1a6fbc4dcdc3d6959090de76b1981f434b3fafebc224  rtpengine.initd
9e59d1e1507abc139c016d218e496919bc7053d143b3220753fe7a7b350bbf74facc2f43cbaf8f0b47984608a1fead7171270b0c06d2c866e5b21cf2a94da81d  disable-O3.patch
a86f896955cb06252c81abaffd362f999a0a4f38dbafb34739015f787bbd966adba1e4e3232edf562a38415a4f69c4b21d62745cb7ef8e730d0259f098765685  fix-default-config.patch"