wok-next annotate shell-detector/receipt @ rev 20717

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