aboutsummaryrefslogtreecommitdiffstats
path: root/community/suricata/APKBUILD
blob: 35aa026d6064b8190ca69fddcb00b58f98e75a50 (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
# Contributor: Steve McMaster <code@mcmaster.io>
# Maintainer: Steve McMaster <code@mcmaster.io>
pkgname=suricata
pkgver=4.0.4
pkgrel=0
pkgdesc="High performance Network IDS, IPS and Network Security Monitoring engine"
url="https://suricata-ids.org/"
# luajit is not available for disabled arches
arch="all !s390x"
license="GPL-2.0"
makedepends="automake autoconf libtool libhtp-dev>=0.5.25 libcap-ng-dev
	file-dev luajit-dev geoip-dev pcre-dev yaml-dev libpcap-dev hiredis-dev
	libnet-dev libnetfilter_queue-dev libnfnetlink-dev jansson-dev python2
	nss-dev nspr-dev"
subpackages="$pkgname-doc"
source="http://www.openinfosecfoundation.org/download/$pkgname-$pkgver.tar.gz
	$pkgname.confd
	$pkgname.initd
	$pkgname.logrotate
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	autoreconf -vif
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-non-bundled-htp \
		--enable-nfqueue \
		--disable-gccmarch-native \
		--enable-hiredis \
		--enable-geoip \
		--enable-gccprotect \
		--enable-pie \
		--enable-luajit
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	make DESTDIR="$pkgdir" install-full

	cd "$srcdir"
	install -D -m 755 $pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -D -m 644 $pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -D -m 644 $pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
}
sha512sums="6e158aa6d3edb9d11e0df3f986392ee2ae49ab4dfb978288ced4484dbe5c08ae061db2a566be6d22cf14bd0b88f87f9cb9c0a657d7fc44e099b8783d933c771e  suricata-4.0.4.tar.gz
ed7c78a80192f3f3ed433330df323beccb6079b5413289b9e9faa3fceea2c536de93de7372968d8605abd1618d73c9319ee39d86b16eed22e7313c8667252f5d  suricata.confd
258c6d60fc878dc1c7b7bf93cc758080050f591084a1edf7f1aac81ccb523c73615716616fedd0269f9ac5ef2fa7adcb3e2cefd714754bac5571e9806b6781be  suricata.initd
4f76a35bcde78c9860701897fe19bb84cc46bbc429124c4cb2e94cf3330f00ebe8067c0d7f3f83478e9b95323adb947e5081658f455657c4d03c682abe707534  suricata.logrotate"