wok-next diff snort-mysql/receipt @ rev 20677

Up libsigsegv (2.12); add libseccomp
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 15 00:56:38 2018 +0300 (2018-05-15)
parents d43bf7aae921
children cd7906120828
line diff
     1.1 --- a/snort-mysql/receipt	Wed Mar 21 15:58:17 2018 +0200
     1.2 +++ b/snort-mysql/receipt	Tue May 15 00:56:38 2018 +0300
     1.3 @@ -1,36 +1,34 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="snort-mysql"
     1.8  VERSION="2.9.4"
     1.9  CATEGORY="network"
    1.10 -SHORT_DESC="Network intrusion prevention and detection system (IDS/IPS) with MySQL support."
    1.11 +SHORT_DESC="Network intrusion prevention and detection system (IDS/IPS) with \
    1.12 +MySQL support"
    1.13  MAINTAINER="pascal.bellard@slitaz.org"
    1.14  LICENSE="GPL2"
    1.15 +WEB_SITE="http://www.snort.org/"
    1.16 +
    1.17  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.18 -WEB_SITE="http://www.snort.org/"
    1.19  WGET_URL="http://www.snort.org/downloads/1207"
    1.20 -DEPENDS="pcre libdnet libdaq libmysqlclient"
    1.21 +
    1.22  BUILD_DEPENDS="pcre-dev libpcap-dev libdaq-dev libdnet-dev zlib-dev \
    1.23  mysql-dev flex"
    1.24  
    1.25 -# Rules to configure and make the package.
    1.26 -compile_rules()
    1.27 -{
    1.28 +compile_rules() {
    1.29  	./configure \
    1.30 -		--prefix=/usr \
    1.31  		--with-mysql \
    1.32  		--enable-dynamicplugin \
    1.33  		--enable-perfprofiling \
    1.34  		--enable-zlib \
    1.35  		--enable-reload \
    1.36  		$CONFIGURE_ARGS &&
    1.37 +	fix libtool &&
    1.38  	make &&
    1.39  	make DESTDIR=$DESTDIR install
    1.40  }
    1.41  
    1.42 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.43 -genpkg_rules()
    1.44 -{
    1.45 +genpkg_rules() {
    1.46  	mkdir -p \
    1.47  		$fs/usr/lib \
    1.48  		$fs/etc/snort/rules \
    1.49 @@ -41,16 +39,15 @@
    1.50  	cp -a $install/usr/lib/snort_dynamic* $fs/usr/lib
    1.51  
    1.52  	cp -a $src/etc/*.conf* $fs/etc/snort
    1.53 -	cp -a $src/etc/*.map $fs/etc/snort
    1.54 +	cp -a $src/etc/*.map   $fs/etc/snort
    1.55  	cp -a $src/schemas/create_mysql  $fs/usr/share/snort/schemas
    1.56  
    1.57  	# Remove unwanted files
    1.58  	rm -f $fs/usr/lib/*/*.*a
    1.59 +	DEPENDS="pcre libdnet libdaq libmysqlclient"
    1.60  }
    1.61  
    1.62 -# Post install commands
    1.63 -post_install()
    1.64 -{
    1.65 +post_install() {
    1.66  	local db_name=snort
    1.67  	local db_pass=snort
    1.68  	local db_schema=/usr/share/snort/create_mysql
    1.69 @@ -59,22 +56,18 @@
    1.70  
    1.71  	# addgroup snort if needed
    1.72  	if ! grep -q snort "$1/etc/group"; then
    1.73 -		action 'Adding group snort...'
    1.74  		chroot "$1/" /bin/addgroup snort
    1.75 -		status
    1.76  	fi
    1.77  	# adduser snort if needed
    1.78  	if ! grep -q 'snort:' "$1/etc/passwd"; then
    1.79 -		action 'Adding user snort...'
    1.80  		chroot "$1/" /bin/adduser -s /bin/false -h /dev/null \
    1.81  			-g "Snort Daemon user" -H -D -S -G snort snort
    1.82 -		status
    1.83  	fi
    1.84  	chroot "$1/" chown snort.snort /var/log/snort 
    1.85  
    1.86  	# Create database
    1.87  	if [ -z "$1" ]; then
    1.88 -		if ( ! mysqladmin -s ping > /dev/null ); then
    1.89 +		if ( ! mysqladmin -s ping >/dev/null ); then
    1.90  			echo 'Starting MySQL server'
    1.91  			( /etc/init.d/mysql start ; status  ) || exit
    1.92  			sleep 4 #let the mysql daemon start