wok-6.x view php-apache/receipt @ rev 17591

syslinux/isohybrib.exe: add --md5, --undo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 10 08:53:27 2015 +0100 (2015-02-10)
parents 76c1f14d1820
children 9e01bc6321ea
line source
1 # SliTaz package receipt.
3 PACKAGE="php-apache"
4 VERSION="5.5.13"
5 CATEGORY="development"
6 SHORT_DESC="PHP module for apache."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://www.php.net/"
10 WANTED="php"
11 PROVIDE="php:apache"
13 DEPENDS="php-common apache libxml2 zlib"
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" ]; then
27 /etc/init.d/apache stop
28 fi
29 }
31 post_install()
32 {
33 grep -q php5_module $1/etc/apache/httpd.conf || {
34 sed -e 's|mod_rewrite.so|mod_rewrite.so\nLoadModule php5_module share/apache/modules/libphp5.so|' \
35 -e 's|DirectoryIndex index.html|DirectoryIndex index.html index.php|' \
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|' \
37 -i $1/etc/apache/httpd.conf
38 }
39 [ -f $1/etc/apache/conf.d/phpinfo ] || \
40 cat > $1/etc/apache/conf.d/phpinfo <<EOT
41 <IfModule mod_alias.c>
42 Alias /phpinfo /usr/share/phpinfo
43 </IfModule>
44 <DirectoryMatch /usr/share/phpinfo/>
45 DirectoryIndex index.php
46 Options +FollowSymLinks
47 AllowOverride None
48 Order allow,deny
49 Allow from all
50 </DirectoryMatch>
51 EOT
52 # Restart Web server.
53 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]; then
54 /etc/init.d/apache stop
55 sleep 2
56 fi
57 if [ -z "$1" ]; then
58 /etc/init.d/apache start
59 fi
60 }