wok-6.x diff php-apache/receipt @ rev 1552
locale-*: ensure need packages are built
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 11 21:19:51 2008 +0000 (2008-10-11) |
parents | |
children | 1143af92f66a |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-apache/receipt Sat Oct 11 21:19:51 2008 +0000 1.3 @@ -0,0 +1,55 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php-apache" 1.7 +VERSION="5.2.5" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="PHP module for apache." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +DEPENDS="php-common apache" 1.12 +WEB_SITE="http://www.php.net/" 1.13 +WANTED="php" 1.14 +PROVIDE="php:apache" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + mkdir -p $fs/usr/share 1.20 + cp -a $_pkg/usr/share/apache $fs/usr/share 1.21 +} 1.22 + 1.23 +# Post and pre install commans to stop 1.24 +# and restart Web server if needed. 1.25 +pre_install() 1.26 +{ 1.27 + if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]; then 1.28 + /etc/init.d/apache stop 1.29 + fi 1.30 +} 1.31 + 1.32 +post_install() 1.33 +{ 1.34 + grep -q php5_module $1/etc/apache/httpd.conf || { 1.35 + sed -e 's|mod_rewrite.so|mod_rewrite.so\nLoadModule php5_module share/apache/modules/libphp5.so|' \ 1.36 + -e 's|DirectoryIndex index.html|DirectoryIndex index.html index.php|' \ 1.37 + -e 's|mime.types|mime.types\n AddType application/x-httpd-php .php .php3 .php4 .php5\n AddType application/x-httpd-php-source .phps|' \ 1.38 + -i $1/etc/apache/httpd.conf 1.39 + } 1.40 + [ -f $1/etc/apache/conf.d/phpinfo ] || \ 1.41 + cat > $1/etc/apache/conf.d/phpinfo <<EOT 1.42 +<IfModule mod_alias.c> 1.43 + Alias /phpinfo /usr/share/phpinfo 1.44 +</IfModule> 1.45 +<DirectoryMatch /usr/share/phpinfo/> 1.46 + DirectoryIndex index.php 1.47 + Options +FollowSymLinks 1.48 + AllowOverride None 1.49 + Order allow,deny 1.50 + Allow from all 1.51 +</DirectoryMatch> 1.52 +EOT 1.53 + # Start Web server. 1.54 + if [ -z "$1" -a ! -f "/var/run/apache/httpd.pid" ]; then 1.55 + /etc/init.d/apache start 1.56 + fi 1.57 +} 1.58 +