wok diff shell-detector/receipt @ rev 14835

xfce4-session: remove wrong trigger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 17 15:47:34 2013 +0200 (2013-07-17)
parents
children 3b4e4318134e
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/shell-detector/receipt	Wed Jul 17 15:47:34 2013 +0200
     1.3 @@ -0,0 +1,66 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="shell-detector"
     1.7 +VERSION="current"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Web shell detection tool."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://www.emposha.com/security/php-shell-detector-web-shell-detection-tool.html"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.13 +#WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master"
    1.14 +WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git"
    1.15 +
    1.16 +DEPENDS="php"
    1.17 +BUILD_DEPENDS="git"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	cd $src
    1.23 +}
    1.24 +
    1.25 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.26 +genpkg_rules()
    1.27 +{
    1.28 +	mkdir -p $fs/usr/share/$PACKAGE
    1.29 +	cp -a $src/* $fs/usr/share/$PACKAGE
    1.30 +	ln -s shelldetect.php $fs/usr/share/$PACKAGE/index.php
    1.31 +	chown -R www.www $fs/usr/share/$PACKAGE
    1.32 +}
    1.33 +
    1.34 +post_install()
    1.35 +{
    1.36 +	# Configure lighttpd server
    1.37 +	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
    1.38 +		if ! grep -q /usr/share/phpsysinfo/ $1/etc/lighttpd/lighttpd.conf; then
    1.39 +	    		sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",|    \"/examples/\" => \"/usr/share/examples/\",\\n    \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i $1/etc/lighttpd/lighttpd.conf
    1.40 +			if [ -z "$1" ]; then
    1.41 +				# Start Web server.
    1.42 +				/etc/init.d/lighttpd stop
    1.43 +				/etc/init.d/lighttpd start
    1.44 +			fi
    1.45 +		fi
    1.46 +	fi
    1.47 +	# Configure apache server
    1.48 +	if [ -f $1/etc/apache/httpd.conf ]; then
    1.49 +		if [ ! -f $1/etc/apache/conf.d/$PACKAGE ]; then
    1.50 +			cat > $1/etc/apache/conf.d/$PACKAGE <<EOT
    1.51 +<IfModule mod_alias.c>
    1.52 +    Alias /$PACKAGE /usr/share/$PACKAGE
    1.53 +</IfModule>
    1.54 +<DirectoryMatch /usr/share/$PACKAGE/>
    1.55 +    DirectoryIndex index.php
    1.56 +    Options +FollowSymLinks
    1.57 +    AllowOverride None
    1.58 +    Order allow,deny
    1.59 +    Allow from all
    1.60 +</DirectoryMatch>
    1.61 +EOT
    1.62 +			if [ -z "$1" ]; then
    1.63 +				# Start Web server.
    1.64 +				/etc/init.d/apache stop
    1.65 +				/etc/init.d/apache start
    1.66 +			fi
    1.67 +		fi
    1.68 +	fi
    1.69 +}