wok-6.x view php/receipt @ rev 23099

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