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

Use symlink for libxvmc-mesa
author Stanislas Leduc <shann@slitaz.org>
date Mon Jun 10 20:42:21 2024 +0000 (6 months ago)
parents a23978bfa665
children 5926178cd6fa
line source
1 # SliTaz package receipt.
3 PACKAGE="php-apache"
4 VERSION="7.4.33"
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 php7_module share/apache/modules/libphp7.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 .php7\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 Require all granted
54 </DirectoryMatch>
55 EOT
57 # Restart Web server.
58 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]
59 then
60 /etc/init.d/apache stop
61 sleep 2
62 fi
63 if [ -z "$1" ]
64 then
65 /etc/init.d/apache start
66 fi
67 }