summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Lakic2015-06-13 16:11:20 +0200
committerIgor Lakic2015-06-13 16:11:20 +0200
commitaa443a50851a74070e8ce45c56d4afe4194a1d64 (patch)
tree2c84d2c2a68342dac71f0a6a59e5d297d0b5f4f6
downloadaur-aa443a50851a74070e8ce45c56d4afe4194a1d64.tar.gz
Initial import of php-apache22
-rw-r--r--.SRCINFO48
-rw-r--r--PKGBUILD141
-rw-r--r--apache.conf13
-rw-r--r--php-fpm.conf.in.patch52
-rw-r--r--php.ini.patch121
5 files changed, 375 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..62a7738ef0e4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+pkgbase = php-apache22
+ pkgdesc = Apache SAPI for PHP
+ pkgver = 5.6.10
+ pkgrel = 1
+ url = http://www.php.net
+ arch = i686
+ arch = x86_64
+ license = PHP
+ makedepends = apache22
+ makedepends = imap
+ makedepends = postgresql-libs
+ makedepends = libldap
+ makedepends = postfix
+ makedepends = sqlite
+ makedepends = unixodbc
+ makedepends = net-snmp
+ makedepends = libzip
+ makedepends = enchant
+ makedepends = file
+ makedepends = freetds
+ makedepends = libmcrypt
+ makedepends = tidyhtml
+ makedepends = aspell
+ makedepends = libltdl
+ makedepends = gd
+ makedepends = icu
+ makedepends = curl
+ makedepends = libxslt
+ makedepends = openssl
+ makedepends = db
+ makedepends = gmp
+ makedepends = systemd
+ depends = php
+ depends = apache22
+ provides = php-apache=5.6.10
+ conflicts = php-apache
+ backup = etc/httpd/conf/extra/php5_module.conf
+ source = http://www.php.net/distributions/php-5.6.10.tar.gz
+ source = php.ini.patch
+ source = apache.conf
+ source = php-fpm.conf.in.patch
+ md5sums = 5afb2f6467f525ae38a9ce6f1acf5c6a
+ md5sums = 0e5a8cf6e851b2c68dd638ce63f82647
+ md5sums = dec2cbaad64e3abf4f0ec70e1de4e8e9
+ md5sums = b9d7ead46639bbcd6c6d6e8b4876ed7f
+
+pkgname = php-apache22
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8538240cbb6d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,141 @@
+# Maintainer: Igor Lakic aka trzalica <trzalica87 at gmail dot com>
+# Contributor: Rob McCathie <archaur at rmcc dot com dot au>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+_name=php-apache
+_base=php
+pkgname=php-apache22
+pkgver=5.6.10
+pkgrel=1
+pkgdesc='Apache SAPI for PHP'
+arch=('i686' 'x86_64')
+license=('PHP')
+url='http://www.php.net'
+depends=('php' 'apache22')
+makedepends=('apache22' 'imap' 'postgresql-libs' 'libldap' 'postfix'
+ 'sqlite' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds' 'libmcrypt' 'tidyhtml' 'aspell' 'libltdl' 'gd'
+ 'icu'
+ 'curl' 'libxslt' 'openssl' 'db' 'gmp' 'systemd')
+backup=('etc/httpd/conf/extra/php5_module.conf')
+provides=("$_name=$pkgver")
+conflicts=("$_name")
+source=("http://www.php.net/distributions/${_base}-${pkgver}.tar.gz"
+ 'php.ini.patch'
+ 'apache.conf'
+ 'php-fpm.conf.in.patch')
+md5sums=('5afb2f6467f525ae38a9ce6f1acf5c6a'
+ '0e5a8cf6e851b2c68dd638ce63f82647'
+ 'dec2cbaad64e3abf4f0ec70e1de4e8e9'
+ 'b9d7ead46639bbcd6c6d6e8b4876ed7f')
+
+prepare() {
+ cd "${srcdir}/${_base}-${pkgver}"
+
+ patch -p0 -i "${srcdir}/php.ini.patch"
+ patch -p0 -i "${srcdir}/php-fpm.conf.in.patch"
+ # Just because our Apache 2.4 is configured with a threaded MPM by default does not mean we want to build a ZTS PHP.
+ # Let's supress this behaviour and build a SAPI that works fine with the prefork MPM.
+ # php-apache22 note: causes no harm(?) so leave it
+ sed '/APACHE_THREADED_MPM=/d' -i sapi/apache2handler/config.m4 -i configure
+}
+
+build() {
+ local _phpconfig="--srcdir=../${_base}-${pkgver} \
+ --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-dba=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-xpm-dir=/usr \
+ --with-gd=shared,/usr \
+ --with-gdbm \
+ --with-gettext=shared \
+ --with-gmp=shared \
+ --with-iconv=shared \
+ --with-icu-dir=/usr \
+ --with-imap-ssl \
+ --with-imap=shared \
+ --with-jpeg-dir=/usr \
+ --with-vpx-dir=/usr \
+ --with-ldap=shared \
+ --with-ldap-sasl \
+ --with-libzip \
+ --with-mcrypt=shared \
+ --with-mhash \
+ --with-mssql=shared \
+ --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-tidy=shared \
+ --with-unixODBC=shared,/usr \
+ --with-xmlrpc=shared \
+ --with-xsl=shared \
+ --with-zlib \
+ --with-kerberos \
+ "
+
+ # Don't think these are needed since we're only making the php-apache(22) package, but i cba to check so i'm leaving them. Certainly isn't going to hurt anything.
+ EXTENSION_DIR=/usr/lib/php/modules
+ export EXTENSION_DIR
+ PEAR_INSTALLDIR=/usr/share/pear
+ export PEAR_INSTALLDIR
+
+ cd "${srcdir}/${_base}-${pkgver}"
+ mkdir "${srcdir}/build-apache"
+ cd "${srcdir}/build-apache"
+ ln -s "../${_base}-${pkgver}/configure"
+ ./configure ${_phpconfig} \
+ --disable-cli \
+ --with-apxs2 \
+ ${_phpextensions}
+ make
+}
+
+
+package() {
+ install -D -m755 "${srcdir}/build-apache/libs/libphp5.so" "${pkgdir}/usr/lib/httpd/modules/libphp5.so"
+ install -D -m644 "${srcdir}/apache.conf" "${pkgdir}/etc/httpd/conf/extra/php5_module.conf"
+}
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 000000000000..c3ca0aad509e
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php5_module
+
+<IfModule dir_module>
+ <IfModule php5_module>
+ DirectoryIndex index.php index.html
+ <FilesMatch "\.php$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+ </IfModule>
+</IfModule>
diff --git a/php-fpm.conf.in.patch b/php-fpm.conf.in.patch
new file mode 100644
index 000000000000..19ffb976b977
--- /dev/null
+++ b/php-fpm.conf.in.patch
@@ -0,0 +1,52 @@
+--- sapi/fpm/php-fpm.conf.in 2015-01-21 01:40:37.000000000 +0100
++++ sapi/fpm/php-fpm.conf.in 2015-01-22 16:22:09.076969777 +0100
+@@ -12,7 +12,7 @@
+ ; Relative path can also be used. They will be prefixed by:
+ ; - the global prefix if it's been set (-p argument)
+ ; - @prefix@ otherwise
+-;include=etc/fpm.d/*.conf
++;include=/etc/php/fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -22,7 +22,7 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = /run/php-fpm/php-fpm.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+@@ -161,7 +161,8 @@
+ ; (IPv6 and IPv4-mapped) on a specific port;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+ ; Note: This value is mandatory.
+-listen = 127.0.0.1:9000
++;listen = 127.0.0.1:9000
++listen = /run/php-fpm/php-fpm.sock
+
+ ; Set listen(2) backlog.
+ ; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
+@@ -172,9 +173,9 @@
+ ; BSD-derived systems allow connections regardless of permissions.
+ ; Default Values: user and group are set as the running user
+ ; mode is set to 0660
+-;listen.owner = @php_fpm_user@
+-;listen.group = @php_fpm_group@
+-;listen.mode = 0660
++listen.owner = @php_fpm_user@
++listen.group = @php_fpm_group@
++listen.mode = 0660
+ ; When POSIX Access Control Lists are supported you can set them using
+ ; these options, value is a comma separated list of user/group names.
+ ; When set, listen.owner and listen.group are ignored
+@@ -476,7 +477,7 @@
+ ; Chdir to this directory at the start.
+ ; Note: relative path can be used.
+ ; Default Value: current directory or / when chroot
+-;chdir = /var/www
++;chdir = /srv/http
+
+ ; Redirect worker stdout and stderr into main error log. If not set, stdout and
+ ; stderr will be redirected to /dev/null according to FastCGI specs. \ No newline at end of file
diff --git a/php.ini.patch b/php.ini.patch
new file mode 100644
index 000000000000..ade782a709a6
--- /dev/null
+++ b/php.ini.patch
@@ -0,0 +1,121 @@
+--- php.ini-production 2015-01-21 01:40:37.000000000 +0100
++++ php.ini-production 2015-01-22 16:23:17.311890258 +0100
+@@ -295,7 +295,7 @@
+ ; and below. This directive makes most sense if used in a per-directory
+ ; or per-virtualhost web server configuration file.
+ ; http://php.net/open-basedir
+-;open_basedir =
++open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/
+
+ ; This directive allows you to disable certain functions for security reasons.
+ ; It receives a comma-delimited list of function names.
+@@ -708,7 +708,7 @@
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:/usr/share/pear"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -731,7 +731,7 @@
+
+ ; Directory in which the loadable extensions (modules) reside.
+ ; http://php.net/extension-dir
+-; extension_dir = "./"
++extension_dir = "/usr/lib/php/modules/"
+ ; On windows:
+ ; extension_dir = "ext"
+
+@@ -869,49 +869,48 @@
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
+-; Windows Extensions
+-; Note that ODBC support is built in, so no dll is needed for it.
+-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
+-; extension folders as well as the separate PECL DLL download (PHP 5).
+-; Be sure to appropriately set the extension_dir directive.
+-;
+-;extension=php_bz2.dll
+-;extension=php_curl.dll
+-;extension=php_fileinfo.dll
+-;extension=php_gd2.dll
+-;extension=php_gettext.dll
+-;extension=php_gmp.dll
+-;extension=php_intl.dll
+-;extension=php_imap.dll
+-;extension=php_interbase.dll
+-;extension=php_ldap.dll
+-;extension=php_mbstring.dll
+-;extension=php_exif.dll ; Must be after mbstring as it depends on it
+-;extension=php_mysql.dll
+-;extension=php_mysqli.dll
+-;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
+-;extension=php_openssl.dll
+-;extension=php_pdo_firebird.dll
+-;extension=php_pdo_mysql.dll
+-;extension=php_pdo_oci.dll
+-;extension=php_pdo_odbc.dll
+-;extension=php_pdo_pgsql.dll
+-;extension=php_pdo_sqlite.dll
+-;extension=php_pgsql.dll
+-;extension=php_pspell.dll
+-;extension=php_shmop.dll
+-
+-; The MIBS data available in the PHP distribution must be installed.
+-; See http://www.php.net/manual/en/snmp.installation.php
+-;extension=php_snmp.dll
+-
+-;extension=php_soap.dll
+-;extension=php_sockets.dll
+-;extension=php_sqlite3.dll
+-;extension=php_sybase_ct.dll
+-;extension=php_tidy.dll
+-;extension=php_xmlrpc.dll
+-;extension=php_xsl.dll
++;extension=bcmath.so
++;extension=bz2.so
++;extension=calendar.so
++extension=curl.so
++;extension=dba.so
++;extension=enchant.so
++;extension=exif.so
++;extension=ftp.so
++;extension=gd.so
++extension=gettext.so
++;extension=gmp.so
++;extension=iconv.so
++;extension=imap.so
++;extension=intl.so
++;extension=ldap.so
++;extension=mcrypt.so
++;extension=mssql.so
++;extension=mysql.so
++;extension=mysqli.so
++;extension=odbc.so
++;zend_extension=opcache.so
++;extension=openssl.so
++;extension=pdo_mysql.so
++;extension=pdo_odbc.so
++;extension=pdo_pgsql.so
++;extension=pdo_sqlite.so
++;extension=pgsql.so
++;extension=phar.so
++;extension=posix.so
++;extension=pspell.so
++;extension=shmop.so
++;extension=snmp.so
++;extension=soap.so
++;extension=sockets.so
++;extension=sqlite3.so
++;extension=sysvmsg.so
++;extension=sysvsem.so
++;extension=sysvshm.so
++;extension=tidy.so
++;extension=xmlrpc.so
++;extension=xsl.so
++;extension=zip.so
+
+ ;;;;;;;;;;;;;;;;;;;
+ ; Module Settings ; \ No newline at end of file