summaryrefslogtreecommitdiff
path: root/pcr/barnyard2/PKGBUILD
blob: ff8837c2c7698cbcc74fbce26b8c3bc74b430354 (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
# Contributor: Commiebstrd<spenserreinhardt@gmail.com>
# Maintainer: Aurélien Desbrières <aurelien@hackers.camp>

pkgname=barnyard2
pkgver=2
pkgrel=1.13
pkgdesc="A dedicated spooler for Snort's unified2 binary output format."
arch=('i686' 'x86_64')
url="http://www.securixlive.com/barnyard2/index.php"
license=('GPL2')
depends=('libmariadbclient' 'libpcap')
optdepends=("snort: IPS\IDS detection solution" "suricata: Multi-threaded IPS\IDS")
source=("https://github.com/firnsy/${pkgname}/archive/v${pkgver}-${pkgrel}.tar.gz")

build() {

  # move to correct dir
  cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}"

  #autoconf, config, and make  
  ./autogen.sh
  ./configure --with-mysql --prefix=/usr --sysconfdir=/etc
  make

}

check() {

  cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}"

  # verify everything will work with whats installed
  make check

}

package() {

  cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}"

  make DESTDIR="${pkgdir}" install
  
  cd "${pkgdir}"
  mkdir "var/log/$pkgname" -p

  #file permission mods and creation of initial .waldo file
  touch "var/log/${pkgname}/${pkgname}.waldo"
  chmod 664 "var/log/${pkgname}/${pkgname}.waldo"
  chmod 664 "etc/${pkgname}.conf"
  chmod 554 "usr/bin/${pkgname}"

}