summaryrefslogtreecommitdiff
path: root/community/snort/PKGBUILD
blob: 63477fdaccb00d1c5506f3df42481c91b037e6fc (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
# $Id: PKGBUILD 74195 2012-07-22 19:47:59Z lfleischer $
# Maintainer: 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.3
pkgrel=1
pkgdesc='A lightweight network intrusion detection system.'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.snort.org'
license=('GPL')
depends=('libdaq' 'libdnet' 'libpcap' 'pcre' 'zlib')
makedepends=('ca-certificates')
backup=('etc/conf.d/snort'
        'etc/snort/snort.conf'
        'etc/snort/threshold.conf'
        'etc/snort/confreference.config'
        'etc/snort/classification.config')
options=('!makeflags' '!libtool')
install='snort.install'
source=("http://www.snort.org/dl/snort-current/${pkgname}-${pkgver}.tar.gz"{,.sig}
        'snort'
        'snort.conf.d')
md5sums=('e128f5d5d14dad335dc0c549c7fe2e98'
         '8f8689efad6338ca76c344366c97d4ea'
         '361b8b9e40b9af0164f6b3e3da2e8277'
         'b4fb8a68490589cd34df93de7609bfac')

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

  ./configure --prefix=/usr --sysconfdir=/etc/snort --with-libpcap-includes=/usr/include/pcap \
              --without-mysql --without-postgresql --without-oracle --without-odbc --enable-zlib \
              --enable-ipv6
  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/"
  install -D -m644 "${srcdir}/snort.conf.d" "${pkgdir}/etc/conf.d/snort"
  install -D -m755 "${srcdir}/snort" "${pkgdir}/etc/rc.d/snort"

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