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