wok annotate php-apache/receipt @ rev 22950

updated inotify-tools again (3.14 -> 3.20.2.2)
author Hans-G?nter Theisgen
date Fri Feb 28 14:33:03 2020 +0100 (2020-02-28)
parents ccb0caebef6f
children b10d41313e54
rev   line source
pascal@1315 1 # SliTaz package receipt.
pascal@1315 2
pascal@1315 3 PACKAGE="php-apache"
pascal@22388 4 VERSION="7.3.12"
pascal@1315 5 CATEGORY="development"
pascal@1315 6 SHORT_DESC="PHP module for apache."
pascal@1315 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15198 8 LICENSE="BSD"
pascal@21278 9 WEB_SITE="https://www.php.net/"
pascal@1315 10 WANTED="php"
pascal@1315 11 PROVIDE="php:apache"
pascal@1315 12
pascal@15198 13 DEPENDS="php-common apache libxml2 zlib"
pascal@15198 14
pascal@1315 15 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1315 16 genpkg_rules()
pascal@1315 17 {
pascal@1315 18 mkdir -p $fs/usr/share
slaxemulator@14614 19 cp -a $install/usr/share/apache $fs/usr/share
pascal@1315 20 }
pascal@1315 21
pascal@1315 22 # Post and pre install commans to stop
pascal@1315 23 # and restart Web server if needed.
pascal@1315 24 pre_install()
pascal@1315 25 {
pascal@1315 26 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]; then
pascal@1315 27 /etc/init.d/apache stop
pascal@1315 28 fi
pascal@1315 29 }
pascal@1315 30
pascal@1315 31 post_install()
pascal@1315 32 {
pascal@18730 33 grep -q php5_module "$1/etc/apache/httpd.conf" || {
pascal@1315 34 sed -e 's|mod_rewrite.so|mod_rewrite.so\nLoadModule php5_module share/apache/modules/libphp5.so|' \
pascal@1315 35 -e 's|DirectoryIndex index.html|DirectoryIndex index.html index.php|' \
pascal@1315 36 -e 's|mime.types|mime.types\n AddType application/x-httpd-php .php .php3 .php4 .php5\n AddType application/x-httpd-php-source .phps|' \
pascal@18730 37 -i "$1/etc/apache/httpd.conf"
pascal@1315 38 }
pascal@18730 39 [ -f "$1/etc/apache/conf.d/phpinfo" ] || \
pascal@18730 40 cat > "$1/etc/apache/conf.d/phpinfo" <<EOT
pascal@1315 41 <IfModule mod_alias.c>
pascal@1315 42 Alias /phpinfo /usr/share/phpinfo
pascal@1315 43 </IfModule>
pascal@1315 44 <DirectoryMatch /usr/share/phpinfo/>
pascal@1315 45 DirectoryIndex index.php
pascal@1315 46 Options +FollowSymLinks
pascal@1315 47 AllowOverride None
pascal@1315 48 Order allow,deny
pascal@1315 49 Allow from all
pascal@1315 50 </DirectoryMatch>
pascal@1315 51 EOT
pascal@1805 52 # Restart Web server.
pascal@1805 53 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]; then
pascal@1805 54 /etc/init.d/apache stop
pascal@1805 55 sleep 2
pascal@1805 56 fi
pascal@1805 57 if [ -z "$1" ]; then
pascal@1315 58 /etc/init.d/apache start
pascal@1315 59 fi
pascal@1315 60 }
pascal@1315 61