wok-6.x view php/receipt @ rev 16101
php: no more COMMON_ARGS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 17 13:06:49 2014 +0000 (2014-03-17) |
parents | 76c1f14d1820 |
children | 1a1b4f47c3d1 |
line source
1 # SliTaz package receipt.
3 PACKAGE="php"
4 VERSION="5.4.26"
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="http://www.php.net/"
11 WGET_URL="http://www.php.net/distributions/$TARBALL"
12 PROVIDE="php:lighttpd"
13 #HOST_ARCH="i486 arm"
15 DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl"
16 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-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"
22 case "$ARCH" in
23 i?86)
24 ARCH_ARGS="\
25 --prefix=/usr \
26 --sysconfdir=/etc \
27 --infodir=/usr/share/info \
28 --mandir=/usr/share/man \
29 --enable-mbstring \
30 --enable-sockets \
31 --enable-ftp \
32 --enable-zip \
33 --enable-calendar \
34 --enable-exif \
35 --config-cache \
36 --enable-dba=shared \
37 --with-config-file-path=/etc \
38 --with-zlib \
39 --with-gettext \
40 --with-mcrypt=shared,/usr \
41 --with-mysql=shared,/usr \
42 --with-mysqli=shared \
43 --with-mysql-sock=/var/mysql/mysql.sock \
44 --with-pdo-sqlite=shared,/usr \
45 --with-pgsql=shared,/usr \
46 --with-snmp=shared,/usr \
47 --enable-soap=shared,/usr \
48 --with-ldap=shared \
49 --with-imap=shared \
50 --with-imap-ssl \
51 --with-mhash \
52 --with-gd=shared \
53 --with-jpeg-dir=/usr \
54 --with-png-dir=/usr \
55 --with-vpx-dir=/usr \
56 --with-openssl=shared \
57 --with-unixODBC=shared,/usr \
58 --with-pear=/usr/share/php \
59 --with-pdo-mysql=shared \
60 --with-pdo-pgsql=shared \
61 --with-curl=shared \
62 --with-sqlite3=shared,/usr \
63 --enable-maintainer-zts" ;;
64 arm*)
65 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev curl-dev"
66 ARCH_ARGS="\
67 --prefix=/usr \
68 --sysconfdir=/etc \
69 --infodir=/usr/share/info \
70 --mandir=/usr/share/man \
71 --config-cache \
72 --enable-mbstring \
73 --enable-sockets \
74 --enable-ftp \
75 --enable-zip \
76 --enable-calendar \
77 --enable-exif \
78 --enable-dba=shared \
79 --enable-sqlite-utf8 \
80 --with-mhash \
81 --with-sqlite=shared \
82 --with-config-file-path=/etc \
83 --with-zlib \
84 --with-gettext \
85 --with-curl=shared \
86 --with-openssl=shared \
87 --with-jpeg-dir=/usr \
88 --with-png-dir=/usr \
89 --with-apxs2=/usr/bin/apxs" ;;
90 esac
92 # Rules to configure and make the package.
93 compile_rules()
94 {
95 sed -i 's/pam_start/pam_nostart/' configure
96 ./configure $ARCH_ARGS $CONFIGURE_ARGS && \
97 make $MAKEFLAGS && make -j1 INSTALL_ROOT=$DESTDIR install
98 ./configure $ARCH_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs && \
99 make $MAKEFLAGS && {
100 mkdir -p $DESTDIR/etc/apache
101 cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf
102 make -j1 INSTALL_ROOT=$DESTDIR install
103 }
104 # Production config file.
105 mkdir -p $DESTDIR/etc
106 cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1
107 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
108 -i $DESTDIR/etc/php.ini
109 }
111 # Rules to gen a SliTaz package suitable for Tazpkg.
112 genpkg_rules()
113 {
114 mkdir -p $fs/usr/bin $fs/usr/share/php
115 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
116 }
118 # Post and pre install commands to stop
119 # and restart Web server if needed.
120 pre_install()
121 {
122 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
123 /etc/init.d/lighttpd stop
124 fi
125 }
127 post_install()
128 {
129 # Enable php
130 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
131 [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \
132 tazpkg get-install lighttpd-modules --root=$1/
133 sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
134 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
135 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
136 -i $1/etc/lighttpd/lighttpd.conf
137 grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \
138 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
139 -i $1/etc/lighttpd/lighttpd.conf
140 grep -q php3 $1/etc/lighttpd/lighttpd.conf || \
141 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
142 -i $1/etc/lighttpd/lighttpd.conf
143 fi
144 # Start Web server.
145 if [ -z "$1" -a ! -f /var/run/lighttpd.pid \
146 -a -f /etc/init.d/lighttpd ]; then
147 /etc/init.d/lighttpd start
148 fi
149 }