4.10.3-2: add gtktreeviewmodel fixes
[arch-packages.git] / php / repos / extra-x86_64 / generate_patches
blob5b22732282468eeb38571ab0236bd21b1a8d02dd
1 #!/bin/bash
3 . PKGBUILD
5 makepkg -o --nodeps --noprepare --skipinteg
7 pushd "src/${pkgbase}-${pkgver}"
9 sed '/APACHE_THREADED_MPM=/d' -i.orig sapi/apache2handler/config.m4
11 sed 's/.conf.default/.conf/g' -i.orig sapi/fpm/Makefile.frag
13 sed \
14 -e 's#run/php-fpm.pid#/run/php-fpm/php-fpm.pid#' \
15 -e 's#^;error_log =.*#error_log = syslog#' \
16 -i.orig sapi/fpm/php-fpm.conf.in
18 sed \
19 -e 's#^listen =.*#listen = /run/php-fpm/php-fpm.sock#' \
20 -e 's#^;listen.owner =#listen.owner =#' \
21 -e 's#^;listen.group =#listen.group =#' \
22 -e 's#^;chdir =.*#;chdir = /srv/http#' \
23 -i.orig sapi/fpm/www.conf.in
25 sed \
26 -e 's#^PIDFile=.*#PIDFile=/run/php-fpm/php-fpm.pid#' \
27 -i.orig sapi/fpm/php-fpm.service.in
29 # available extensions after build
30 # find /var/lib/archbuild/*-x86_64/*/build/php/src/build/modules -name '*.so' -exec basename {} .so \; | sort -u
31 availableExtensions=(
32 bcmath
33 bz2
34 calendar
35 curl
36 dba
37 enchant
38 exif
39 ffi
40 ftp
42 gettext
43 gmp
44 iconv
45 intl
46 ldap
47 mysqli
48 odbc
49 opcache
50 pdo_dblib
51 pdo_mysql
52 pdo_odbc
53 pdo_pgsql
54 pdo_sqlite
55 pgsql
56 pspell
57 shmop
58 snmp
59 soap
60 sockets
61 sodium
62 sqlite3
63 sysvmsg
64 sysvsem
65 sysvshm
66 tidy
67 xsl
68 zip
71 extensions=''
72 for extension in "${availableExtensions[@]}"; do
73 if [[ $extension == 'curl' ]]; then
74 extensions+="extension=${extension}\n"
75 elif [[ $extension == 'opcache' ]]; then
76 extensions+=";zend_extension=${extension}\n"
77 elif [[ $extension == 'zip' ]]; then
78 extensions+="extension=${extension}\n"
79 else
80 extensions+=";extension=${extension}\n"
82 done
84 sed \
85 -r ":a;N;\$!ba;s/; Notes for Windows environments :\n.+;?extension=\w+\n/${extensions}/g" \
86 -i.orig php.ini-production
87 sed \
88 -e 's#^;extension_dir = "\./"$#extension_dir = "/usr/lib/php/modules/"#g' \
89 -i php.ini-production
91 diff -u sapi/apache2handler/config.m4.orig sapi/apache2handler/config.m4 | filterdiff --clean --remove-timestamps > ../../apache.patch
94 diff -u sapi/fpm/Makefile.frag.orig sapi/fpm/Makefile.frag
95 diff -u sapi/fpm/php-fpm.conf.in.orig sapi/fpm/php-fpm.conf.in
96 diff -u sapi/fpm/www.conf.in.orig sapi/fpm/www.conf.in
97 diff -u sapi/fpm/php-fpm.service.in.orig sapi/fpm/php-fpm.service.in
98 } | filterdiff --clean --remove-timestamps > ../../php-fpm.patch
100 diff -u php.ini-production.orig php.ini-production | filterdiff --clean --remove-timestamps > ../../php.ini.patch
102 popd