summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorM0Rf302021-06-06 02:10:50 +0200
committerM0Rf302021-06-06 02:10:50 +0200
commite114d0e3338a86e0e691fa987a081ac317b26d68 (patch)
tree9d3e6ecf4e7eff2a8ef24a9564d878cf19bf4ed9 /PKGBUILD
parent84051937543fac114ccea3cca55081a7798a8898 (diff)
downloadaur-e114d0e3338a86e0e691fa987a081ac317b26d68.tar.gz
snort: 3.1.5.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD83
1 files changed, 44 insertions, 39 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 65d076a4d51d..fcd67dcd7761 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,59 +7,64 @@
# Contributor: Netboy3
pkgname=snort
-pkgver=2.9.17.1
+_pkgname=snort3
+_openappid=17843
+pkgver=3.1.5.0
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')
+depends=('flatbuffers' 'gperftools' 'hwloc' 'hyperscan' 'libdaq' 'libdnet' 'libmnl' 'libpcap' 'libunwind' 'luajit' 'lz4' 'openssl' 'pcre' 'pulledpork' 'xz' 'zlib')
+makedepends=('cmake' 'pkgconf')
+backup=('etc/snort/snort.lua'
+ 'etc/snort/snort_defaults.lua'
+ 'etc/snort/local.lua'
+ 'etc/snort/homenet.lua'
+ 'etc/snort/rules/local.rules'
+ 'etc/snort/rules/snort.rules'
+ 'etc/logrotate.d/snort')
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'
-)
+source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/snort3/snort3/archive/refs/tags/${pkgver}.tar.gz"
+ "snort-openappid-${_openappid}.tar.gz::https://snort.org/downloads/openappid/${_openappid}"
+ 'local.lua'
+ 'snort.logrotate'
+ 'snort.sysusers'
+ 'snort.tmpfiles'
+ '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
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ ./configure_cmake.sh --prefix=/usr --enable-tcmalloc --with-daq-libraries=/usr/lib/daq/ --disable-static-daq
+ make -C build
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ make -C build DESTDIR="${pkgdir}" install
- make DESTDIR="${pkgdir}" install
+ mv "${pkgdir}"{/usr,}/etc
+ install -D -m644 "${srcdir}"/local.lua "${pkgdir}"/etc/snort
+ install -D -m644 "${srcdir}"/snort.logrotate "${pkgdir}"/etc/logrotate.d/snort
+ install -D -m644 "${srcdir}"/snort.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/snort.conf
+ install -D -m644 "${srcdir}"/snort.sysusers "${pkgdir}"/usr/lib/sysusers.d/snort.conf
+ install -D -m644 "${srcdir}"/snort.service "${pkgdir}"/usr/lib/systemd/system/snort.service
+ install -D -m644 /dev/null "${pkgdir}"/etc/snort/rules/snort.rules
+ echo "HOME_NET = [[ 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ]]" >"${pkgdir}"/etc/snort/homenet.lua
+ echo -e '#pulledpork will put rules here in snort.rules\n#alert icmp any any -> any any ( msg:"ICMP Traffic Detected"; sid:10000001; metadata:policy security-ips alert; )' >"${pkgdir}"/etc/snort/rules/local.rules
+ chmod 0644 "${pkgdir}"/etc/snort/{homenet.lua,rules/{local,snort}.rules}
- mkdir -p "${pkgdir}/"{etc/rc.d,etc/snort/rules}
+ # OpenAppID files
+ install -d -m755 "${pkgdir}"/usr/lib/openappid/custom/{libs,lua,port}
+ cp -a --no-preserve=ownership -t "${pkgdir}"/usr/lib/openappid/ "${srcdir}"/odp
- install -d -m755 "${pkgdir}/var/log/snort"
- install -D -m644 etc/{*.conf*,*.map} "${pkgdir}/etc/snort/"
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # 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"
}
-sha256sums=('303d3d5dc5affecfeaad3a331d3163f901d48d960fdd6598cb55c6d1591eed82'
- 'SKIP'
- '0b7c4e5dfbfe53d2258c54129a6fcd1e6a476a8d4259d5ad7372f6229fb30605')
+sha256sums=('9209ca675c55e1c9dee1cb15e571b29c317f6e167b54f22e7bc18a6164218b1b'
+ 'd6bbe298648a095f4d4f3ff8806333143f4607fbb9f006388db055e14c5af57d'
+ '9fa50b961c034a694d840036c5682b21bcfe55bf9faf17602878d7db719299da'
+ '1be3b4e25138a3696be07929d455ca84bb4eddbee5f596ae636188d49309c7f6'
+ 'ae3245c5de527fb487c459f2f4a9c78803ae6341e9c81b9a404277679cdee051'
+ 'bc4a02d184601faba5cd0f6cb454097a3b04a0c8fe56f5f8b36d24513484faa2'
+ 'e1ff858e2cb062d76f72757746c4f87410151b06221255ca827b7279fee0d5df')