wok-current view php/receipt @ rev 23456
updated pure-ftpd and pure-ftpd-pam (1.0.48 -> 1.0.49)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Apr 03 13:56:35 2020 +0100 (2020-04-03) |
parents | b10d41313e54 |
children | 15650f5d595b |
line source
1 # SliTaz package receipt.
3 PACKAGE="php"
4 VERSION="7.4.4"
5 CATEGORY="development"
6 SHORT_DESC="PHP web programming language."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.php.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="https://www.php.net/distributions/$TARBALL"
14 PROVIDE="php:lighttpd"
15 DEPENDS="libssl libzip libxml2 lighttpd php-common sqlite"
16 BUILD_DEPENDS="apache apache-dev apr-dev apr-util-dev c-client
17 coreutils-conditions curl-dev cyrus-sasl-dev gettext
18 jpeg-dev libldap libmcrypt-dev libmysqlclient libpng-dev
19 libtool libunixODBC libvpx-dev libxml2-dev libzip-dev
20 mhash-dev mysql-dev net-snmp-dev openldap-dev openssl-dev
21 perl pkg-config postgresql-dev re2c sed sqlite-dev
22 unixODBC-dev"
24 #HOST_ARCH="i486 arm"
26 case "$ARCH" in
27 i?86)
28 # 7.4.4 unrecognised:
29 # --enable-zip
30 # --with-jpeg-dir=/usr
31 # --with-png-dir=/usr
33 ARCH_ARGS=" \
34 --prefix=/usr \
35 --sysconfdir=/etc \
36 --infodir=/usr/share/info \
37 --mandir=/usr/share/man \
38 --config-cache \
39 --enable-calendar \
40 --enable-dba=shared \
41 --enable-exif \
42 --enable-ftp \
43 --enable-gd=shared \
44 --enable-maintainer-zts \
45 --disable-mbregex \
46 --enable-mbstring \
47 --enable-soap=shared,/usr \
48 --enable-sockets \
49 --with-config-file-path=/etc \
50 --with-curl=shared \
51 --with-gettext \
52 --with-imap=shared \
53 --with-imap-ssl \
54 --with-ldap=shared \
55 --with-mhash \
56 --with-mysql-sock=/var/run/mysqld/mysql.sock \
57 --with-mysqli=shared \
58 --with-openssl=shared \
59 --with-pdo-mysql=shared \
60 --with-pdo-pgsql=shared \
61 --with-pdo-sqlite=shared,/usr \
62 --with-pear=/usr/share/php \
63 --with-pgsql=shared,/usr \
64 --with-snmp=shared,/usr \
65 --with-sqlite3=shared,/usr \
66 --with-unixODBC=shared,/usr \
67 --with-zlib" ;;
68 arm*)
69 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev curl-dev"
70 ARCH_ARGS="\
71 --prefix=/usr \
72 --sysconfdir=/etc \
73 --infodir=/usr/share/info \
74 --mandir=/usr/share/man \
75 --config-cache \
76 --enable-mbstring \
77 --enable-sockets \
78 --enable-ftp \
79 --enable-zip \
80 --enable-calendar \
81 --enable-exif \
82 --enable-dba=shared \
83 --enable-sqlite-utf8 \
84 --with-mhash \
85 --with-sqlite=shared \
86 --with-config-file-path=/etc \
87 --with-zlib \
88 --with-gettext \
89 --with-curl=shared \
90 --with-openssl=shared \
91 --with-jpeg-dir=/usr \
92 --with-png-dir=/usr \
93 --with-apxs2=/usr/bin/apxs" ;;
94 esac
96 # Rules to configure and make the package.
97 compile_rules()
98 {
99 sed -i 's/pam_start/pam_nostart/' configure
101 ./configure $ARCH_ARGS $CONFIGURE_ARGS &&
102 make $MAKEFLAGS &&
103 make -j1 INSTALL_ROOT=$DESTDIR install &&
104 ./configure $ARCH_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs &&
105 make $MAKEFLAGS &&
106 {
107 mkdir -p $DESTDIR/etc/apache
108 cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf
109 make -j1 INSTALL_ROOT=$DESTDIR install
110 }
112 # Production configuration file.
113 mkdir -p $DESTDIR/etc
114 cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1
115 sed -i -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
116 $DESTDIR/etc/php.ini
117 }
119 # Rules to gen a SliTaz package suitable for Tazpkg.
120 genpkg_rules()
121 {
122 mkdir -p $fs/usr/bin
123 mkdir -p $fs/usr/share/php
125 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
126 }
128 # Post and pre install commands to stop
129 # and restart Web server if needed.
130 pre_install()
131 {
132 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]
133 then
134 /etc/init.d/lighttpd stop
135 fi
136 }
138 post_install()
139 {
140 # Enable PHP
141 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
142 then
143 [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] ||
144 tazpkg get-install lighttpd-modules --root="$1/"
145 sed -i -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
146 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
147 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
148 "$1/etc/lighttpd/lighttpd.conf"
149 grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" ||
150 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
151 -i "$1/etc/lighttpd/lighttpd.conf"
152 grep -q php3 "$1/etc/lighttpd/lighttpd.conf" || \
153 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
154 -i "$1/etc/lighttpd/lighttpd.conf"
155 fi
157 # Start Web server.
158 if [ -z "$1" -a ! -f /var/run/lighttpd.pid -a -f /etc/init.d/lighttpd ]
159 then
160 /etc/init.d/lighttpd start
161 fi
162 }