summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ebdd52a2f9950505aa672d2c9093977d5d836026 (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
# Maintainer: robertfoster
# Contributor: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>

pkgname=snort
pkgver=2.9.14.1
pkgrel=1
pkgdesc='A lightweight network intrusion detection system.'
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64' 'arm')
url='http://www.snort.org'
license=('GPL')
depends=('dbus' 'libdaq' 'libdnet' 'libgcrypt' 'libgpg-error' 'libnghttp2' 'libnl' 'libpcap' 'luajit' 'lz4' 'openssl' 'pcre' 'xz' 'zlib')
makedepends=('libtirpc')
backup=('etc/snort/snort.conf'
	'etc/snort/threshold.conf'
	'etc/snort/reference.config'
	'etc/snort/classification.config'
'etc/snort/rules/emerging.conf')
options=('!makeflags' '!libtool')
install='snort.install'
source=("https://www.snort.org/downloads/snort/${pkgname}-${pkgver}.tar.gz"
	"http://rules.emergingthreats.net/open/${pkgname}-2.9.0/emerging.rules.tar.gz"
'snort@.service')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure --prefix=/usr --sysconfdir=/etc/snort --with-libpcap-includes=/usr/include/pcap \
		--with-daq-includes=/usr/include --with-daq-libraries=/usr/lib/daq/ \
		--disable-static-daq \
		CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc/"
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"

	make DESTDIR="${pkgdir}" install

	mkdir -p "${pkgdir}/"{etc/rc.d,etc/snort/rules}

	install -d -m755 "${pkgdir}/var/log/snort"
	install -D -m644 etc/{*.conf*,*.map} "${pkgdir}/etc/snort/"

	# init service file
	install -D -m644 ../snort@.service $pkgdir/usr/lib/systemd/system/snort@.service

	sed -i 's#/usr/local/lib/#/usr/lib/#' "${pkgdir}/etc/snort/snort.conf"

	# emerginthreats rules
	echo 'include $RULE_PATH/emerging.conf' >> "${pkgdir}/etc/snort/snort.conf"
	cp ${srcdir}/rules/* "${pkgdir}/etc/snort/rules"
}

md5sums=('009254a9797ec93321c5936b99dcd6c8'
	'SKIP'
'a847030a34396e6b2d1cacd272ad42da')