wok view barnyard2/receipt @ rev 24765
afpfs-ng,btfs,curlftpfs,ddumbfs,djmount,encfs,exfat-utils,fusecloop,fusedav,fuseiso,httpfs2-fuse: try fuse2
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 18 17:45:47 2022 +0000 (2022-03-18) |
parents | 5ea0ce1cecc0 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="barnyard2"
4 VERSION="2.1.13"
5 CATEGORY="system-tools"
6 SHORT_DESC="Output spool reader for Snort"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://github.com/firnsy/barnyard2"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://github.com/firnsy/$PACKAGE/archive/v${VERSION/./-}/$TARBALL"
14 DEPENDS="libpcap"
15 BUILD_DEPENDS="libpcap-dev libtool"
17 current_version()
18 {
19 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
20 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;s|-|.|g;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 sed -i 's|typedef int SOCKET|// &|' src/output-plugins/spo_alert_fwsam.c
27 ./autogen.sh &&
28 ./configure \
29 --sysconfdir=/etc/barnyard2 \
30 $CONFIGURE_ARGS &&
31 make &&
32 make install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 cp -a $install/* $fs
39 mkdir -p $fs/var/log/barnyard2
40 }
42 # Post install commands
43 post_install()
44 {
45 [ -z "$quiet" ] && echo
47 # addgroup snort if needed
48 if ! grep -q 'snort:' "$1/etc/group"; then
49 action 'Adding group Snort...'
50 chroot "$1/" /bin/addgroup snort
51 status
52 fi
54 # adduser snort if needed
55 if ! grep -q 'snort:' "$1/etc/passwd"; then
56 action 'Adding user Snort...'
57 chroot "$1/" /bin/adduser -s /bin/false -h /dev/null \
58 -g "Snort Daemon user" -H -D -S -G snort snort
59 status
60 fi
62 chroot "$1/" chown snort.snort /var/log/barnyard2
63 }