wok view php-apache/receipt @ rev 23848

inkscape: update build_depends
author Richard Dunbar <mojo@slitaz.org>
date Sun Jun 14 23:18:03 2020 -0400 (2020-06-14)
parents b10d41313e54
children
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 }