updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / barnyard / PKGBUILD
blobaeffc2945a189fdf1496a3f415fe3e57540ba3c5
1 # Maintainer: CRT<crt.011@gmail.com>
2 pkgname=barnyard
3 pkgver=0.2.0
4 pkgrel=2
5 pkgdesc="Output spool reader for Snort"
6 arch=('i686' 'x86_64')
7 url="http://barnyard.sourceforge.net"
8 license=('QPL')
9 options=(docs)
10 install=barnyard.install
11 source=("http://sourceforge.net/projects/barnyard/files/barnyard-0.2/${pkgver}/${pkgname}-${pkgver}.tar.gz"
12         "https://github.com/variablenix/patch/raw/master/barnyard.mysql.patch"
13         "http://snort.org/users/jbrvenik/Site/Code_files/barnyard.64bit.diff")
14 sha512sums=('73424acf2e0c620b2f8f2f407d74812f7740234ce523e37557273998108c131311fffb16cfc2cea0f652d6b21072431081bad35b045f5654e2245786d27568e6'
15             '563972d84f1c7e95257d73f6d72cf9e58e69e625b4e84a3f3717fd8bae81794f64325e8335b6ee9cf39ee9d90ebcdfde48a57ecdc5b309db95b67004c8a236e0'
16                   'f445a91759b0a1f72588f5be27ecf5bb016f01c7ce30380c2e3026c304d45eb122616d5bf4905f4ec9aebd48fa3267223be6e08092ba3d50c58663be63e36a14')
18 build() {
19   cd "${srcdir}/${pkgname}-${pkgver}"
20   
21   # Patch prevents Barnyard process to end when MySQL reconnects
22   patch -Np1 -i ../barnyard.mysql.patch
24   # For x86_64, Barnyard 0.2.0 needs to be patched or it will get errors when trying to read snort files
25   if [[ "$CARCH" == x86_64 ]] 
26   then
27     patch -Np1 -i ../barnyard.64bit.diff 
28   fi
30   ./configure --prefix=/usr --sysconfdir=/etc --enable-mysql
31   make 
34 package() {
35   cd "${srcdir}/${pkgname}-${pkgver}"
36   make DESTDIR="${pkgdir}/" install 
37   install -d "${pkgdir}"/etc
38   install -m644 "${srcdir}/${pkgname}-${pkgver}"/etc/barnyard.conf "${pkgdir}"/etc
39   install -D -m644 LICENSE.QPL "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE.QPL
42 # vim:set ts=2 sw=2 et: