wok view shell-detector/receipt @ rev 14097

udisks:fix deps
author ernia <monghitri@aruba.it>
date Sat Feb 23 09:34:55 2013 +0000 (2013-02-23)
parents
children 3b4e4318134e
line source
1 # SliTaz package receipt.
3 PACKAGE="shell-detector"
4 VERSION="current"
5 CATEGORY="network"
6 SHORT_DESC="Web shell detection tool."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://www.emposha.com/security/php-shell-detector-web-shell-detection-tool.html"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 #WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master"
11 WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git"
13 DEPENDS="php"
14 BUILD_DEPENDS="git"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 mkdir -p $fs/usr/share/$PACKAGE
26 cp -a $src/* $fs/usr/share/$PACKAGE
27 ln -s shelldetect.php $fs/usr/share/$PACKAGE/index.php
28 chown -R www.www $fs/usr/share/$PACKAGE
29 }
31 post_install()
32 {
33 # Configure lighttpd server
34 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
35 if ! grep -q /usr/share/phpsysinfo/ $1/etc/lighttpd/lighttpd.conf; then
36 sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",| \"/examples/\" => \"/usr/share/examples/\",\\n \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i $1/etc/lighttpd/lighttpd.conf
37 if [ -z "$1" ]; then
38 # Start Web server.
39 /etc/init.d/lighttpd stop
40 /etc/init.d/lighttpd start
41 fi
42 fi
43 fi
44 # Configure apache server
45 if [ -f $1/etc/apache/httpd.conf ]; then
46 if [ ! -f $1/etc/apache/conf.d/$PACKAGE ]; then
47 cat > $1/etc/apache/conf.d/$PACKAGE <<EOT
48 <IfModule mod_alias.c>
49 Alias /$PACKAGE /usr/share/$PACKAGE
50 </IfModule>
51 <DirectoryMatch /usr/share/$PACKAGE/>
52 DirectoryIndex index.php
53 Options +FollowSymLinks
54 AllowOverride None
55 Order allow,deny
56 Allow from all
57 </DirectoryMatch>
58 EOT
59 if [ -z "$1" ]; then
60 # Start Web server.
61 /etc/init.d/apache stop
62 /etc/init.d/apache start
63 fi
64 fi
65 fi
66 }