summarylogtreecommitdiffstats
path: root/generate_patches
diff options
context:
space:
mode:
authorkrant2016-11-16 12:11:36 +0200
committerkrant2016-11-16 12:11:36 +0200
commit8da2e38bf060e783fce009905b386b0dfa977e53 (patch)
tree0599aec73be5bd2fe3a0b601f0505a6ab3771c4b /generate_patches
downloadaur-8da2e38bf060e783fce009905b386b0dfa977e53.tar.gz
initial commit
Diffstat (limited to 'generate_patches')
-rwxr-xr-xgenerate_patches48
1 files changed, 48 insertions, 0 deletions
diff --git a/generate_patches b/generate_patches
new file mode 100755
index 00000000000..fcd9b3d92ce
--- /dev/null
+++ b/generate_patches
@@ -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