rev |
line source |
pankso@18
|
1 # SliTaz package receipt.
|
pankso@18
|
2
|
pankso@18
|
3 PACKAGE="php"
|
slaxemulator@14614
|
4 VERSION="5.4.13"
|
pankso@204
|
5 CATEGORY="development"
|
pankso@18
|
6 SHORT_DESC="PHP web programming language."
|
pankso@18
|
7 MAINTAINER="pankso@slitaz.org"
|
pascal@15198
|
8 LICENSE="BSD"
|
pankso@18
|
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
|
pankso@18
|
10 WEB_SITE="http://www.php.net/"
|
slaxemulator@14614
|
11 WGET_URL="http://www.php.net/distributions/$TARBALL"
|
pascal@1315
|
12 PROVIDE="php:lighttpd"
|
pankso@18
|
13
|
pankso@9864
|
14 DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl"
|
pankso@9859
|
15 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev libmysqlclient mysql-dev \
|
pankso@9859
|
16 net-snmp-dev postgresql-dev gettext openssl-dev apache-dev apr-util-dev \
|
pankso@9859
|
17 c-client mhash-dev libpng-dev libunixODBC unixODBC-dev openldap-dev \
|
pankso@9859
|
18 libldap apr-dev libmcrypt-dev curl-dev cyrus-sasl-dev perl pkg-config \
|
pascal@15630
|
19 jpeg-dev net-snmp-dev libvpx-dev apache coreutils-conditions sed re2c"
|
pankso@9859
|
20
|
pankso@18
|
21 # Rules to configure and make the package.
|
pankso@18
|
22 compile_rules()
|
pankso@18
|
23 {
|
pankso@18
|
24 cd $src
|
pascal@1315
|
25 COMMON_ARGS="\
|
pascal@1315
|
26 --prefix=/usr \
|
pascal@1315
|
27 --sysconfdir=/etc \
|
pascal@1315
|
28 --infodir=/usr/share/info \
|
pascal@1315
|
29 --mandir=/usr/share/man \
|
pascal@1315
|
30 --enable-mbstring \
|
pascal@3239
|
31 --enable-sockets \
|
pascal@3767
|
32 --enable-ftp \
|
pascal@3767
|
33 --enable-zip \
|
pascal@3767
|
34 --enable-calendar \
|
pascal@3767
|
35 --enable-exif \
|
slaxemulator@14614
|
36 --config-cache \
|
pascal@3768
|
37 --enable-dba=shared \
|
pascal@1315
|
38 --with-config-file-path=/etc \
|
pascal@1315
|
39 --with-zlib \
|
pascal@1315
|
40 --with-gettext \
|
erjo@4407
|
41 --with-mcrypt=shared,/usr \
|
pascal@1324
|
42 --with-mysql=shared,/usr \
|
pankso@11658
|
43 --with-mysqli=shared \
|
erjo@13461
|
44 --with-mysql-sock=/var/mysql/mysql.sock \
|
slaxemulator@14614
|
45 --with-pdo-sqlite=shared,/usr \
|
pascal@1324
|
46 --with-pgsql=shared,/usr \
|
pascal@3230
|
47 --with-snmp=shared,/usr \
|
pascal@7740
|
48 --enable-soap=shared,/usr \
|
pascal@1315
|
49 --with-ldap=shared \
|
pascal@1324
|
50 --with-imap=shared --with-imap-ssl \
|
slaxemulator@14614
|
51 --with-mhash \
|
pascal@1326
|
52 --with-gd=shared \
|
pascal@3729
|
53 --with-jpeg-dir=/usr \
|
pascal@3729
|
54 --with-png-dir=/usr \
|
slaxemulator@14614
|
55 --with-vpx-dir=/usr \
|
erjo@2671
|
56 --with-openssl=shared \
|
pascal@1832
|
57 --with-unixODBC=shared,/usr \
|
pascal@1779
|
58 --with-pear=/usr/share/php \
|
pankso@4427
|
59 --with-pdo-mysql=shared \
|
pankso@4427
|
60 --with-pdo-pgsql=shared \
|
jozee@5520
|
61 --with-curl=shared \
|
slaxemulator@14614
|
62 --enable-sqlite-utf8 \
|
slaxemulator@14614
|
63 --with-sqlite3=shared,/usr \
|
slaxemulator@14614
|
64 --with-sqlite=shared \
|
pascal@15365
|
65 --enable-maintainer-zts \
|
pascal@1779
|
66 "
|
pascal@2605
|
67 sed -i 's/pam_start/pam_nostart/' configure
|
slaxemulator@14614
|
68 ./configure $COMMON_ARGS $CONFIGURE_ARGS && \
|
slaxemulator@14614
|
69 make $MAKEFLAGS && make -j1 INSTALL_ROOT=$DESTDIR install
|
slaxemulator@14614
|
70 ./configure $COMMON_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs && \
|
gokhlayeh@11574
|
71 make $MAKEFLAGS && {
|
pankso@9862
|
72 mkdir -p $DESTDIR/etc/apache
|
pankso@9862
|
73 cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf
|
slaxemulator@14614
|
74 make -j1 INSTALL_ROOT=$DESTDIR install
|
pascal@1315
|
75 }
|
erjo@13052
|
76 # Production config file.
|
pankso@10819
|
77 mkdir -p $DESTDIR/etc
|
erjo@13052
|
78 cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1
|
slaxemulator@10549
|
79 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
|
slaxemulator@10549
|
80 -i $DESTDIR/etc/php.ini
|
pankso@18
|
81 }
|
pankso@18
|
82
|
pankso@18
|
83 # Rules to gen a SliTaz package suitable for Tazpkg.
|
pankso@18
|
84 genpkg_rules()
|
pankso@18
|
85 {
|
pankso@10819
|
86 mkdir -p $fs/usr/bin $fs/usr/share/php
|
pankso@18
|
87 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
|
pankso@18
|
88 }
|
pankso@18
|
89
|
slaxemulator@14614
|
90 # Post and pre install commands to stop
|
slaxemulator@14614
|
91 # and restart Web server if needed.
|
pankso@18
|
92 pre_install()
|
pankso@18
|
93 {
|
slaxemulator@14614
|
94 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
|
pankso@18
|
95 /etc/init.d/lighttpd stop
|
pankso@18
|
96 fi
|
pankso@18
|
97 }
|
pankso@9861
|
98
|
pankso@18
|
99 post_install()
|
pankso@18
|
100 {
|
pascal@1143
|
101 # Enable php
|
pascal@1143
|
102 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
|
pascal@1143
|
103 [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \
|
pascal@1143
|
104 tazpkg get-install lighttpd-modules --root=$1/
|
pascal@1143
|
105 sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
|
pascal@1143
|
106 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
|
pascal@1143
|
107 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
|
pascal@1143
|
108 -i $1/etc/lighttpd/lighttpd.conf
|
pascal@1143
|
109 grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \
|
pascal@1143
|
110 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
|
pascal@1143
|
111 -i $1/etc/lighttpd/lighttpd.conf
|
pascal@1349
|
112 grep -q php3 $1/etc/lighttpd/lighttpd.conf || \
|
pascal@1635
|
113 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
|
pascal@1583
|
114 -i $1/etc/lighttpd/lighttpd.conf
|
pascal@1143
|
115 fi
|
pankso@18
|
116 # Start Web server.
|
pascal@15149
|
117 if [ -z "$1" -a ! -f /var/run/lighttpd.pid \
|
pascal@15149
|
118 -a -f /etc/init.d/lighttpd ]; then
|
pankso@18
|
119 /etc/init.d/lighttpd start
|
pankso@18
|
120 fi
|
pankso@18
|
121 }
|