2013-08-20 10:30:46 +02:00
|
|
|
# Template build file for 'php'
|
|
|
|
pkgname=php
|
2013-11-21 12:45:34 +01:00
|
|
|
version=5.5.6
|
2013-08-24 10:05:04 +02:00
|
|
|
revision=1
|
2013-08-20 10:30:46 +02:00
|
|
|
short_desc="An HTML-embedded scripting language"
|
|
|
|
license="PHP"
|
|
|
|
homepage="http://www.php.net"
|
|
|
|
# XXX freetds, mssql and tidy modules.
|
|
|
|
hostmakedepends="pkg-config bison"
|
|
|
|
makedepends="postgresql-libs-devel libldap-devel libvpx-devel sqlite-devel
|
|
|
|
unixodbc-devel net-snmp-devel libzip-devel enchant-devel libmcrypt-devel
|
|
|
|
aspell-devel libltdl-devel libpng-devel libjpeg-turbo-devel icu-devel
|
|
|
|
libcurl-devel libxslt-devel openssl-devel bzip2-devel zlib-devel db-devel
|
2013-09-21 08:57:45 +02:00
|
|
|
gmp-devel gdbm-devel freetype-devel systemd-devel apache-devel
|
|
|
|
readline-devel libmysqlclient-devel"
|
2013-08-20 10:30:46 +02:00
|
|
|
distfiles="http://www.php.net/distributions/php-${version}.tar.bz2"
|
2013-11-21 12:45:34 +01:00
|
|
|
checksum=a9b7d291199d7e6b90ef1d78eb791d738944d66856e76bde9463ce2645b0e4a4
|
2013-08-20 10:30:46 +02:00
|
|
|
|
|
|
|
do_build() {
|
|
|
|
local _phpconfig="--srcdir=.. \
|
|
|
|
--config-cache \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sbindir=/usr/bin \
|
|
|
|
--sysconfdir=/etc/php \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--with-layout=GNU \
|
|
|
|
--with-config-file-path=/etc/php \
|
|
|
|
--with-config-file-scan-dir=/etc/php/conf.d \
|
|
|
|
--disable-rpath \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--without-pear \
|
|
|
|
"
|
|
|
|
|
|
|
|
local _phpextensions="--enable-bcmath=shared \
|
|
|
|
--enable-calendar=shared \
|
|
|
|
--enable-exif=shared \
|
|
|
|
--enable-ftp=shared \
|
|
|
|
--enable-gd-native-ttf \
|
|
|
|
--enable-intl=shared \
|
|
|
|
--enable-mbstring \
|
|
|
|
--enable-opcache \
|
|
|
|
--enable-phar=shared \
|
|
|
|
--enable-posix=shared \
|
|
|
|
--enable-shmop=shared \
|
|
|
|
--enable-soap=shared \
|
|
|
|
--enable-sockets=shared \
|
|
|
|
--enable-sysvmsg=shared \
|
|
|
|
--enable-sysvsem=shared \
|
|
|
|
--enable-sysvshm=shared \
|
|
|
|
--enable-zip=shared \
|
|
|
|
--with-bz2=shared \
|
|
|
|
--with-curl=shared \
|
|
|
|
--with-db4=/usr \
|
|
|
|
--with-enchant=shared,/usr \
|
|
|
|
--with-fpm-systemd \
|
|
|
|
--with-freetype-dir=/usr \
|
|
|
|
--with-gd=shared \
|
|
|
|
--with-gdbm \
|
|
|
|
--with-gettext=shared \
|
|
|
|
--with-gmp=shared \
|
|
|
|
--with-iconv=shared \
|
|
|
|
--with-icu-dir=/usr \
|
|
|
|
--with-jpeg-dir=/usr \
|
|
|
|
--with-vpx-dir=/usr \
|
|
|
|
--with-ldap=shared \
|
|
|
|
--with-ldap-sasl \
|
|
|
|
--with-mcrypt=shared \
|
|
|
|
--with-mhash \
|
|
|
|
--with-mysql-sock=/run/mysqld/mysqld.sock \
|
|
|
|
--with-mysql=shared,mysqlnd \
|
|
|
|
--with-mysqli=shared,mysqlnd \
|
|
|
|
--with-openssl=shared \
|
|
|
|
--with-pcre-regex=/usr \
|
|
|
|
--with-pdo-mysql=shared,mysqlnd \
|
|
|
|
--with-pdo-odbc=shared,unixODBC,/usr \
|
|
|
|
--with-pdo-pgsql=shared \
|
|
|
|
--with-pdo-sqlite=shared,/usr \
|
|
|
|
--with-pgsql=shared \
|
|
|
|
--with-png-dir=/usr \
|
|
|
|
--with-pspell=shared \
|
|
|
|
--with-snmp=shared \
|
|
|
|
--with-sqlite3=shared,/usr \
|
|
|
|
--with-unixODBC=shared,/usr \
|
|
|
|
--with-xmlrpc=shared \
|
|
|
|
--with-xsl=shared \
|
|
|
|
--with-zlib \
|
|
|
|
"
|
|
|
|
|
|
|
|
EXTENSION_DIR=/usr/lib/php/modules
|
|
|
|
export EXTENSION_DIR
|
|
|
|
PEAR_INSTALLDIR=/usr/share/pear
|
|
|
|
export PEAR_INSTALLDIR
|
|
|
|
|
|
|
|
# php
|
|
|
|
mkdir -p build-php
|
|
|
|
cd build-php
|
|
|
|
ln -s ${wrksrc}/configure
|
|
|
|
./configure ${_phpconfig} \
|
|
|
|
--disable-cgi \
|
|
|
|
--with-readline \
|
|
|
|
--enable-pcntl \
|
|
|
|
${_phpextensions}
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
# cgi and fcgi
|
|
|
|
# reuse the previous run; this will save us a lot of time
|
|
|
|
cp -a ${wrksrc}/build-php ${wrksrc}/build-cgi
|
|
|
|
cd ${wrksrc}/build-cgi
|
|
|
|
./configure ${_phpconfig} \
|
|
|
|
--disable-cli \
|
|
|
|
--enable-cgi \
|
|
|
|
${_phpextensions}
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
# apache
|
|
|
|
cp -a ${wrksrc}/build-php ${wrksrc}/build-apache
|
|
|
|
cd ${wrksrc}/build-apache
|
|
|
|
./configure ${_phpconfig} \
|
|
|
|
--disable-cli \
|
|
|
|
--with-apxs2 \
|
|
|
|
${_phpextensions}
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
# fpm
|
|
|
|
cp -a ${wrksrc}/build-php ${wrksrc}/build-fpm
|
|
|
|
cd ${wrksrc}/build-fpm
|
|
|
|
./configure ${_phpconfig} \
|
|
|
|
--disable-cli \
|
|
|
|
--enable-fpm \
|
|
|
|
--with-fpm-user=http \
|
|
|
|
--with-fpm-group=http \
|
|
|
|
${_phpextensions}
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
# embed
|
|
|
|
cp -a ${wrksrc}/build-php ${wrksrc}/build-embed
|
|
|
|
cd ${wrksrc}/build-embed
|
|
|
|
./configure ${_phpconfig} \
|
|
|
|
--disable-cli \
|
|
|
|
--enable-embed=shared \
|
|
|
|
${_phpextensions}
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
# pear
|
|
|
|
cp -a ${wrksrc}/build-php ${wrksrc}/build-pear
|
|
|
|
cd ${wrksrc}/build-pear
|
|
|
|
./configure ${_phpconfig} \
|
|
|
|
--disable-cgi \
|
|
|
|
--with-readline \
|
|
|
|
--enable-pcntl \
|
|
|
|
--with-pear \
|
|
|
|
${_phpextensions}
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
cd ${wrksrc}/build-php
|
|
|
|
make INSTALL_ROOT=${DESTDIR} install
|
|
|
|
|
|
|
|
# install php.ini
|
|
|
|
vinstall ${wrksrc}/php.ini-production 644 etc/php php.ini
|
|
|
|
# remove static modules
|
|
|
|
rm -f ${DESTDIR}/usr/lib/php/modules/*.a
|
|
|
|
}
|
|
|
|
|
|
|
|
php_package() {
|
|
|
|
conf_files="/etc/php/php.ini"
|
|
|
|
pkg_install() {
|
|
|
|
vmove all
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-devel_package() {
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/php/build
|
|
|
|
vmove usr/bin/php-config
|
|
|
|
vmove usr/bin/phpize
|
|
|
|
vmove usr/share/man/man1/phpize.1
|
|
|
|
vmove usr/share/man/man1/php-config.1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-cgi_package() {
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - CGI and FCGI SAPI'
|
2013-08-20 10:30:46 +02:00
|
|
|
depends="php-${version}_${revision}"
|
|
|
|
pkg_install() {
|
|
|
|
vinstall ${wrksrc}/build-cgi/sapi/cgi/php-cgi 755 usr/bin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-apache_package() {
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - Apache SAPI'
|
2013-08-20 10:30:46 +02:00
|
|
|
depends="php-${version}_${revision}"
|
|
|
|
conf_files="/etc/httpd/conf/extra/php5_module.conf"
|
|
|
|
pkg_install() {
|
|
|
|
vinstall ${wrksrc}/build-apache/libs/libphp5.so 755 usr/libexec/httpd/modules
|
|
|
|
vinstall ${FILESDIR}/apache.conf 644 etc/httpd/conf/extra php5_module.conf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-fpm_package() {
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - FastCGI Process Manager'
|
2013-08-20 10:30:46 +02:00
|
|
|
depends="php-${version}_${revision}"
|
|
|
|
conf_files="/etc/php/php-fpm.conf"
|
|
|
|
make_dirs="/etc/php/fpm.d 0755 root root"
|
|
|
|
pkg_install() {
|
|
|
|
vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm 755 usr/bin
|
|
|
|
vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm.8 644 usr/share/man/man8
|
|
|
|
vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm.conf 644 etc/php
|
|
|
|
vinstall ${FILESDIR}/php-fpm.tmpfiles 644 usr/lib/tmpfiles.d php-fpm.conf
|
|
|
|
vinstall ${FILESDIR}/php-fpm.service 644 usr/lib/systemd/system
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-embed_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - Embed SAPI'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vinstall ${wrksrc}/build-embed/libs/libphp5.so 755 usr/lib
|
|
|
|
vinstall ${wrksrc}/sapi/embed/php_embed.h 644 usr/include/php/sapi/embed
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-pear_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - PHP Extension and Application Repository'
|
2013-08-20 10:30:46 +02:00
|
|
|
conf_files="/etc/php/pear.conf"
|
|
|
|
pkg_install() {
|
|
|
|
cd ${wrksrc}/build-pear
|
|
|
|
make install-pear INSTALL_ROOT=${PKGDESTDIR}
|
|
|
|
rm -rf ${PKGDESTDIR}/.{channels,depdb,depdblock,filemap,lock,registry}
|
|
|
|
rm -rf ${PKGDESTDIR}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-enchant_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - enchant module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/enchant.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-gd_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - gd module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/gd.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-intl_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - Internationalization module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/intl.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-ldap_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - LDAP module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/ldap.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-mcrypt_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - mcrypt module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/mcrypt.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-mysql_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - MySQL modules'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/php/modules/*mysql*.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-odbc_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - ODBC modules'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/php/modules/*odbc.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-pgsql_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - PostgreSQL modules'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/php/modules/*pgsql.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-pspell_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - pspell module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/pspell.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-snmp_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - snmp module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/snmp.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-sqlite_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - sqlite module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/php/modules/*sqlite*.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
php-xsl_package() {
|
|
|
|
depends="php-${version}_${revision}"
|
2013-08-20 10:42:27 +02:00
|
|
|
short_desc+=' - XSL module'
|
2013-08-20 10:30:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/php/modules/xsl.so
|
|
|
|
}
|
|
|
|
}
|