APKBUILD 1.7 KB
Newer Older
1 2 3 4
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=captagent
pkgver=6.1.0.20
5
pkgrel=4
6 7 8 9 10 11 12 13 14 15 16
pkgdesc="HEP Capture Agent for HOMER"
url="https://github.com/sipcapture/captagent"
arch="all"
license="GPL3"
makedepends="autoconf automake bison expat-dev flex flex-dev json-c-dev libtool libpcap-dev linux-headers"
source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/captagent/archive/$pkgver.tar.gz
        $pkgname.initd
        0001-Define-PATH_MAX-if-not-defined.patch
        ac-fix.patch"
builddir="$srcdir/$pkgname-$pkgver"

17 18 19 20 21 22 23 24 25 26 27 28
prepare() {
	cd "$builddir"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
build() {
	cd "$builddir" && ./build.sh && ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc &&
		make
}

package() {
	cd "$builddir" && make install DESTDIR="$pkgdir" && \
		install -D "$srcdir"/$pkgname.initd \
			"$pkgdir"/etc/init.d/$pkgname && \
		rm "$pkgdir"/usr/lib/$pkgname/modules/*.a
}

sha512sums="b867a41dfe98015f01fa8c67e57214754231eeec40d0685983fca9aacf53cc5287c2c9959f4752c80004ad5abc2e8a96058797b6b7cdc259a48443c1a909b609  captagent-6.1.0.20.tar.gz
750326291fc65fa9a3568f6961f2d6b950baa715e75ad7fc8263956cc91c50445e2e041d8f73675a350ba0d55786908564b439396376d8105fb69332e8aefc27  captagent.initd
f7c04f5e273dd362f09fd1e6a605f56dcaf64c71cd0d6ba16dadaca5e005b1f29dccd81b186c3727d2fc7872bd684ca4ddc8fc7a2a36fd83956592a134ea6a37  0001-Define-PATH_MAX-if-not-defined.patch
c0bbbbf2f96c7644b154e71b672af5a0d7c209dd5b309b6f6b35915a04f30a33ff4fc18e408e3f1641d4ca6ae51430f9ac0189984f828353263fb52e985b47c1  ac-fix.patch"