Magellan Linux

Contents of /trunk/extras/php/php-5.4.10-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14537 - (show annotations) (download)
Sun Dec 30 23:41:41 2012 UTC (11 years, 5 months ago) by niro
File size: 17201 byte(s)
auto added: ver bump to 5.4.10-r1
1 # $Id$
2
3 PNAME="php"
4 PVER="5.4.10"
5 PBUILD="r1"
6
7 SPLIT_PACKAGES="php
8 php-cgi
9 php-apache
10 php-fpm
11 php-embedded
12 php-pear
13 php-bcmath
14 php-curl
15 php-dba
16 php-enchant
17 php-gd
18 php-gmp
19 php-intl
20 php-ldap
21 php-mbstring
22 php-pdo
23 php-mysql
24 php-odbc
25 php-process
26 php-pspell
27 php-soap
28 php-sqlite
29 php-tidy
30 php-xml
31 php-xmlrpc"
32
33 # splits with more then one module:
34 # php-odbc = odbc, pdo_odbc
35 # php-mysql = mysql, mysqli, pdo_mysql
36 # php-xml = xsl, wddx, dom, xmlreader, xmlwriter
37 # php-process = sysvmsg, sysvsem, sysvshm, posix
38 # php-sqlite = sqlite, sqlite3, pdo_sqlite
39 #
40 # todo: mssql -> requires freetds
41 # mcrypt -> requires libmcrypt
42
43 PCAT="dev-lang"
44 HOMEPAGE="http://php.net/"
45
46 DEPEND_COMMON=">= sys-libs/ncurses-5.9
47 >= sys-libs/readline-6.2
48 >= sys-libs/zlib-1.2
49 >= app-arch/bzip2-1
50 >= dev-libs/openssl-1.0.0g"
51 DEPEND_APACHE=">= net-www/apache-2.2"
52 DEPEND_ASPELL=">= app-text/aspell-0.60"
53 DEPEND_BDB=">= dev-db/db-5.3"
54 DEPEND_CURL=">= net-misc/curl-7.24"
55 DEPEND_ENCHANT=">= app-text/enchant-1.6"
56 DEPEND_GD=">= media-libs/libjpeg-8d
57 >= media-libs/libpng-1.5
58 >= x11-libs/libXpm-4
59 >= media-libs/freetype-2.4
60 >= media-libs/gd-2.0.35
61 >= media-libs/t1lib-5.1"
62 DEPEND_GMP=">= dev-libs/gmp-5"
63 DEPEND_INTL=">= dev-libs/icu-50
64 >= sys-libs/libgcc-4.7"
65 DEPEND_LDAP=">= net-nds/libldap-2.4"
66 DEPEND_MYSQL=">= dev-db/mysql-5.5"
67 DEPEND_ODBC=">= dev-db/unixodbc-2.3"
68 DEPEND_PCRE=">= dev-libs/libpcre-8.30"
69 DEPEMD_SASL=">= dev-libs/cyrus-sasl-2.1.23"
70 DEPEND_SQLITE=">= dev-db/sqlite-3.7"
71 DEPEND_TIDY=">= app-text/htmltidy-1.46"
72 DEPEND_XML=">= dev-libs/libxml2-2.7"
73 DEPEND_XSLT=">= dev-libs/libxslt-1.1.26"
74 DEPEND_SYSTEMD=">= sys-apps/systemd-195"
75
76 # ToDO: mcrypt, imap, mhash, maintainer-zts, intl
77 SDEPEND="${DEPEND_COMMON}
78 ${DEPEND_APACHE}
79 ${DEPEND_ASPELL}
80 ${DEPEND_BDB}
81 ${DEPEND_CURL}
82 ${DEPEND_ENCHANT}
83 ${DEPEND_GD}
84 ${DEPEND_GMP}
85 ${DEPEND_INTL}
86 ${DEPEND_LDAP}
87 ${DEPEND_MYSQL}
88 ${DEPEND_ODBC}
89 ${DEPEND_PCRE}
90 ${DEPEND_SASL}
91 ${DEPEND_SQLITE}
92 ${DEPEND_TIDY}
93 ${DEPEND_XML}
94 ${DEPEND_XSLT}
95 ${DEPEND_SYSTEMD}
96 >= sys-dev/m4-1.4
97 >= sys-dev/libtool-1.5
98 >= sys-dev/gettext-0.17
99 >= sys-apps/sed-4"
100
101 SRCFILE="${PNAME/5/}-${PVER}.tar.bz2"
102 SRCDIR="${BUILDDIR}/${PNAME/5/}-${PVER}"
103
104 sminclude mtools php
105
106 SRC_URI=(
107 http://de2.php.net/distributions/${SRCFILE}
108 http://us2.php.net/distributions/${SRCFILE}
109 mirror://${PNAME}/${SRCFILE}
110 mirror://${PNAME}/${PNAME}-5.2.4-multilib.patch
111 mirror://${PNAME}/${PNAME}-5.2.3-httpd-config.patch
112 mirror://${PNAME}/${PNAME}-5.2.4-build-dir.patch
113 mirror://${PNAME}/php5_module.conf
114 mirror://${PNAME}/php-fpm.conf
115 mirror://${PNAME}/php-fpm-www.conf
116 mirror://${PNAME}/php-fpm.service
117 mirror://${PNAME}/php-fpm.logrotate
118 mirror://${PNAME}/php-fpm.confd
119 mirror://${PNAME}/php-fpm.tmpfilesd
120 )
121
122 # 5.4 stable series
123 UP2TAG="5.4"
124 UP2DATE="updatecmd ${HOMEPAGE} | grep 'Current.*${UP2TAG}.*Stable' | sed 's/.*\:\ \(.*\)/\1/'"
125
126 split_info_php()
127 {
128 DESCRIPTION="PHP Hypertext Preprocessor, a scripting language especially suited for web development."
129 DEPEND="${DEPEND_COMMON}
130 ${DEPEND_XML}
131 ${DEPEND_PCRE}
132 ${DEPEND_SYSTEMD}"
133 }
134
135 split_info_php-cgi()
136 {
137 DESCRIPTION="GI and FCGI SAPI for PHP."
138 DEPEND="== dev-lang/php-${PVER}
139 ${DEPEND_XML}
140 ${DEPEND_PCRE}"
141 PCAT="dev-php"
142 }
143
144 split_info_php-apache()
145 {
146 DESCRIPTION="Apache SAPI for PHP."
147 DEPEND="== dev-lang/php-${PVER}
148 ${DEPEND_XML}
149 ${DEPEND_PCRE}
150 ${DEPEND_APACHE}"
151 PCAT="dev-php"
152 }
153
154 split_info_php-embedded()
155 {
156 DESCRIPTION="PHP library for embedding in applications."
157 DEPEND="== dev-lang/php-${PVER}
158 ${DEPEND_XML}
159 ${DEPEND_PCRE}"
160 PCAT="dev-php"
161 }
162
163 split_info_php-pear()
164 {
165 DESCRIPTION="PHP Extension and Application Repository."
166 DEPEND="== dev-lang/php-${PVER}"
167 PCAT="dev-php"
168 }
169
170 split_info_php-fpm()
171 {
172 DESCRIPTION="PHP FastCGI Process Manager."
173 DEPEND="== dev-lang/php-${PVER}
174 ${DEPEND_SYSTEMD}"
175 PCAT="dev-php"
176 }
177
178 split_info_php-bcmath()
179 {
180 DESCRIPTION="A module for PHP applications for using the bcmath library."
181 DEPEND="== dev-lang/php-${PVER}"
182 PCAT="dev-php"
183 }
184
185 split_info_php-curl()
186 {
187 DESCRIPTION="A module for PHP applications that use curl."
188 DEPEND="== dev-lang/php-${PVER}
189 ${DEPEND_CURL}"
190 PCAT="dev-php"
191 }
192
193 split_info_php-dba()
194 {
195 DESCRIPTION="A database abstraction layer module for PHP applications."
196 DEPEND="== dev-lang/php-${PVER}"
197 PCAT="dev-php"
198 }
199
200 split_info_php-enchant()
201 {
202 DESCRIPTION="Human Language and Character Encoding Support."
203 DEPEND="== dev-lang/php-${PVER}
204 ${DEPEND_ENCHANT}"
205 PCAT="dev-php"
206 }
207
208 split_info_php-gd()
209 {
210 DESCRIPTION="A module for PHP applications for using the gd graphics library."
211 DEPEND="== dev-lang/php-${PVER}
212 ${DEPEND_GD}"
213 PCAT="dev-php"
214 }
215
216 split_info_php-gmp()
217 {
218 DESCRIPTION="A module for PHP applications for using the gmp library."
219 DEPEND="== dev-lang/php-${PVER}
220 ${DEPEND_GMP}"
221 PCAT="dev-php"
222 }
223
224 split_info_php-intl()
225 {
226 DESCRIPTION="Internationalization extension for PHP applications."
227 DEPEND="== dev-lang/php-${PVER}
228 ${DEPEND_INTL}"
229 PCAT="dev-php"
230 }
231
232 split_info_php-ldap()
233 {
234 DESCRIPTION="A module for PHP applications that use LDAP."
235 DEPEND="== dev-lang/php-${PVER}
236 ${DEPEND_SASL}
237 ${DEPEND_LDAP}"
238 PCAT="dev-php"
239 }
240
241 split_info_php-mbstring()
242 {
243 DESCRIPTION="A module for PHP applications which need multi-byte string handling."
244 DEPEND="== dev-lang/php-${PVER}"
245 PCAT="dev-php"
246 }
247
248 split_info_php-mysql()
249 {
250 DESCRIPTION="Modules for PHP applications that use MySQL databases."
251 DEPEND="== dev-lang/php-${PVER}
252 == dev-lang/php-pdo-${PVER}
253 ${DEPEND_MYSQL}"
254 PCAT="dev-php"
255 }
256
257 split_info_php-odbc()
258 {
259 DESCRIPTION="Modules for PHP applications that use ODBC databases."
260 DEPEND="== dev-lang/php-${PVER}
261 == dev-lang/php-pdo-${PVER}
262 ${DEPEND_ODBC}"
263 PCAT="dev-php"
264 }
265
266 split_info_php-pdo()
267 {
268 DESCRIPTION="A database access abstraction module for PHP applications."
269 DEPEND="== dev-lang/php-${PVER}"
270 PCAT="dev-php"
271 }
272
273 split_info_php-process()
274 {
275 DESCRIPTION="Modules for PHP script using system process interfaces."
276 DEPEND="== dev-lang/php-${PVER}"
277 PCAT="dev-php"
278 }
279
280 split_info_php-pspell()
281 {
282 DESCRIPTION="A module for PHP applications for using pspell interfaces."
283 DEPEND="== dev-lang/php-${PVER}
284 ${DEPEND_ASPELL}"
285 PCAT="dev-php"
286 }
287
288 split_info_php-soap()
289 {
290 DESCRIPTION="A module for PHP applications that use the SOAP protocol."
291 DEPEND="== dev-lang/php-${PVER}
292 ${DEPEND_XML}"
293 PCAT="dev-php"
294 }
295
296 split_info_php-sqlite()
297 {
298 DESCRIPTION="Modules for PHP applications that use SQLite databases."
299 DEPEND="== dev-lang/php-${PVER}
300 == dev-lang/php-pdo-${PVER}
301 ${DEPEND_SQLITE}"
302 PCAT="dev-php"
303 }
304
305 split_info_php-tidy()
306 {
307 DESCRIPTION="Standard PHP module provides tidy library support."
308 DEPEND="== dev-lang/php-${PVER}
309 ${DEPEND_TIDY}"
310 PCAT="dev-php"
311 }
312
313 split_info_php-xml()
314 {
315 DESCRIPTION="Modules for PHP applications which use XML."
316 DEPEND="== dev-lang/php-${PVER}
317 ${DEPEND_XML}
318 ${DEPEND_XSLT}"
319 PCAT="dev-php"
320 }
321
322 split_info_php-xmlrpc()
323 {
324 DESCRIPTION="A module for PHP applications which use the XML-RPC protocol."
325 DEPEND="== dev-lang/php-${PVER}
326 ${DEPEND_XML}"
327 PCAT="dev-php"
328 }
329
330 # install-helper function
331 install_php_extensions()
332 {
333 local extensions="$@"
334 [[ -z ${extensions} ]] && die "no extensions given"
335
336 # set default PHP_BUILD_DIR, env can override this
337 : ${PHP_BUILD_DIR="${BUILDDIR}/build-php"}
338
339 cd ${PHP_BUILD_DIR}
340
341 # needed directories
342 minstalldir ${PHP_CONFIG_SCAN_DIR} || die
343 minstalldir ${PHP_EXTENSIONS_DIR} || die
344
345 local MCONFIG
346 local ext
347 for ext in ${extensions}
348 do
349 # install extensions and the config ini
350 minstallexec modules/${ext}.so ${PHP_EXTENSIONS_DIR} || die "mod ${ext}"
351 MCONFIG="${PHP_CONFIG_SCAN_DIR}/${ext}.ini"
352 mclearconfig || die "ini ${ext}"
353 maddconfig "extension=${ext}.so" || die "ini ${ext}"
354 done
355 }
356
357 src_prepare()
358 {
359 munpack ${SRCFILE} || die
360 cd ${SRCDIR}
361
362 # version branding
363 sed -i "s:^\(EXTRA_VERSION=\).*:\1-magellan-${PBUILD}:" configure.in || die
364
365 # fixes multilib search pathes
366 mpatch ${PNAME}-5.2.4-multilib.patch || die
367
368 # do not touch the system httpd.conf
369 mpatch ${PNAME}-5.2.3-httpd-config.patch || die
370
371 # fully regenerate aclocal too
372 if [ -f aclocal.m4 ]
373 then
374 rm aclocal.m4 || die
375 fi
376
377 # rebuild configure
378 mautoreconf || die
379
380 # force use of system libtool
381 mlibtoolize || die
382 }
383
384 src_compile()
385 {
386 local php_base_config
387 local php_extensions
388 local php_disable_shared_extensions
389 local current_run
390
391 # --with-libdir needed, doesn't honor --libdir
392 php_base_config="--libdir=/usr/lib \
393 --with-libdir=$(mlibdir) \
394 --with-config-file-path=${PHP_CONFIG_DIR} \
395 --with-config-file-scan-dir=${PHP_CONFIG_SCAN_DIR} \
396 --enable-inline-optimization \
397 --disable-rpath \
398 --disable-debug \
399 --disable-static \
400 --enable-shared \
401 --without-pear"
402
403 php_extensions="--with-zlib \
404 --with-bz2=shared \
405 --enable-bcmath=shared \
406 --enable-calendar=shared \
407 --enable-exif=shared \
408 --enable-ftp=shared \
409 --with-gettext=shared \
410 --enable-mbstring=shared \
411 --enable-mbregex \
412 --with-ncurses=shared \
413 --with-openssl=shared \
414 --with-jpeg-dir=/usr \
415 --with-png-dir=/usr \
416 --with-xpm-dir=/usr \
417 --with-gd=shared \
418 --enable-gd-native-ttf \
419 --with-freetype-dir=shared,/usr \
420 --with-ttf \
421 --with-t1lib=/usr \
422 --with-pcre-regex \
423 --with-gmp=shared \
424 --with-curl=shared \
425 --with-curlwrappers \
426 --enable-dba=shared \
427 --with-db4=shared \
428 --with-mysql=shared \
429 --with-mysqli=shared \
430 --with-unixODBC=shared,/usr \
431 --with-sqlite=shared \
432 --with-sqlite3=shared \
433 --enable-pdo=shared \
434 --with-pdo-odbc=shared,unixODBC,/usr \
435 --with-pdo-mysql=shared,/usr \
436 --with-pdo-sqlite=shared,/usr \
437 --enable-dbase=shared \
438 --enable-dom=shared \
439 --with-xmlrpc=shared \
440 --enable-xmlreader=shared \
441 --enable-xmlwriter=shared \
442 --with-xsl=shared,/usr \
443 --enable-wddx=shared \
444 --enable-soap=shared \
445 --enable-json=shared \
446 --enable-zip=shared \
447 --enable-phar=shared \
448 --enable-posix=shared \
449 --enable-fileinfo=shared \
450 --enable-intl=shared \
451 --enable-sockets=shared \
452 --enable-sysvsem=shared \
453 --enable-sysvshm=shared \
454 --enable-sysvmsg=shared \
455 --with-tidy=shared \
456 --with-ldap=shared \
457 --with-ldap-sasl \
458 --with-enchant=shared \
459 --with-pspell=shared"
460 # ToDo:
461 # --with-mcrypt=shared \
462 # --with-mhash=shared \
463 # --with-imap=shared \
464 # --with-imap-ssl \
465 # --enable-maintainer-zts <- threaded apache2 support
466
467 # required for fpm
468 php_disable_shared_extensions="--without-gd \
469 --disable-dom \
470 --disable-dba \
471 --without-unixODBC \
472 --disable-xmlreader \
473 --disable-xmlwriter \
474 --without-sqlite3 \
475 --disable-phar \
476 --disable-fileinfo \
477 --disable-json \
478 --without-pspell \
479 --disable-wddx \
480 --without-curl \
481 --disable-posix \
482 --disable-sysvmsg \
483 --disable-sysvshm \
484 --disable-sysvsem"
485
486 #
487 # build php:
488 #
489
490 # prepare build outside of the SRCDIR
491 install -d ${BUILDDIR}/build-php
492 cd ${BUILDDIR}/build-php
493 ln -snf ${SRCDIR}/configure
494
495 mconfigure \
496 --srcdir=${SRCDIR} \
497 ${php_base_config} \
498 --disable-cgi \
499 --with-readline \
500 ${php_extensions} \
501 || die
502
503 mmake || die
504
505
506 #
507 # build cgi/fastcgi
508 #
509
510 # prepare build with the previous run, to save a lot of time
511 current_run=cgi
512 cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run}
513 cd ${BUILDDIR}/build-${current_run}
514
515 mconfigure \
516 --srcdir=${SRCDIR} \
517 ${php_base_config} \
518 --enable-cgi \
519 --enable-force-cgi-redirect \
520 --enable-fastcgi \
521 --disable-cli \
522 ${php_extensions} \
523 || die
524
525 mmake || die
526
527
528 #
529 # build apache mod
530 #
531
532 # prepare build with the previous run, to save a lot of time
533 current_run=apache
534 cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run}
535 cd ${BUILDDIR}/build-${current_run}
536
537 mconfigure \
538 --srcdir=${SRCDIR} \
539 ${php_base_config} \
540 --with-apxs2 \
541 --disable-cli \
542 ${php_extensions} \
543 || die
544
545 mmake || die
546
547
548 #
549 # build embedded
550 #
551
552 # prepare build with the previous run, to save a lot of time
553 current_run=embedded
554 cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run}
555 cd ${BUILDDIR}/build-${current_run}
556
557 mconfigure \
558 --srcdir=${SRCDIR} \
559 ${php_base_config} \
560 --enable-embed=shared \
561 --disable-cli \
562 ${php_extensions} \
563 || die
564
565 mmake || die
566
567
568 #
569 # build pear
570 #
571
572 # prepare build with the previous run, to save a lot of time
573 current_run=pear
574 cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run}
575 cd ${BUILDDIR}/build-${current_run}
576
577 mconfigure \
578 --srcdir=${SRCDIR} \
579 ${php_base_config} \
580 --disable-cgi \
581 --with-readline \
582 --enable-pcntl \
583 --with-pear \
584 ${php_extensions} \
585 || die
586
587 mmake || die
588
589 #
590 # build fpm
591 #
592
593 # prepare build with the previous run, to save a lot of time
594 current_run=fpm
595 cp -a ${BUILDDIR}/build-php ${BUILDDIR}/build-${current_run}
596 cd ${BUILDDIR}/build-${current_run}
597
598 mconfigure \
599 --srcdir=${SRCDIR} \
600 ${php_base_config} \
601 --enable-fpm \
602 --without-mysql \
603 --disable-pdo \
604 ${php_disable_shared_extensions} \
605 || die
606
607 }
608
609 src_install_php()
610 {
611 cd ${BUILDDIR}/build-php
612 mmake -j1 INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP_EXTENSIONS_DIR} PEAR_INSTALLDIR=${PHP_PEAR_DIR} install || die
613
614 # fix a broken symlink
615 mlink phar.phar /usr/bin/phar || die
616
617 local php_ini=${SRCDIR}/php.ini-production
618
619 # php config
620 minstalldir /etc/php/conf.d || die
621 # remove windows remark
622 sed -i -e '/^; extension_dir = "ext"/d' -e '/^; On windows:$/d' ${php_ini} || die
623 # fix extensions dir location
624 sed -i "s:^; \(extension_dir =\).*:\1 ${PHP5_EXTENSIONS_DIR}:" ${php_ini} || die
625 # allow short php open-tags
626 sed -i "s:^\(short_open_tag =\).*:\1 On:" ${php_ini} || die
627 minstallfile ${php_ini} /etc/php/php.ini || die
628
629 # fix extension_dir also in phmp-config
630 sed -i "s:^\(extension_dir=\).*:\1${PHP_EXTENSIONS_DIR}:" ${BINDIR}/usr/bin/php-config || die
631
632 # remove all extensions provided by other split-packages
633 local ext
634 for ext in curl bcmath dba enchant gd gmp intl ldap mbstring mysql mysqli \
635 pdo_mysql odbc pdo_odbc pdo pspell sqlite3 pdo_sqlite \
636 soap sysvmsg sysvsem sysvshm posix tidy xsl wddx dom xmlreader \
637 xmlwriter xmlrpc
638 do
639 rm ${BINDIR}/${PHP_EXTENSIONS_DIR}/${ext}.so || die ${ext}
640 done
641
642 # remove all static extensions too
643 rm ${BINDIR}/${PHP_EXTENSIONS_DIR}/*.a || die
644
645 # enable all default extensions
646 local MCONFIG
647 local i
648 for i in $(ls ${BINDIR}/${PHP_EXTENSIONS_DIR}/*.so | sort )
649 do
650 MCONFIG="/etc/php/conf.d/$(basename ${i} .so).ini"
651 mclearconfig || die
652 maddconfig "extension=$(basename ${i})" || die
653 done
654
655 # disable config-protect for modules conf dir
656 minstalldir /etc/env.d || die
657 MCONFIG="/etc/env.d/30php"
658 mclearconfig || die
659 maddconfig 'CONFIG_PROTECT_MASK="/etc/php/conf.d"' || die
660
661 minstalldocs CREDITS CODING_STANDARDS EXTENSIONS LICENSE NEWS README* TODO* || die
662 }
663
664 src_install_php-cgi()
665 {
666 cd ${BUILDDIR}/build-cgi
667 minstallexec sapi/cgi/php-cgi || die
668 }
669
670 src_install_php-apache()
671 {
672 cd ${BUILDDIR}/build-apache
673
674 # install apache sapi
675 local APACHE_MOD_DIR="$(apxs -q LIBEXECDIR)"
676 minstalldir ${APACHE_MOD_DIR} || die
677 minstallexec libs/libphp5.so ${APACHE_MOD_DIR} || die
678
679 # install apache module config
680 local APACHE_SYSCONFDIR="$(apxs -q SYSCONFDIR)"
681 minstalldir ${APACHE_SYSCONFDIR}/modules.d || die
682 minstallfile -s php5_module.conf ${APACHE_SYSCONFDIR}/modules.d/php5.conf || die
683 }
684
685 src_install_php-embedded()
686 {
687 cd ${BUILDDIR}/build-embedded
688
689 # install sapi library
690 minstalldir /usr/$(mlibdir) || die
691 minstallexec libs/libphp5.so /usr/$(mlibdir)/libphp5.so || die
692
693 # install include
694 minstalldir /usr/include/${PNAME}/sapi/embed || die
695 minstallfile ${SRCDIR}/sapi/embed/php_embed.h /usr/include/${PNAME}/sapi/embed || die
696 }
697
698 src_install_php-pear()
699 {
700 cd ${BUILDDIR}/build-pear
701 mmake INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP_EXTENSIONS_DIR} PEAR_INSTALLDIR=${PHP_PEAR_DIR} install-pear || die
702
703 local i
704 for i in $(find ${BINDIR}/ -name '.*')
705 do
706 if [[ -e ${i} ]]
707 then
708 rm -rf ${i} || die ${i}
709 fi
710 done
711 }
712
713 src_install_php-fpm()
714 {
715 cd ${BUILDDIR}/build-fpm
716 mmake INSTALL_ROOT=${BINDIR} install-fpm || die
717
718 mkeepdir /var/log/php-fpm || die
719 mkeepdir /run/php-fpm || die
720
721 # config
722 minstalldir /etc/php || die
723 minstalldir /etc/php/fpm.conf.d || die
724 minstallfile -s php-fpm.conf /etc/php/ || die
725 minstallfile -s php-fpm-www.conf /etc/php/fpm.conf.d/www.conf || die
726
727 # systemd
728 minstalltmp php-fpm.tmpfilesd php-fpm.conf || die
729 minstallunit php-fpm.service || die
730 minstalllog php-fpm.logrotate php-fpm || die
731 minstallconf php-fpm.confd php-fpm || die
732 }
733
734 # being a little tricky here:
735 for subpackage in ${SPLIT_PACKAGES}
736 do
737 # exclude all other packages than php-addon-modules
738 case ${subpackage} in
739 php) continue ;;
740 php-cgi) continue ;;
741 php-apache) continue ;;
742 php-embedded) continue ;;
743 php-pear) continue ;;
744 php-fpm) continue ;;
745 esac
746
747 eval "src_install_${subpackage}(){ install_php_extensions ${subpackage#*-} || die; }"
748 done
749
750 # exceptions
751 src_install_php-mysql()
752 {
753 install_php_extensions mysql mysqli pdo_mysql || die
754 }
755
756 src_install_php-odbc()
757 {
758 install_php_extensions odbc pdo_odbc || die
759 }
760
761 src_install_php-process()
762 {
763 install_php_extensions sysvmsg sysvsem sysvshm posix || die
764 }
765
766 src_install_php-sqlite()
767 {
768 install_php_extensions sqlite3 pdo_sqlite || die
769 }
770
771 src_install_php-xml()
772 {
773 install_php_extensions dom wddx xmlreader xmlwriter xsl || die
774 }