mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
added extra/php
This commit is contained in:
parent
c369fb1874
commit
8ed1dbf00e
8 changed files with 608 additions and 0 deletions
346
extra/php/PKGBUILD
Normal file
346
extra/php/PKGBUILD
Normal file
|
@ -0,0 +1,346 @@
|
|||
# $Id$
|
||||
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - revert upstream commits that break AArch64 build
|
||||
|
||||
pkgbase=php
|
||||
pkgname=('php'
|
||||
'php-cgi'
|
||||
'php-apache'
|
||||
'php-fpm'
|
||||
'php-embed'
|
||||
'php-phpdbg'
|
||||
'php-dblib'
|
||||
'php-enchant'
|
||||
'php-gd'
|
||||
'php-imap'
|
||||
'php-intl'
|
||||
'php-mcrypt'
|
||||
'php-odbc'
|
||||
'php-pgsql'
|
||||
'php-pspell'
|
||||
'php-snmp'
|
||||
'php-sqlite'
|
||||
'php-tidy'
|
||||
'php-xsl')
|
||||
pkgver=7.0.14
|
||||
pkgrel=1
|
||||
arch=('i686' 'x86_64')
|
||||
license=('PHP')
|
||||
url='http://www.php.net'
|
||||
makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libmcrypt' 'libxslt' 'libzip' 'net-snmp'
|
||||
'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'postfix' 'freetds' 'pcre')
|
||||
checkdepends=('procps-ng')
|
||||
source=("https://php.net/distributions/${pkgbase}-${pkgver}.tar.xz"{,.asc}
|
||||
'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch'
|
||||
'https://github.com/php/php-src/commit/c2173c16d038cf99c5eff12ddc76f99d46a35c57.patch'
|
||||
'https://github.com/php/php-src/commit/d4b3f89c53f8812cbaede013d7e4000917cf27e1.patch')
|
||||
sha256sums=('0f1dff6392a1cc2ed126b9695f580a2ed77eb09d2c23b41cabfb41e6f27a8c89'
|
||||
'SKIP'
|
||||
'819f05d2fd5a75c96e93c863517ca77dbd021a1224dc2d8096f758fb2937df6a'
|
||||
'ebc0af1ef3a6baccb013d0ccb29923895a7b22ff2d032e3bba802dc6328301ce'
|
||||
'136e197384255420c73678aef812e70aa86320f6dbefcc5a952df1a65fdd53fa'
|
||||
'640dba0d960bfeaae9ad38d2826d3f6b5d6c175a4d3e16664eefff29141faad5'
|
||||
'd37ce253f1096df1702fe2b0272a0919e8a02cc9e05b868d5f54b506fc6ce0d3'
|
||||
'31aa9edd0e4b45478f873b1e444204d9014fc5e005c8ecf1da386f6003647cba'
|
||||
'1d036b2010bb5a957bd69436d854be72f36364f302d85f62092136b860bf04d2')
|
||||
validpgpkeys=('1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763'
|
||||
'6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${pkgbase}-${pkgver}
|
||||
|
||||
patch -p0 -i ${srcdir}/apache.patch
|
||||
patch -p0 -i ${srcdir}/php-fpm.patch
|
||||
patch -p0 -i ${srcdir}/php.ini.patch
|
||||
|
||||
if [[ $CARCH == "aarch64" ]]; then
|
||||
patch -p1 -R -i ../c2173c16d038cf99c5eff12ddc76f99d46a35c57.patch
|
||||
patch -p1 -R -i ../d4b3f89c53f8812cbaede013d7e4000917cf27e1.patch
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
local _phpconfig="--srcdir=../${pkgbase}-${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 \
|
||||
--enable-zend-signals \
|
||||
"
|
||||
|
||||
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-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-freetype-dir=/usr \
|
||||
--with-gd=shared,/usr \
|
||||
--with-gdbm \
|
||||
--with-gettext=shared \
|
||||
--with-gmp=shared \
|
||||
--with-iconv=shared \
|
||||
--with-imap-ssl \
|
||||
--with-imap=shared \
|
||||
--with-kerberos=/usr \
|
||||
--with-ldap=shared \
|
||||
--with-ldap-sasl \
|
||||
--with-libzip \
|
||||
--with-mcrypt=shared \
|
||||
--with-mhash \
|
||||
--with-mysql-sock=/run/mysqld/mysqld.sock \
|
||||
--with-mysqli=shared,mysqlnd \
|
||||
--with-openssl \
|
||||
--with-pcre-regex=/usr \
|
||||
--with-pdo-dblib=shared,/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-pspell=shared \
|
||||
--with-readline \
|
||||
--with-snmp=shared \
|
||||
--with-sqlite3=shared,/usr \
|
||||
--with-tidy=shared \
|
||||
--with-unixODBC=shared,/usr \
|
||||
--with-xmlrpc=shared \
|
||||
--with-xsl=shared \
|
||||
--with-zlib \
|
||||
--enable-pcntl \
|
||||
"
|
||||
|
||||
EXTENSION_DIR=/usr/lib/php/modules
|
||||
export EXTENSION_DIR
|
||||
|
||||
mkdir ${srcdir}/build
|
||||
cd ${srcdir}/build
|
||||
ln -s ../${pkgbase}-${pkgver}/configure
|
||||
./configure ${_phpconfig} \
|
||||
--enable-cgi \
|
||||
--enable-fpm \
|
||||
--with-fpm-systemd \
|
||||
--with-fpm-acl \
|
||||
--with-fpm-user=http \
|
||||
--with-fpm-group=http \
|
||||
--enable-embed=shared \
|
||||
${_phpextensions}
|
||||
make
|
||||
|
||||
# apache
|
||||
# reuse the previous run; this will save us a lot of time
|
||||
cp -a ${srcdir}/build ${srcdir}/build-apache
|
||||
cd ${srcdir}/build-apache
|
||||
./configure ${_phpconfig} \
|
||||
--with-apxs2 \
|
||||
${_phpextensions}
|
||||
make
|
||||
|
||||
# phpdbg
|
||||
cp -a ${srcdir}/build ${srcdir}/build-phpdbg
|
||||
cd ${srcdir}/build-phpdbg
|
||||
./configure ${_phpconfig} \
|
||||
--enable-phpdbg \
|
||||
${_phpextensions}
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd ${srcdir}/${pkgbase}-${pkgver}
|
||||
|
||||
# Check if sendmail was configured correctly (FS#47600)
|
||||
${srcdir}/build/sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail'
|
||||
|
||||
export REPORT_EXIT_STATUS=1
|
||||
export NO_INTERACTION=1
|
||||
export SKIP_ONLINE_TESTS=1
|
||||
export SKIP_SLOW_TESTS=1
|
||||
|
||||
${srcdir}/build/sapi/cli/php -n run-tests.php -n -P {tests,Zend}
|
||||
}
|
||||
|
||||
package_php() {
|
||||
pkgdesc='A general-purpose scripting language that is especially suited to web development'
|
||||
depends=('libxml2' 'curl' 'libzip' 'pcre')
|
||||
replaces=('php-ldap')
|
||||
conflicts=('php-ldap')
|
||||
provides=("php-ldap=${pkgver}")
|
||||
backup=('etc/php/php.ini')
|
||||
|
||||
cd ${srcdir}/build
|
||||
make -j1 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd}
|
||||
install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini
|
||||
install -d -m755 ${pkgdir}/etc/php/conf.d/
|
||||
|
||||
# remove static modules
|
||||
rm -f ${pkgdir}/usr/lib/php/modules/*.a
|
||||
# remove modules provided by sub packages
|
||||
rm -f ${pkgdir}/usr/lib/php/modules/{enchant,gd,imap,intl,mcrypt,odbc,pdo_dblib,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
|
||||
# remove empty directory
|
||||
rmdir ${pkgdir}/usr/include/php/include
|
||||
}
|
||||
|
||||
package_php-cgi() {
|
||||
pkgdesc='CGI and FCGI SAPI for PHP'
|
||||
depends=('php')
|
||||
|
||||
cd ${srcdir}/build
|
||||
make -j1 INSTALL_ROOT=${pkgdir} install-cgi
|
||||
}
|
||||
|
||||
package_php-apache() {
|
||||
pkgdesc='Apache SAPI for PHP'
|
||||
depends=('php' 'apache')
|
||||
backup=('etc/httpd/conf/extra/php7_module.conf')
|
||||
|
||||
install -D -m755 ${srcdir}/build-apache/libs/libphp7.so ${pkgdir}/usr/lib/httpd/modules/libphp7.so
|
||||
install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php7_module.conf
|
||||
}
|
||||
|
||||
package_php-fpm() {
|
||||
pkgdesc='FastCGI Process Manager for PHP'
|
||||
depends=('php' 'systemd')
|
||||
backup=('etc/php/php-fpm.conf' 'etc/php/php-fpm.d/www.conf')
|
||||
install='php-fpm.install'
|
||||
options=('!emptydirs')
|
||||
|
||||
cd ${srcdir}/build
|
||||
make -j1 INSTALL_ROOT=${pkgdir} install-fpm
|
||||
install -D -m644 sapi/fpm/php-fpm.service ${pkgdir}/usr/lib/systemd/system/php-fpm.service
|
||||
install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/php-fpm.conf
|
||||
}
|
||||
|
||||
package_php-embed() {
|
||||
pkgdesc='Embedded PHP SAPI library'
|
||||
depends=('php' 'libsystemd')
|
||||
options=('!emptydirs')
|
||||
|
||||
cd ${srcdir}/build
|
||||
make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi
|
||||
}
|
||||
|
||||
package_php-phpdbg() {
|
||||
pkgdesc='Interactive PHP debugger'
|
||||
depends=('php')
|
||||
options=('!emptydirs')
|
||||
|
||||
cd ${srcdir}/build-phpdbg
|
||||
make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg
|
||||
}
|
||||
|
||||
package_php-dblib() {
|
||||
pkgdesc='dblib module for PHP'
|
||||
depends=('php' 'freetds')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}/usr/lib/php/modules/pdo_dblib.so
|
||||
}
|
||||
|
||||
package_php-enchant() {
|
||||
pkgdesc='enchant module for PHP'
|
||||
depends=('php' 'enchant')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so
|
||||
}
|
||||
|
||||
package_php-gd() {
|
||||
pkgdesc='gd module for PHP'
|
||||
depends=('php' 'gd')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so
|
||||
}
|
||||
|
||||
package_php-imap() {
|
||||
pkgdesc='imap module for PHP'
|
||||
depends=('php' 'c-client')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}/usr/lib/php/modules/imap.so
|
||||
}
|
||||
|
||||
package_php-intl() {
|
||||
pkgdesc='intl module for PHP'
|
||||
depends=('php' 'icu')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so
|
||||
}
|
||||
|
||||
package_php-mcrypt() {
|
||||
pkgdesc='mcrypt module for PHP'
|
||||
depends=('php' 'libmcrypt' 'libtool')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so
|
||||
}
|
||||
|
||||
package_php-odbc() {
|
||||
pkgdesc='ODBC modules for PHP'
|
||||
depends=('php' 'unixodbc')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so
|
||||
install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so
|
||||
}
|
||||
|
||||
package_php-pgsql() {
|
||||
pkgdesc='PostgreSQL modules for PHP'
|
||||
depends=('php' 'postgresql-libs')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so
|
||||
install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so
|
||||
}
|
||||
|
||||
package_php-pspell() {
|
||||
pkgdesc='pspell module for PHP'
|
||||
depends=('php' 'aspell')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so
|
||||
}
|
||||
|
||||
package_php-snmp() {
|
||||
pkgdesc='snmp module for PHP'
|
||||
depends=('php' 'net-snmp')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so
|
||||
}
|
||||
|
||||
package_php-sqlite() {
|
||||
pkgdesc='sqlite module for PHP'
|
||||
depends=('php' 'sqlite')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so
|
||||
install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so
|
||||
}
|
||||
|
||||
package_php-tidy() {
|
||||
pkgdesc='tidy module for PHP'
|
||||
depends=('php' 'tidy')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so
|
||||
}
|
||||
|
||||
package_php-xsl() {
|
||||
pkgdesc='xsl module for PHP'
|
||||
depends=('php' 'libxslt')
|
||||
|
||||
install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so
|
||||
}
|
13
extra/php/apache.conf
Normal file
13
extra/php/apache.conf
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Required modules: dir_module, php7_module
|
||||
|
||||
<IfModule dir_module>
|
||||
<IfModule php7_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>
|
20
extra/php/apache.patch
Normal file
20
extra/php/apache.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- sapi/apache2handler/config.m4.orig
|
||||
+++ sapi/apache2handler/config.m4
|
||||
@@ -122,7 +122,6 @@
|
||||
PHP_BUILD_THREAD_SAFE
|
||||
fi
|
||||
else
|
||||
- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
|
||||
if test -n "$APACHE_THREADED_MPM"; then
|
||||
PHP_BUILD_THREAD_SAFE
|
||||
fi
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -6919,7 +6919,6 @@
|
||||
|
||||
fi
|
||||
else
|
||||
- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
|
||||
if test -n "$APACHE_THREADED_MPM"; then
|
||||
|
||||
enable_maintainer_zts=yes
|
48
extra/php/generate_patches
Executable file
48
extra/php/generate_patches
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
. PKGBUILD
|
||||
|
||||
makepkg -o --nodeps --noprepare --skipinteg
|
||||
|
||||
pushd src/${pkgbase}-${pkgver}
|
||||
|
||||
sed '/APACHE_THREADED_MPM=/d' -i.orig sapi/apache2handler/config.m4 -i.orig configure
|
||||
|
||||
sed 's/.conf.default/.conf/g' -i.orig sapi/fpm/Makefile.frag
|
||||
|
||||
sed \
|
||||
-e 's#run/php-fpm.pid#/run/php-fpm/php-fpm.pid#' \
|
||||
-e 's#^;error_log =.*#error_log = syslog#' \
|
||||
-i.orig sapi/fpm/php-fpm.conf.in
|
||||
|
||||
sed \
|
||||
-e 's#^listen =.*#listen = /run/php-fpm/php-fpm.sock#' \
|
||||
-e 's#^;listen.owner =#listen.owner =#' \
|
||||
-e 's#^;listen.group =#listen.group =#' \
|
||||
-e 's#^;chdir =.*#;chdir = /srv/http#' \
|
||||
-i.orig sapi/fpm/www.conf.in
|
||||
|
||||
sed \
|
||||
-e 's#^PIDFile=.*#PIDFile=/run/php-fpm/php-fpm.pid#' \
|
||||
-i.orig sapi/fpm/php-fpm.service.in
|
||||
|
||||
extensions=";extension=bcmath.so\n;extension=bz2.so\n;extension=calendar.so\nextension=curl.so\n;extension=dba.so\n;extension=enchant.so\n;extension=exif.so\n;extension=ftp.so\n;extension=gd.so\n;extension=gettext.so\n;extension=gmp.so\n;extension=iconv.so\n;extension=imap.so\n;extension=intl.so\n;extension=ldap.so\n;extension=mcrypt.so\n;extension=mysqli.so\n;extension=odbc.so\n;zend_extension=opcache.so\n;extension=pdo_dblib.so\n;extension=pdo_mysql.so\n;extension=pdo_odbc.so\n;extension=pdo_pgsql.so\n;extension=pdo_sqlite.so\n;extension=pgsql.so\n;extension=pspell.so\n;extension=shmop.so\n;extension=snmp.so\n;extension=soap.so\n;extension=sockets.so\n;extension=sqlite3.so\n;extension=sysvmsg.so\n;extension=sysvsem.so\n;extension=sysvshm.so\n;extension=tidy.so\n;extension=xmlrpc.so\n;extension=xsl.so\nextension=zip.so\n"
|
||||
|
||||
sed \
|
||||
-r ":a;N;\$!ba;s/; Windows Extensions\n.+;?extension=php_[a-z]+\.dll\n/${extensions}/g" \
|
||||
-i.orig php.ini-production
|
||||
sed \
|
||||
-e 's#^; extension_dir = "\./"$#extension_dir = "/usr/lib/php/modules/"#g' \
|
||||
-i php.ini-production
|
||||
|
||||
diff -u sapi/apache2handler/config.m4.orig sapi/apache2handler/config.m4 | filterdiff --clean --remove-timestamps > ../../apache.patch
|
||||
diff -u configure.orig configure | filterdiff --clean --remove-timestamps >> ../../apache.patch
|
||||
|
||||
diff -u sapi/fpm/Makefile.frag.orig sapi/fpm/Makefile.frag | filterdiff --clean --remove-timestamps > ../../php-fpm.patch
|
||||
diff -u sapi/fpm/php-fpm.conf.in.orig sapi/fpm/php-fpm.conf.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch
|
||||
diff -u sapi/fpm/www.conf.in.orig sapi/fpm/www.conf.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch
|
||||
diff -u sapi/fpm/php-fpm.service.in.orig sapi/fpm/php-fpm.service.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch
|
||||
|
||||
diff -u php.ini-production.orig php.ini-production | filterdiff --clean --remove-timestamps > ../../php.ini.patch
|
||||
|
||||
popd
|
9
extra/php/php-fpm.install
Normal file
9
extra/php/php-fpm.install
Normal file
|
@ -0,0 +1,9 @@
|
|||
post_install() {
|
||||
if [[ ! -d run/php-fpm ]]; then
|
||||
usr/bin/systemd-tmpfiles --create php-fpm.conf
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
74
extra/php/php-fpm.patch
Normal file
74
extra/php/php-fpm.patch
Normal file
|
@ -0,0 +1,74 @@
|
|||
--- sapi/fpm/Makefile.frag.orig
|
||||
+++ sapi/fpm/Makefile.frag
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
@echo "Installing PHP FPM config: $(INSTALL_ROOT)$(sysconfdir)/" && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d || :
|
||||
- @$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || :
|
||||
- @$(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default || :
|
||||
+ @$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf || :
|
||||
+ @$(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf || :
|
||||
|
||||
@echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/"
|
||||
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
|
||||
--- sapi/fpm/php-fpm.conf.in.orig
|
||||
+++ sapi/fpm/php-fpm.conf.in
|
||||
@@ -14,14 +14,14 @@
|
||||
; 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
|
||||
; in a local file.
|
||||
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
|
||||
; Default Value: log/php-fpm.log
|
||||
-;error_log = log/php-fpm.log
|
||||
+error_log = syslog
|
||||
|
||||
; syslog_facility is used to specify what type of program is logging the
|
||||
; message. This lets syslogd specify that messages from different facilities
|
||||
--- sapi/fpm/www.conf.in.orig
|
||||
+++ sapi/fpm/www.conf.in
|
||||
@@ -33,7 +33,7 @@
|
||||
; (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 = /run/php-fpm/php-fpm.sock
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
@@ -44,8 +44,8 @@
|
||||
; 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.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.
|
||||
@@ -352,7 +352,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.
|
||||
--- sapi/fpm/php-fpm.service.in.orig
|
||||
+++ sapi/fpm/php-fpm.service.in
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
[Service]
|
||||
Type=@php_fpm_systemd@
|
||||
-PIDFile=@localstatedir@/run/php-fpm.pid
|
||||
+PIDFile=/run/php-fpm/php-fpm.pid
|
||||
ExecStart=@sbindir@/php-fpm --nodaemonize --fpm-config @sysconfdir@/php-fpm.conf
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
|
1
extra/php/php-fpm.tmpfiles
Normal file
1
extra/php/php-fpm.tmpfiles
Normal file
|
@ -0,0 +1 @@
|
|||
d /run/php-fpm 755 root root
|
97
extra/php/php.ini.patch
Normal file
97
extra/php/php.ini.patch
Normal file
|
@ -0,0 +1,97 @@
|
|||
--- php.ini-production.orig
|
||||
+++ php.ini-production
|
||||
@@ -718,7 +718,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"
|
||||
|
||||
@@ -868,47 +868,44 @@
|
||||
; 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_ftp.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_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_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_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=mysqli.so
|
||||
+;extension=odbc.so
|
||||
+;zend_extension=opcache.so
|
||||
+;extension=pdo_dblib.so
|
||||
+;extension=pdo_mysql.so
|
||||
+;extension=pdo_odbc.so
|
||||
+;extension=pdo_pgsql.so
|
||||
+;extension=pdo_sqlite.so
|
||||
+;extension=pgsql.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 ;
|
Loading…
Reference in a new issue