wok annotate 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 |
rev | line source |
---|---|
erjo@11427 | 1 # SliTaz package receipt. |
erjo@11427 | 2 |
erjo@11427 | 3 PACKAGE="barnyard2" |
Hans-G?nter@20739 | 4 VERSION="2.1.13" |
pascal@13026 | 5 CATEGORY="system-tools" |
erjo@11427 | 6 SHORT_DESC="Output spool reader for Snort" |
erjo@11427 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15002 | 8 LICENSE="GPL2" |
Hans-G?nter@20739 | 9 WEB_SITE="https://github.com/firnsy/barnyard2" |
Hans-G?nter@20739 | 10 |
erjo@11427 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@20739 | 12 WGET_URL="https://github.com/firnsy/$PACKAGE/archive/v${VERSION/./-}/$TARBALL" |
erjo@11427 | 13 |
erjo@11427 | 14 DEPENDS="libpcap" |
Hans-G?nter@20741 | 15 BUILD_DEPENDS="libpcap-dev libtool" |
erjo@11427 | 16 |
pascal@24055 | 17 current_version() |
pascal@24055 | 18 { |
pascal@24299 | 19 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \ |
pascal@24055 | 20 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;s|-|.|g;q' |
pascal@24055 | 21 } |
pascal@24055 | 22 |
erjo@11427 | 23 # Rules to configure and make the package. |
erjo@11427 | 24 compile_rules() |
erjo@11427 | 25 { |
pascal@23882 | 26 sed -i 's|typedef int SOCKET|// &|' src/output-plugins/spo_alert_fwsam.c |
Hans-G?nter@20740 | 27 ./autogen.sh && |
al@18668 | 28 ./configure \ |
al@18668 | 29 --sysconfdir=/etc/barnyard2 \ |
al@18668 | 30 $CONFIGURE_ARGS && |
Hans-G?nter@20739 | 31 make && |
Hans-G?nter@20739 | 32 make install |
erjo@11427 | 33 } |
erjo@11427 | 34 |
erjo@11427 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@11427 | 36 genpkg_rules() |
erjo@11427 | 37 { |
erjo@11427 | 38 cp -a $install/* $fs |
al@18668 | 39 mkdir -p $fs/var/log/barnyard2 |
erjo@11427 | 40 } |
erjo@11427 | 41 |
erjo@11427 | 42 # Post install commands |
erjo@11427 | 43 post_install() |
erjo@11427 | 44 { |
al@18668 | 45 [ -z "$quiet" ] && echo |
erjo@11427 | 46 |
al@18668 | 47 # addgroup snort if needed |
al@18668 | 48 if ! grep -q 'snort:' "$1/etc/group"; then |
al@18668 | 49 action 'Adding group Snort...' |
al@18668 | 50 chroot "$1/" /bin/addgroup snort |
al@18668 | 51 status |
al@18668 | 52 fi |
erjo@11427 | 53 |
al@18668 | 54 # adduser snort if needed |
pascal@18730 | 55 if ! grep -q 'snort:' "$1/etc/passwd"; then |
al@18668 | 56 action 'Adding user Snort...' |
al@18668 | 57 chroot "$1/" /bin/adduser -s /bin/false -h /dev/null \ |
al@18668 | 58 -g "Snort Daemon user" -H -D -S -G snort snort |
al@18668 | 59 status |
al@18668 | 60 fi |
al@18668 | 61 |
al@18668 | 62 chroot "$1/" chown snort.snort /var/log/barnyard2 |
erjo@11427 | 63 } |