updated on Wed Jan 11 08:01:35 UTC 2012
[aur-mirror.git] / php52-noapache / PKGBUILD
blob5e22ec49d98485cce93eee19d96e909a18b3c0ae
1 # Maintainer: Evangelos Foutras <foutrelis@gmail.com>
2 # Contributor: Pierre Schmitz <pierre@archlinux.de>
4 pkgname=php52-noapache
5 pkgver=5.2.11
6 pkgrel=1
7 _suhosinver=${pkgver}-0.9.7
8 pkgdesc='A high-level scripting language'
9 arch=('i686' 'x86_64')
10 license=('PHP')
11 url='http://www.php.net'
12 backup=('etc/php/php.ini')
13 depends=('glibc' 'readline' 'ncurses' 'libxml2' 'pcre')
14 makedepends=('postgresql-libs' 'mysql' 'libldap' 'smtp-server'
15              'libpng' 'libjpeg' 'sqlite3' 'unixodbc' 'gmp'
16              'tidyhtml' 'aspell' 'libtool' 'freetype2' 'libjpeg'
17              'curl' 'libxslt' 'pam' 'openssl' 'bzip2' 'gdbm' 'db')
18 optdepends=('bzip2: bz2'
19             'curl: curl'
20             'gdbm: dba'
21             'libpng: gd'
22             'libjpeg: gd'
23             'freetype2: gd'
24             'pam: imap'
25             'libldap: ldap'
26             'libmcrypt: mcrypt'
27             'libtool: mcrypt'
28             'libmysqlclient: mysql/mysqli/pdo_mysql'
29             'unixodbc: odbc/pdo_odbc'
30             'openssl: openssl'
31             'postgresql-libs: pgsql/pdo_pgsql'
32             'aspell: pspell'
33             'net-snmp: snmp'
34             'sqlite3: pdo_sqlite'
35             'tidyhtml: tidy'
36             'libxslt: xsl'
37             'mhash: mhash'
38             'gmp: gmp'
39             )
40 provides=("php=$pkgver")
41 conflicts=('php')
42 source=("http://www.php.net/distributions/php-${pkgver}.tar.bz2"
43         "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz"
44         'php.ini' 'db-configure.patch')
45 md5sums=('286bf34630f5643c25ebcedfec5e0a09'
46          '8f9de4d97fae6eba163cf3699509a260'
47          '50b6a4ce330b016e19cb922d202ab170'
48          '74e5ce5a02488ec91b1c59f539e42936')
50 build() {
51         phpconfig="--prefix=/usr \
52         --sysconfdir=/etc/php \
53         --with-layout=GNU \
54         --with-config-file-path=/etc/php \
55         --with-config-file-scan-dir=/etc/php/conf.d \
56         --enable-inline-optimization \
57         --disable-debug \
58         --disable-rpath \
59         --disable-static \
60         --enable-shared \
61         --mandir=/usr/share/man \
62         "
64         phpextensions="--with-openssl=shared \
65         --with-zlib=shared \
66         --enable-bcmath=shared \
67         --with-bz2=shared \
68         --enable-calendar=shared \
69         --with-curl=shared \
70         --enable-dba=shared \
71         --without-db2 \
72         --without-db3 \
73         --with-db4=shared \
74         --with-gdbm=shared \
75         --enable-dbase=shared \
76         --enable-exif=shared \
77         --enable-ftp=shared \
78         --with-gd=shared \
79         --enable-gd-native-ttf \
80         --with-jpeg-dir=shared,/usr \
81         --with-png-dir=shared,/usr \
82         --with-gettext=shared \
83         --without-imap \
84         --without-imap-ssl \
85         --with-ldap=shared \
86         --enable-mbstring=shared \
87         --without-mcrypt \
88         --with-mysql=shared \
89         --with-mysql-sock=/tmp/mysql.sock \
90         --with-mysql=shared \
91         --with-mysqli=shared \
92         --with-ncurses=shared \
93         --with-unixODBC=shared,/usr \
94         --enable-pdo=shared \
95         --with-pdo-mysql=shared \
96         --with-pdo-sqlite=shared,/usr \
97         --with-pdo-odbc=shared,unixODBC,/usr \
98         --with-pdo-pgsql=shared \
99         --with-sqlite=shared \
100         --enable-sqlite-utf8 \
101         --with-pgsql=shared \
102         --enable-shmop=shared \
103         --without-snmp \
104         --enable-soap=shared \
105         --enable-sysvmsg=shared \
106         --enable-sysvsem=shared \
107         --enable-sysvshm=shared \
108         --with-tidy=shared \
109         --with-xsl=shared \
110         --enable-zip=shared \
111         --enable-posix=shared \
112         --enable-sockets=shared \
113         --enable-xml \
114         --with-ttf=shared \
115         --enable-session=shared \
116         --with-regex=php \
117         --with-pcre-regex=/usr \
118         --enable-mbstring=all \
119         --enable-mbregex \
120         --enable-json=shared \
121         --with-iconv=shared \
122         --with-xmlrpc=shared \
123         --with-pspell=shared \
124         --with-freetype-dir=shared,/usr \
125         --with-mime-magic=shared \
126         --with-gmp=shared \
127         --without-mhash \
128         "
130         PEAR_INSTALLDIR=/usr/share/pear
131         export PEAR_INSTALLDIR
133         cd ${srcdir}/php-${pkgver}
135         # avoid linking against old db version
136         patch -p0 -i ${srcdir}/db-configure.patch
138         # apply suhosin patch
139         patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch
141         # cli
142         ./configure ${phpconfig} \
143                 --disable-cgi \
144                 --with-readline \
145                 --enable-pcntl \
146                 --with-pear=/usr/share/pear \
147                 ${phpextensions}
148         make
149         # make test
150         make INSTALL_ROOT=${pkgdir} install
152         # cleanup
153         rm -f ${pkgdir}`${pkgdir}/usr/bin/php-config --extension-dir`/*.a
154         # install php.ini
155         install -D -m644 ${srcdir}/php.ini ${pkgdir}/etc/php/php.ini
156         install -d -m755 ${pkgdir}/etc/php/conf.d/
158         # cgi and fcgi
159         ./configure ${phpconfig} \
160                 --enable-fastcgi \
161                 --enable-cgi \
162                 --enable-discard-path \
163                 --enable-force-cgi-redirect \
164                 --disable-cli \
165                 ${phpextensions}
166         make
167         install -D -m755 sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
169 #       # mod_php
170 #       ./configure ${phpconfig} \
171 #               --with-apxs2 \
172 #               --disable-cli \
173 #               ${phpextensions}
174 #       make
175 #       install -D -m644 libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
176 #       install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf