summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurelien <aurelien@xload.io>2014-05-30 18:57:54 +0200
committeraurelien <aurelien@xload.io>2014-05-30 18:57:54 +0200
commit1268a835f7fb7c40ed82d8be26c05614d1ea3cdc (patch)
tree5a388e649913178a988cb2e1e0b7702b41c9336e
parent494000bf5b23862160c9c1cd2a64e49031e8079e (diff)
downloadabslibre-1268a835f7fb7c40ed82d8be26c05614d1ea3cdc.tar.gz
abslibre-1268a835f7fb7c40ed82d8be26c05614d1ea3cdc.tar.bz2
abslibre-1268a835f7fb7c40ed82d8be26c05614d1ea3cdc.zip
barnyard2
-rw-r--r--pcr/barnyard2/PKGBUILD69
1 files changed, 38 insertions, 31 deletions
diff --git a/pcr/barnyard2/PKGBUILD b/pcr/barnyard2/PKGBUILD
index 47b16d3ab..15fd5655a 100644
--- a/pcr/barnyard2/PKGBUILD
+++ b/pcr/barnyard2/PKGBUILD
@@ -1,44 +1,51 @@
-# Contributor (Arch): Commiebstrd<spenserreinhardt@gmail.com>
-# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+# Contributor: Commiebstrd<spenserreinhardt@gmail.com>
+# Maintainer : Parabola Aurélien DESBRIÈRES <aurelien@hackers.camp>
pkgname=barnyard2
-pkgver=1
-pkgrel=9
-pkgdesc="Barnyard2 is a fork of the original barnyard project, designed specifically for Snort's new unified2 file format. Barnyard2 is under active development and continues to adapt based on user feedback."
+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=('GPLv2')
-depends=('snort' 'mysql')
-source=("http://www.securixlive.com/download/${pkgname}/${pkgname}-${pkgver}.${pkgrel}.tar.gz")
+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")
-package() {
+build() {
- #configures and makes package
- cd "${srcdir}/${pkgname}-${pkgver}.${pkgrel}"
- ./configure --with-mysql
- make
- make DESTDIR="${pkgdir}" install
-
- #makes dir for /etc locations
- mkdir "${pkgdir}/etc" -p
+ # move to correct dir
+ cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}"
+
+ #autoconf, config, and make
+ ./autogen.sh
+ ./configure --with-mysql --prefix=/usr --sysconfdir=/etc
+ make
+
+}
+
+check() {
- #makes dirs for /var locations
- mkdir "${pkgdir}/var" -p
- mkdir "${pkgdir}/var/log" -p
- mkdir "${pkgdir}/var/log/$pkgname" -p
+ cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}"
- #makes /usr/bin, /usr should already be made from make\make install
- mkdir "${pkgdir}/usr/bin"
+ # verify everything will work with whats installed
+ make check
- #copy barnyard2.conf to /etc/barnyard2.conf and executable to /usr/bin/
- cp "${pkgdir}/usr/local/etc/$pkgname.conf" "${pkgdir}/etc/"
- cp "${pkgdir}/usr/local/bin/$pkgname" "${pkgdir}/usr/bin/"
+}
+
+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
- chmod 666 "${pkgdir}/var/log/$pkgname"
- touch "${pkgdir}/var/log/$pkgname/$pkgname.waldo"
- chown snort.snort "${pkgdir}/var/log/$pkgname/$pkgname.waldo"
+ touch "var/log/${pkgname}/${pkgname}.waldo"
+ chmod 664 "var/log/${pkgname}/${pkgname}.waldo"
+ chmod 664 "etc/${pkgname}.conf"
+ chmod 554 "usr/bin/${pkgname}"
- #not needed since conf is copied to /etc/ and barnyard is sent to /usr/bin
- rm -rf "${pkgdir}/usr/local/"
}