wok-current annotate php-apache/receipt @ rev 24629
updated gsl and gsl-dev (2.6 -> 2.7.1)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 08 09:29:44 2022 +0100 (2022-03-08) |
parents | b10d41313e54 |
children | 8ce450c92191 |
rev | line source |
---|---|
pascal@1315 | 1 # SliTaz package receipt. |
pascal@1315 | 2 |
pascal@1315 | 3 PACKAGE="php-apache" |
Hans-G?nter@23426 | 4 VERSION="7.4.4" |
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/" |
Hans-G?nter@23426 | 10 |
Hans-G?nter@23426 | 11 PROVIDE="php:apache" |
Hans-G?nter@23426 | 12 DEPENDS="apache libxml2 php-common zlib" |
pascal@1315 | 13 WANTED="php" |
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 |
Hans-G?nter@23426 | 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 { |
Hans-G?nter@23426 | 26 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ] |
Hans-G?nter@23426 | 27 then |
pascal@1315 | 28 /etc/init.d/apache stop |
pascal@1315 | 29 fi |
pascal@1315 | 30 } |
pascal@1315 | 31 |
pascal@1315 | 32 post_install() |
pascal@1315 | 33 { |
Hans-G?nter@23426 | 34 grep -q php5_module "$1/etc/apache/httpd.conf" || |
Hans-G?nter@23426 | 35 { |
pascal@1315 | 36 sed -e 's|mod_rewrite.so|mod_rewrite.so\nLoadModule php5_module share/apache/modules/libphp5.so|' \ |
pascal@1315 | 37 -e 's|DirectoryIndex index.html|DirectoryIndex index.html index.php|' \ |
pascal@1315 | 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|' \ |
pascal@18730 | 39 -i "$1/etc/apache/httpd.conf" |
pascal@1315 | 40 } |
Hans-G?nter@23426 | 41 |
Hans-G?nter@23426 | 42 [ -f "$1/etc/apache/conf.d/phpinfo" ] || |
pascal@18730 | 43 cat > "$1/etc/apache/conf.d/phpinfo" <<EOT |
pascal@1315 | 44 <IfModule mod_alias.c> |
pascal@1315 | 45 Alias /phpinfo /usr/share/phpinfo |
pascal@1315 | 46 </IfModule> |
pascal@1315 | 47 <DirectoryMatch /usr/share/phpinfo/> |
pascal@1315 | 48 DirectoryIndex index.php |
pascal@1315 | 49 Options +FollowSymLinks |
pascal@1315 | 50 AllowOverride None |
pascal@1315 | 51 Order allow,deny |
pascal@1315 | 52 Allow from all |
pascal@1315 | 53 </DirectoryMatch> |
pascal@1315 | 54 EOT |
Hans-G?nter@23426 | 55 |
pascal@1805 | 56 # Restart Web server. |
Hans-G?nter@23426 | 57 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ] |
Hans-G?nter@23426 | 58 then |
pascal@1805 | 59 /etc/init.d/apache stop |
pascal@1805 | 60 sleep 2 |
pascal@1805 | 61 fi |
Hans-G?nter@23426 | 62 if [ -z "$1" ] |
Hans-G?nter@23426 | 63 then |
pascal@1315 | 64 /etc/init.d/apache start |
pascal@1315 | 65 fi |
pascal@1315 | 66 } |