aboutsummaryrefslogtreecommitdiffstats
path: root/testing/captagent/APKBUILD
blob: 4e5b14de0cef3601cfdcd0c932b37836ef54e846 (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=captagent
pkgver=6.0.1
pkgrel=1
pkgdesc="Standalone agent for HOMER, a SIP capture and monitoring system"
url="https://github.com/sipcapture/captagent"
arch="x86 x86_64"
license="GPL3"
depends=
depends_dev=
makedepends="$depends_dev autoconf automake libtool bison libpcap-dev flex 
	flex-dev flex-libs json-c-dev linux-headers expat-dev"
install=
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/captagent/archive/v$pkgver.tar.gz
	build.patch
	default-config.patch
	captagent.initd
	"


_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
			*.patch)
				msg "Applying $i"
				patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
	./build.sh
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	install -D -m0664 "$_builddir"/conf/database_hash.xml \
		"$pkgdir"/etc/captagent/database_hash.xml
	libtool --finish "$pkgdir"/usr/lib/captagent/modules

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

md5sums="d4039723cc7ea66c33d911ae1d0f182a  captagent-6.0.1.tar.gz
fa80597864c1d0f2078780578cce4e71  build.patch
65c7c46864ebff66ccd25033a6e195fd  default-config.patch
e08448976f57ef7dd80c628e1e4866a4  captagent.initd"
sha256sums="88e92a0d71b7d39fcbd52e947a98f42f62a54dc94ad857c68f9b05349b5409ec  captagent-6.0.1.tar.gz
7f80b504d6d281d6727ffa65f87dff53a7c36c0144cd6fb0ec37863fee53d091  build.patch
37cce9bed56e29621ab8fdd1f1819744823cfcc6cb155d799b2180e2e0f3b0e3  default-config.patch
a32508e6908f95975571cb471dbc79e64678ef26a06925ffa88bbb3d519a53a3  captagent.initd"
sha512sums="ef78bb2bb0f8c72b54116ec2757e0b604b21010161526c4223c2159b2e37c6526b5ebe8eeea7c553f3550c082797894fe3673381e07e0b927627f70d7ebfbef0  captagent-6.0.1.tar.gz
b7188f5f14aadad7bbbb1819b40c245eb5e5f4cc5b92582771bf9f494630b1e39d5c3cb8e51ef250b55ed40309c3e38d2be8281b0b998b2613ca8a168808a746  build.patch
0808b9a2564618f2a7df695101cb713929ae52a77df4709608d4e6e8e38d3cadb75770575d2275347eda0d0521a695ed71785f833459e838ad73b4525d5a10b0  default-config.patch
ab9055cbaa8fffc9ab7fec3f12438350283ab8f039ada7589bbfa1d07c81dac142a7ee46f11652d2a1fc8c9ecb4eb771dcf3f4cd46c5174f215ac6647c6eaafe  captagent.initd"