wok-current view php-apache/receipt @ rev 23715

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