wok-next view php/receipt @ rev 21542
updated ccache (3.4.3 -> 3.7.9)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jun 21 17:13:07 2020 +0100 (2020-06-21) |
parents | 5ef1403a3199 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="php"
4 VERSION="7.4.5"
5 CATEGORY="development"
6 SHORT_DESC="PHP web programming language"
7 MAINTAINER="maintainer@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.php.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://www.php.net/distributions/$TARBALL"
14 BUILD_DEPENDS="apache apache-dev apr-dev apr-util-dev c-client
15 coreutils-conditions curl-dev cyrus-sasl-dev gettext
16 jpeg-dev libldap libmcrypt-dev libmysqlclient libpng-dev
17 libunixODBC libvpx-dev libxml2-dev mhash-dev mysql-dev
18 net-snmp-dev openldap-dev openssl-dev perl postgresql-dev
19 re2c sed sqlite3-dev unixODBC-dev zlib-dev"
20 SPLIT="\
21 $PACKAGE-apache $PACKAGE-cherokee $PACKAGE-cli $PACKAGE-common \
22 $PACKAGE-curl $PACKAGE-dba $PACKAGE-dev $PACKAGE-gd \
23 $PACKAGE-imap $PACKAGE-ldap $PACKAGE-mcrypt $PACKAGE-mysql \
24 $PACKAGE-mysqli $PACKAGE-odbc $PACKAGE-openssl $PACKAGE-pdo-mysql \
25 $PACKAGE-pdo-pgsql $PACKAGE-pear $PACKAGE-pgsql $PACKAGE-snmp \
26 $PACKAGE-soap $PACKAGE-sqlite"
28 compile_rules()
29 {
30 # 7.4.4 unrecognised:
31 # --enable-zip
32 # --with-jpeg-dir=/usr
33 # --with-png-dir=/usr
34 # --with-mcrypt=shared,/usr
35 # --with-mysql=shared,/usr
36 # --with-vpx-dir=/usr
38 ARCH_ARGS="\
39 --config-cache \
40 --enable-calendar \
41 --enable-dba=shared \
42 --enable-exif \
43 --enable-ftp \
44 --enable-maintainer-zts \
45 --enable-mbstring \
46 --enable-soap=shared,/usr \
47 --enable-sockets \
48 --with-config-file-path=/etc \
49 --with-curl=shared \
50 --enable-gd=shared \
51 --with-gettext \
52 --with-imap=/usr/lib \
53 --with-imap-ssl \
54 --with-ldap=shared \
55 --with-mhash \
56 --with-mysql-sock=/var/run/mysqld/mysql.sock \
57 --with-mysqli=shared \
58 --with-openssl=shared \
59 --with-pdo-mysql=shared \
60 --with-pdo-pgsql=shared \
61 --with-pdo-sqlite=shared,/usr \
62 --with-pear=/usr/share/php \
63 --with-pgsql=shared,/usr \
64 --with-snmp=shared,/usr \
65 --with-sqlite3=shared,/usr \
66 --with-unixODBC=shared,/usr \
67 --with-zlib"
69 # 7.4.5 no such file
70 # sed -i 's|PLANE_[UVY]\]|VPX_&|;s|IMG_FMT_I420|VPX_&|' \
71 # ext/gd/libgd/webpimg.c
73 sed -i 's/pam_start/pam_nostart/' \
74 configure
76 mkdir /usr/lib/c-client
77 ln -s /usr/lib/c-client.a /usr/lib/c-client/libc-client.a
79 ./configure \
80 $ARCH_ARGS \
81 $CONFIGURE_ARGS &&
82 make $MAKEFLAGS &&
83 make -j1 INSTALL_ROOT=$install install
85 ./configure \
86 $ARCH_ARGS \
87 $CONFIGURE_ARGS \
88 --with-apxs2=/usr/bin/apxs &&
89 make $MAKEFLAGS &&
90 mkdir -p $install/etc/apache &&
91 cp /etc/apache/httpd.conf $install/etc/apache/httpd.conf &&
92 make -j1 INSTALL_ROOT=$install install || return 1
94 # Production configuration file.
95 mkdir -p $install/etc
97 cp $src/php.ini-production $install/etc/php.ini || return 1
98 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
99 -i $install/etc/php.ini
101 install -Dm755 $src/sapi/cgi/php-cgi $install/usr/bin/php-cgi
103 install -Dm644 $stuff/phpinfo/index.php $install/usr/share/phpinfo/index.php
104 install -Dm644 $stuff/php.desktop $install/usr/share/applications/php.desktop
105 install -Dm644 $stuff/php.png $install/usr/share/pixmaps/php.png
106 }
108 genpkg_rules()
109 {
110 case $PACKAGE in
111 php)
112 copy usr/bin/php-cgi
113 DEPENDS="libxml2 lighttpd openssl php-common sqlite3 zlib"
114 PROVIDE="php:lighttpd"
115 ;;
116 php-apache)
117 copy usr/share/apache/
118 CAT="development|module for apache"
119 DEPENDS="apache libxml2 php-common zlib"
120 PROVIDE="php:apache"
121 ;;
122 php-cherokee)
123 copy usr/bin/php-cgi # FIXME! the same file in "php" package
124 CAT="development|module for cherokee"
125 DEPENDS="cherokee libxml2 php-common zlib"
126 PROVIDE="php:cherokee"
127 ;;
128 php-cli)
129 copy usr/bin/php
130 CAT="development|command line interpreter"
131 DEPENDS="php-common"
132 ;;
133 php-common)
134 copy phpinfo/ php.desktop php.png php.ini
135 CAT="development|common files for PHP modules"
136 DEPENDS=" "
137 CONFIG_FILES="/etc/php.ini"
138 ;;
139 php-curl)
140 copy curl.so
141 CAT="development|curl module"
142 DEPENDS="curl php"
143 ;;
144 php-dba)
145 copy dba.so
146 CAT="development|dba module"
147 DEPENDS=" "
148 ;;
149 php-dev)
150 copy @dev
151 DEPENDS="cyrus-sasl jpeg libcomerr3 libkrb5 libldap
152 libmcrypt libmysqlclient libpng libpostgresqlclient
153 libtool libunixODBC mhash net-snmp openssl php"
154 ;;
155 php-gd)
156 copy gd.so
157 CAT="development|gd module"
158 DEPENDS="jpeg libpng libvpx php"
159 ;;
160 php-imap)
161 copy imap.so
162 CAT="development|imap module"
163 DEPENDS="openssl php"
164 ;;
165 php-ldap)
166 copy ldap.so
167 CAT="development|ldap module"
168 DEPENDS="cyrus-sasl libcomerr3 libkrb5 libldap openssl php"
169 ;;
170 php-mcrypt)
171 copy mcrypt.so
172 CAT="development|mcrypt module"
173 DEPENDS="libmcrypt libtool php"
174 ;;
175 php-mysqli)
176 copy mysqli.so
177 CAT="development|mysqli module"
178 DEPENDS="libmysqlclient php"
179 ;;
180 php-mysql)
181 copy mysql.so
182 CAT="development|mysql module"
183 DEPENDS="libmysqlclient php"
184 ;;
185 php-odbc)
186 copy odbc.so
187 CAT="development|ODBC module"
188 DEPENDS="php unixODBC"
189 ;;
190 php-openssl)
191 copy openssl.so
192 CAT="development|OpenSSL module"
193 DEPENDS="openssl php"
194 ;;
195 php-pdo-mysql)
196 copy pdo_mysql.so
197 CAT="development|PDO MySQL module"
198 DEPENDS="php php-mysql"
199 ;;
200 php-pdo-pgsql)
201 copy pdo_pgsql.so
202 CAT="development|PDO PgSQL module"
203 DEPENDS="libpostgresqlclient php php-mysql"
204 ;;
205 php-pear)
206 copy etc/pear.conf usr/bin/pe* usr/share/php/
207 CAT="development|PEAR libs"
208 DEPENDS="php-cli"
209 ;;
210 php-pgsql)
211 copy pgsql.so
212 CAT="development|postgresql module"
213 DEPENDS="php postgresql"
214 ;;
215 php-snmp)
216 copy snmp.so
217 CAT="development|snmp module"
218 DEPENDS="net-snmp openssl php"
219 ;;
220 php-soap)
221 copy soap.so
222 CAT="development|soap module"
223 DEPENDS="libxml2 php"
224 ;;
225 php-sqlite)
226 copy sqlite.so sqlite3.so pdo_sqlite.so
227 CAT="development|sqlite module"
228 DEPENDS="php sqlite3"
229 ;;
230 esac
231 }
233 # -----------------------------------------------------------------------------
234 pre_install_php()
235 {
236 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]
237 then
238 /etc/init.d/lighttpd stop
239 fi
240 }
242 post_install_php()
243 {
244 # Enable php
245 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
246 then
247 [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] ||
248 tazpkg get-install lighttpd-modules --root="$1/"
250 sed \
251 -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
252 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
253 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
254 -i "$1/etc/lighttpd/lighttpd.conf"
256 grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" ||
257 sed \
258 -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
259 -i "$1/etc/lighttpd/lighttpd.conf"
261 grep -q php3 "$1/etc/lighttpd/lighttpd.conf" ||
262 sed \
263 -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
264 -i "$1/etc/lighttpd/lighttpd.conf"
266 fi
268 # Start Web server.
269 if [ -z "$1" -a ! -f /var/run/lighttpd.pid -a -f /etc/init.d/lighttpd ]
270 then
271 /etc/init.d/lighttpd start
272 fi
273 }
275 # -----------------------------------------------------------------------------
276 pre_installi_php_apache()
277 {
278 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]
279 then
280 /etc/init.d/apache stop
281 fi
282 }
284 post_install_php_apache()
285 {
286 grep -q php5_module "$1/etc/apache/httpd.conf" ||
287 {
288 sed \
289 -e 's|mod_rewrite.so|mod_rewrite.so\nLoadModule php5_module share/apache/modules/libphp5.so|' \
290 -e 's|DirectoryIndex index.html|DirectoryIndex index.html index.php|' \
291 -e 's|mime.types|mime.types\n AddType application/x-httpd-php .php .php3 .php4 .php5\n AddType application/x-httpd-php-source .phps|' \
292 -i "$1/etc/apache/httpd.conf"
293 }
295 [ -f "$1/etc/apache/conf.d/phpinfo" ] ||
296 cat > "$1/etc/apache/conf.d/phpinfo" <<EOT
297 <IfModule mod_alias.c>
298 Alias /phpinfo /usr/share/phpinfo
299 </IfModule>
300 <DirectoryMatch /usr/share/phpinfo/>
301 DirectoryIndex index.php
302 Options +FollowSymLinks
303 AllowOverride None
304 Order allow,deny
305 Allow from all
306 </DirectoryMatch>
307 EOT
309 # Restart Web server.
310 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]
311 then
312 /etc/init.d/apache stop
313 sleep 2
314 fi
315 if [ -z "$1" ]; then
316 /etc/init.d/apache start
317 fi
318 }
320 # -----------------------------------------------------------------------------
321 pre_install_php_cherokee()
322 {
323 if [ -z "$1" -a ! -f "/var/run/cherokee.pid" ]
324 then
325 /etc/init.d/cherokee stop
326 fi
327 }
329 post_install_php_cherokee()
330 {
331 # Enable php
332 # if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
333 # [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] || \
334 # tazpkg get-install lighttpd-modules --root="$1/"
335 # sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
336 # -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
337 # -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
338 # -i "$1/etc/lighttpd/lighttpd.conf"
339 # grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" || \
340 # sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
341 # -i "$1/etc/lighttpd/lighttpd.conf"
342 # grep -q php3 "$1/etc/lighttpd/lighttpd.conf" || \
343 # sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
344 # -i "$1/etc/lighttpd/lighttpd.conf"
345 # fi
347 # Start Web server.
348 if [ -z "$1" -a ! -f /var/run/cherokee.pid -a -f /etc/init.d/cherokee ]
349 then
350 /etc/init.d/cherokee start
351 fi
352 }
354 # -----------------------------------------------------------------------------
355 pre_install_php_common()
356 {
357 # Backup existing php.ini
358 if [ -f "$1/etc/php.ini" ]
359 then
360 cp "$1/etc/php.ini" "$1/etc/php.ini.bak"
361 fi
362 }
364 post_install_php_common()
365 {
366 # Restore original php.ini
367 if [ -f "$1/etc/php.ini.bak" ]
368 then
369 mv -f "$1/etc/php.ini.bak" "$1/etc/php.ini"
370 fi
371 }
373 # -----------------------------------------------------------------------------
374 pre_install_php_curl()
375 {
376 while read daemon file
377 do
378 if [ -z "$1" -a -f "/var/run/$file" ]
379 then
380 /etc/init.d/$daemon stop
381 fi
382 done <<EOT
383 apache apache/httpd.pid
384 lighttpd lighttpd.pid
385 EOT
386 }
388 post_install_php_curl()
389 {
390 grep -q ^extension=curl.so "$1/etc/php.ini" ||
391 sed -e 's|extension=msql.so|extension=msql.so\nextension=curl.so|' \
392 -i "$1/etc/php.ini"
394 # Start Web server.
395 while read daemon file
396 do
397 [ -z "$1" ] || continue
398 if [ -f "/var/run/$file" ]
399 then
400 /etc/init.d/$daemon stop
401 sleep 2
402 fi
403 if [ -f /etc/init.d/$daemon ]
404 then
405 /etc/init.d/$daemon start
406 fi
407 done <<EOT
408 apache apache/httpd.pid
409 lighttpd lighttpd.pid
410 EOT
411 }
413 pre_remove_php_curl()
414 {
415 sed -i '/.*=curl.so.*/d' /etc/php.ini
417 # Start Web server.
418 while read daemon file
419 do
420 [ -z "$1" ] || continue
421 if [ -f "/var/run/$file" ]
422 then
423 /etc/init.d/$daemon stop
424 sleep 2
425 fi
426 if [ -f /etc/init.d/$daemon ]
427 then
428 /etc/init.d/$daemon start
429 fi
430 done <<EOT
431 apache apache/httpd.pid
432 lighttpd lighttpd.pid
433 EOT
434 }
436 # -----------------------------------------------------------------------------
437 pre_install_php_dba()
438 {
439 while read daemon file
440 do
441 if [ -z "$1" -a -f "/var/run/$file" ]
442 then
443 /etc/init.d/$daemon stop
444 fi
445 done <<EOT
446 apache apache/httpd.pid
447 lighttpd lighttpd.pid
448 EOT
449 }
451 post_install_php_dba()
452 {
453 grep -q ^extension=dba.so "$1/etc/php.ini" ||
454 sed -e 's|extension=msql.so|extension=msql.so\nextension=dba.so|' \
455 -i "$1/etc/php.ini"
457 # Start Web server.
458 while read daemon file
459 do
460 [ -z "$1" ] || continue
461 if [ -f "/var/run/$file" ]
462 then
463 /etc/init.d/$daemon stop
464 sleep 2
465 fi
466 if [ -f /etc/init.d/$daemon ]
467 then
468 /etc/init.d/$daemon start
469 fi
470 done <<EOT
471 apache apache/httpd.pid
472 lighttpd lighttpd.pid
473 EOT
474 }
476 pre_remove_php_dba()
477 {
478 sed -i '/.*=dba.so.*/d' /etc/php.ini
480 # Start Web server.
481 while read daemon file
482 do
483 [ -z "$1" ] || continue
484 if [ -f "/var/run/$file" ]
485 then
486 /etc/init.d/$daemon stop
487 sleep 2
488 fi
489 if [ -f /etc/init.d/$daemon ]
490 then
491 /etc/init.d/$daemon start
492 fi
493 done <<EOT
494 apache apache/httpd.pid
495 lighttpd lighttpd.pid
496 EOT
497 }
499 # -----------------------------------------------------------------------------
500 pre_install_php_gd()
501 {
502 while read daemon file
503 do
504 if [ -z "$1" -a -f "/var/run/$file" ]
505 then
506 /etc/init.d/$daemon stop
507 fi
508 done <<EOT
509 apache apache/httpd.pid
510 lighttpd lighttpd.pid
511 EOT
512 }
514 post_install_php_gd()
515 {
516 grep -q ^extension=gd.so "$1/etc/php.ini" ||
517 sed -e 's|extension=msql.so|extension=msql.so\nextension=gd.so|' \
518 -i "$1/etc/php.ini"
520 # Start Web server.
521 while read daemon file
522 do
523 [ -z "$1" ] || continue
524 if [ -z "$1" -a -f "/var/run/$file" ]
525 then
526 /etc/init.d/$daemon stop
527 sleep 2
528 fi
529 if [ -z "$1" -a -f /etc/init.d/$daemon ]
530 then
531 /etc/init.d/$daemon start
532 fi
533 done <<EOT
534 apache apache/httpd.pid
535 lighttpd lighttpd.pid
536 EOT
537 }
539 pre_remove_php_gd()
540 {
541 sed -i '/.*=gd.so.*/d' "$1/etc/php.ini"
543 # Start Web server.
544 while read daemon file
545 do
546 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]
547 then
548 [ -z "$1" ] || continue
549 if [ -z "$1" -a -f "/var/run/$file" ]
550 then
551 /etc/init.d/$daemon stop
552 sleep 2
553 fi
554 if [ -z "$1" -a -f /etc/init.d/$daemon ]
555 then
556 /etc/init.d/$daemon start
557 fi
558 fi
559 done <<EOT
560 apache apache/httpd.pid
561 lighttpd lighttpd.pid
562 EOT
563 }
565 # -----------------------------------------------------------------------------
566 pre_install_php_imap()
567 {
568 while read daemon file; do
569 if [ -z "$1" -a -f "/var/run/$file" ]
570 then
571 /etc/init.d/$daemon stop
572 fi
573 done <<EOT
574 apache apache/httpd.pid
575 lighttpd lighttpd.pid
576 EOT
577 }
579 post_install_php_imap()
580 {
581 grep -q ^extension=imap.so "$1/etc/php.ini" ||
582 sed -e 's|extension=msql.so|extension=msql.so\nextension=imap.so|' -i "$1/etc/php.ini"
584 # Start Web server.
585 while read daemon file
586 do
587 [ -z "$1" ] || continue
588 if [ -f "/var/run/$file" ]
589 then
590 /etc/init.d/$daemon stop
591 sleep 2
592 fi
593 if [ -f /etc/init.d/$daemon ]
594 then
595 /etc/init.d/$daemon start
596 fi
597 done <<EOT
598 apache apache/httpd.pid
599 lighttpd lighttpd.pid
600 EOT
601 }
603 pre_remove_php_imap()
604 {
605 sed -i '/.*=imap.so.*/d' /etc/php.ini
607 # Start Web server.
608 while read daemon file
609 do
610 [ -z "$1" ] || continue
611 if [ -f "/var/run/$file" ]
612 then
613 /etc/init.d/$daemon stop
614 sleep 2
615 fi
616 if [ -f /etc/init.d/$daemon ]
617 then
618 /etc/init.d/$daemon start
619 fi
620 done <<EOT
621 apache apache/httpd.pid
622 lighttpd lighttpd.pid
623 EOT
624 }
626 # -----------------------------------------------------------------------------
627 pre_install_php_ldap()
628 {
629 while read daemon file
630 do
631 if [ -z "$1" -a -f "/var/run/$file" ]
632 then
633 /etc/init.d/$daemon stop
634 fi
635 done <<EOT
636 apache apache/httpd.pid
637 lighttpd lighttpd.pid
638 EOT
639 }
641 post_install_php_ldap()
642 {
643 grep -q ^extension=ldap.so "$1/etc/php.ini" ||
644 sed -e 's|extension=msql.so|extension=msql.so\nextension=ldap.so|' -i "$1/etc/php.ini"
646 # Start Web server.
647 while read daemon file
648 do
649 [ -z "$1" ] || continue
650 if [ -f "/var/run/$file" ]
651 then
652 /etc/init.d/$daemon stop
653 sleep 2
654 fi
655 if [ -f /etc/init.d/$daemon ]
656 then
657 /etc/init.d/$daemon start
658 fi
659 done <<EOT
660 apache apache/httpd.pid
661 lighttpd lighttpd.pid
662 EOT
663 }
665 pre_remove_php_ldap()
666 {
667 sed -i '/.*=ldap.so.*/d' /etc/php.ini
669 # Start Web server.
670 while read daemon file
671 do
672 [ -z "$1" ] || continue
673 if [ -f "/var/run/$file" ]
674 then
675 /etc/init.d/$daemon stop
676 sleep 2
677 fi
678 if [ -f /etc/init.d/$daemon ]
679 then
680 /etc/init.d/$daemon start
681 fi
682 done <<EOT
683 apache apache/httpd.pid
684 lighttpd lighttpd.pid
685 EOT
686 }
688 # -----------------------------------------------------------------------------
689 pre_install_php_mcrypt()
690 {
691 while read daemon file
692 do
693 if [ -z "$1" -a -f "/var/run/$file" ]
694 then
695 /etc/init.d/$daemon stop
696 fi
697 done <<EOT
698 apache apache/httpd.pid
699 lighttpd lighttpd.pid
700 EOT
701 }
703 post_install_php_mcrypt()
704 {
705 grep -q ^extension=mcrypt.so "$1/etc/php.ini" ||
706 sed -e 's|extension=msql.so|extension=msql.so\nextension=mcrypt.so|' \
707 -i "$1/etc/php.ini"
709 # Start Web server.
710 while read daemon file
711 do
712 [ -z "$1" ] || continue
713 if [ -f "/var/run/$file" ]
714 then
715 /etc/init.d/$daemon stop
716 sleep 2
717 fi
718 if [ -f /etc/init.d/$daemon ]
719 then
720 /etc/init.d/$daemon start
721 fi
722 done <<EOT
723 apache apache/httpd.pid
724 lighttpd lighttpd.pid
725 EOT
726 }
728 pre_remove_php_mcrypt()
729 {
730 sed -i '/.*=mcrypt.so.*/d' /etc/php.ini
732 # Start Web server.
733 while read daemon file
734 do
735 [ -z "$1" ] || continue
736 if [ -f "/var/run/$file" ]
737 then
738 /etc/init.d/$daemon stop
739 sleep 2
740 fi
741 if [ -f /etc/init.d/$daemon ]
742 then
743 /etc/init.d/$daemon start
744 fi
745 done <<EOT
746 apache apache/httpd.pid
747 lighttpd lighttpd.pid
748 EOT
749 }
751 # -----------------------------------------------------------------------------
752 pre_install_php_mysqli()
753 {
754 while read daemon file
755 do
756 if [ -z "$1" -a -f "/var/run/$file" ]
757 then
758 /etc/init.d/$daemon stop
759 fi
760 done <<EOT
761 apache apache/httpd.pid
762 lighttpd lighttpd.pid
763 EOT
764 }
766 post_install_php_mysqli()
767 {
768 grep -q ^extension=mysqli.so "$1/etc/php.ini" ||
769 sed -e 's|extension=msql.so|extension=msql.so\nextension=mysqli.so|' \
770 -i "$1/etc/php.ini"
772 # Start Web server.
773 while read daemon file
774 do
775 [ -z "$1" ] || continue
776 if [ -f "/var/run/$file" ]
777 then
778 /etc/init.d/$daemon stop
779 sleep 2
780 fi
781 if [ -f /etc/init.d/$daemon ]
782 then
783 /etc/init.d/$daemon start
784 fi
785 done <<EOT
786 apache apache/httpd.pid
787 lighttpd lighttpd.pid
788 EOT
789 }
791 pre_remove_php_mysqli()
792 {
793 sed -i '/.*=mysqli.so.*/d' /etc/php.ini
795 # Start Web server.
796 while read daemon file
797 do
798 [ -z "$1" ] || continue
799 if [ -f "/var/run/$file" ]
800 then
801 /etc/init.d/$daemon stop
802 sleep 2
803 fi
804 if [ -f /etc/init.d/$daemon ]
805 then
806 /etc/init.d/$daemon start
807 fi
808 done <<EOT
809 apache apache/httpd.pid
810 lighttpd lighttpd.pid
811 EOT
812 }
814 # -----------------------------------------------------------------------------
815 pre_install_php_mysql()
816 {
817 while read daemon file
818 do
819 if [ -z "$1" -a -f "/var/run/$file" ]
820 then
821 /etc/init.d/$daemon stop
822 fi
823 done <<EOT
824 apache apache/httpd.pid
825 lighttpd lighttpd.pid
826 EOT
827 }
829 post_install_php_mysql()
830 {
831 grep -q ^extension=mysql.so "$1/etc/php.ini" ||
832 sed -e 's|extension=msql.so|extension=msql.so\nextension=mysql.so|' \
833 -i "$1/etc/php.ini"
835 # Start Web server.
836 while read daemon file
837 do
838 [ -z "$1" ] || continue
839 if [ -f "/var/run/$file" ]
840 then
841 /etc/init.d/$daemon stop
842 sleep 2
843 fi
844 if [ -f /etc/init.d/$daemon ]
845 then
846 /etc/init.d/$daemon start
847 fi
848 done <<EOT
849 apache apache/httpd.pid
850 lighttpd lighttpd.pid
851 EOT
852 }
854 pre_remove_php_mysql()
855 {
856 sed -i '/.*=mysql.so.*/d' /etc/php.ini
858 # Start Web server.
859 while read daemon file
860 do
861 [ -z "$1" ] || continue
862 if [ -f "/var/run/$file" ]
863 then
864 /etc/init.d/$daemon stop
865 sleep 2
866 fi
867 if [ -f /etc/init.d/$daemon ]
868 then
869 /etc/init.d/$daemon start
870 fi
871 done <<EOT
872 apache apache/httpd.pid
873 lighttpd lighttpd.pid
874 EOT
875 }
877 # -----------------------------------------------------------------------------
878 pre_install_php_odbc()
879 {
880 while read daemon file
881 do
882 if [ -z "$1" -a -f "/var/run/$file" ]
883 then
884 /etc/init.d/$daemon stop
885 fi
886 done <<EOT
887 apache apache/httpd.pid
888 lighttpd lighttpd.pid
889 EOT
890 }
892 post_install_php_odbc()
893 {
894 grep -q ^extension=odbc.so "$1/etc/php.ini" ||
895 sed -e 's|extension=msql.so|extension=msql.so\nextension=odbc.so|' \
896 -i "$1/etc/php.ini"
898 # Start Web server.
899 while read daemon file
900 do
901 [ -z "$1" ] || continue
902 if [ -f "/var/run/$file" ]
903 then
904 /etc/init.d/$daemon stop
905 sleep 2
906 fi
907 if [ -f /etc/init.d/$daemon ]
908 then
909 /etc/init.d/$daemon start
910 fi
911 done <<EOT
912 apache apache/httpd.pid
913 lighttpd lighttpd.pid
914 EOT
915 }
917 pre_remove_php_odbc()
918 {
919 sed -i '/.*=odbc.so.*/d' /etc/php.ini
921 # Start Web server.
922 while read daemon file
923 do
924 [ -z "$1" ] || continue
925 if [ -f "/var/run/$file" ]
926 then
927 /etc/init.d/$daemon stop
928 sleep 2
929 fi
930 if [ -f /etc/init.d/$daemon ]
931 then
932 /etc/init.d/$daemon start
933 fi
934 done <<EOT
935 apache apache/httpd.pid
936 lighttpd lighttpd.pid
937 EOT
938 }
940 # -----------------------------------------------------------------------------
941 pre_install_php_openssl()
942 {
943 while read daemon file
944 do
945 if [ -z "$1" -a -f "/var/run/$file" ]
946 then
947 /etc/init.d/$daemon stop
948 fi
949 done <<EOT
950 apache apache/httpd.pid
951 lighttpd lighttpd.pid
952 EOT
953 }
955 post_install_php_openssl()
956 {
957 grep -q ^extension=openssl.so "$1/etc/php.ini" ||
958 sed -e 's|extension=msql.so|extension=msql.so\nextension=openssl.so|' \
959 -i "$1/etc/php.ini"
961 # Start Web server.
962 while read daemon file
963 do
964 [ -z "$1" ] || continue
965 if [ -f "/var/run/$file" ]
966 then
967 /etc/init.d/$daemon stop
968 sleep 2
969 fi
970 if [ -f /etc/init.d/$daemon ]
971 then
972 /etc/init.d/$daemon start
973 fi
974 done <<EOT
975 apache apache/httpd.pid
976 lighttpd lighttpd.pid
977 EOT
978 }
980 pre_remove_php_openssl()
981 {
982 sed -i '/.*=openssl.so.*/d' /etc/php.ini
984 # Start Web server.
985 while read daemon file
986 do
987 [ -z "$1" ] || continue
988 if [ -f "/var/run/$file" ]
989 then
990 /etc/init.d/$daemon stop
991 sleep 2
992 fi
993 if [ -f /etc/init.d/$daemon ]
994 then
995 /etc/init.d/$daemon start
996 fi
997 done <<EOT
998 apache apache/httpd.pid
999 lighttpd lighttpd.pid
1000 EOT
1001 }
1003 # -----------------------------------------------------------------------------
1004 pre_install_pdo_mysql()
1005 {
1006 while read daemon file
1007 do
1008 if [ -z "$1" -a -f "/var/run/$file" ]
1009 then
1010 /etc/init.d/$daemon stop
1011 fi
1012 done <<EOT
1013 apache apache/httpd.pid
1014 lighttpd lighttpd.pid
1015 EOT
1016 }
1018 post_install_pdo_mysql()
1019 {
1020 grep -q ^extension=pdo_mysql.so "$1/etc/php.ini" ||
1021 sed -e 's|extension=msql.so|extension=msql.so\nextension=pdo_mysql.so|' \
1022 -i "$1/etc/php.ini"
1024 # Start Web server.
1025 while read daemon file
1026 do
1027 [ -z "$1" ] || continue
1028 if [ -z "$1" -a -f "/var/run/$file" ]
1029 then
1030 /etc/init.d/$daemon stop
1031 sleep 2
1032 fi
1033 if [ -z "$1" -a -f /etc/init.d/$daemon ]
1034 then
1035 /etc/init.d/$daemon start
1036 fi
1037 done <<EOT
1038 apache apache/httpd.pid
1039 lighttpd lighttpd.pid
1040 EOT
1041 }
1043 pre_remove_pdo_mysql()
1044 {
1045 sed -i '/.*=pdo_mysql.so.*/d' /etc/php.ini
1047 # Start Web server.
1048 while read daemon file
1049 do
1050 [ -z "$1" ] || continue
1051 if [ -z "$1" -a -f "/var/run/$file" ]
1052 then
1053 /etc/init.d/$daemon stop
1054 sleep 2
1055 fi
1056 if [ -z "$1" -a -f /etc/init.d/$daemon ]
1057 then
1058 /etc/init.d/$daemon start
1059 fi
1060 done <<EOT
1061 apache apache/httpd.pid
1062 lighttpd lighttpd.pid
1063 EOT
1064 }
1066 # -----------------------------------------------------------------------------
1067 pre_install_pdo_pgsql()
1068 {
1069 while read daemon file
1070 do
1071 if [ -z "$1" -a -f "/var/run/$file" ]
1072 then
1073 /etc/init.d/$daemon stop
1074 fi
1075 done <<EOT
1076 apache apache/httpd.pid
1077 lighttpd lighttpd.pid
1078 EOT
1079 }
1081 post_install_pdo_pgsql()
1082 {
1083 grep -q ^extension=pdo_pgsql.so "$1/etc/php.ini" ||
1084 sed -e 's|extension=msql.so|extension=msql.so\nextension=pdo_pgsql.so|' \
1085 -i "$1/etc/php.ini"
1087 # Start Web server.
1088 while read daemon file
1089 do
1090 [ -z "$1" ] || continue
1091 if [ -z "$1" -a -f "/var/run/$file" ]
1092 then
1093 /etc/init.d/$daemon stop
1094 sleep 2
1095 fi
1096 if [ -z "$1" -a -f /etc/init.d/$daemon ]
1097 then
1098 /etc/init.d/$daemon start
1099 fi
1100 done <<EOT
1101 apache apache/httpd.pid
1102 lighttpd lighttpd.pid
1103 EOT
1104 }
1106 pre_remove_pdo_pgsql()
1107 {
1108 sed -i '/.*=pdo_pgsql.so.*/d' /etc/php.ini
1110 # Start Web server.
1111 while read daemon file
1112 do
1113 [ -z "$1" ] || continue
1114 if [ -z "$1" -a -f "/var/run/$file" ]
1115 then
1116 /etc/init.d/$daemon stop
1117 sleep 2
1118 fi
1119 if [ -z "$1" -a -f /etc/init.d/$daemon ]
1120 then
1121 /etc/init.d/$daemon start
1122 fi
1123 done <<EOT
1124 apache apache/httpd.pid
1125 lighttpd lighttpd.pid
1126 EOT
1127 }
1129 # -----------------------------------------------------------------------------
1130 pre_install_php_pear()
1131 {
1132 while read daemon file
1133 do
1134 if [ -z "$1" -a -f "/var/run/$file" ]
1135 then
1136 /etc/init.d/$daemon stop
1137 fi
1138 done <<EOT
1139 apache apache/httpd.pid
1140 lighttpd lighttpd.pid
1141 EOT
1142 }
1144 post_install_php_pear()
1145 {
1146 grep ^include_path "$1/etc/php.ini"
1147 sed -i 's|/php/includes"|/php/includes"\ninclude_path = ".:/usr/share/php"|' \
1148 "$1/etc/php.ini"
1149 # Restart Web server.
1150 while read daemon file
1151 do
1152 [ -z "$1" ] || continue
1153 if [ -f "/var/run/$file" ]
1154 then
1155 /etc/init.d/$daemon stop
1156 sleep 2
1157 fi
1158 if [ -f /etc/init.d/$daemon ]
1159 then
1160 /etc/init.d/$daemon start
1161 fi
1162 done <<EOT
1163 apache apache/httpd.pid
1164 lighttpd lighttpd.pid
1165 EOT
1166 }
1168 # -----------------------------------------------------------------------------
1169 pre_install_php_pgsql()
1170 {
1171 while read daemon file
1172 do
1173 if [ -z "$1" -a -f "/var/run/$file" ]
1174 then
1175 /etc/init.d/$daemon stop
1176 fi
1177 done <<EOT
1178 apache apache/httpd.pid
1179 lighttpd lighttpd.pid
1180 EOT
1181 }
1183 post_install_php_pgsql()
1184 {
1185 grep -q ^extension=pgsql.so "$1/etc/php.ini" ||
1186 sed -e 's|extension=msql.so|extension=msql.so\nextension=pgsql.so|' \
1187 -i "$1/etc/php.ini"
1189 # Start Web server.
1190 while read daemon file
1191 do
1192 [ -z "$1" ] || continue
1193 if [ -f "/var/run/$file" ]
1194 then
1195 /etc/init.d/$daemon stop
1196 sleep 2
1197 fi
1198 if [ -f /etc/init.d/$daemon ]
1199 then
1200 /etc/init.d/$daemon start
1201 fi
1202 done <<EOT
1203 apache apache/httpd.pid
1204 lighttpd lighttpd.pid
1205 EOT
1206 }
1208 pre_remove_php_pgsql()
1209 {
1210 sed -i '/.*=pgsql.so.*/d' /etc/php.ini
1212 # Start Web server.
1213 while read daemon file
1214 do
1215 [ -z "$1" ] || continue
1216 if [ -f "/var/run/$file" ]
1217 then
1218 /etc/init.d/$daemon stop
1219 sleep 2
1220 fi
1221 if [ -f /etc/init.d/$daemon ]
1222 then
1223 /etc/init.d/$daemon start
1224 fi
1225 done <<EOT
1226 apache apache/httpd.pid
1227 lighttpd lighttpd.pid
1228 EOT
1229 }
1231 # -----------------------------------------------------------------------------
1232 pre_install_php_snmp()
1233 {
1234 while read daemon file
1235 do
1236 if [ -z "$1" -a -f "/var/run/$file" ]
1237 then
1238 /etc/init.d/$daemon stop
1239 fi
1240 done <<EOT
1241 apache apache/httpd.pid
1242 lighttpd lighttpd.pid
1243 EOT
1244 }
1246 post_install_php_snmp()
1247 {
1248 grep -q ^extension=snmp.so "$1/etc/php.ini" ||
1249 sed -e 's|extension=msql.so|extension=msql.so\nextension=snmp.so|' \
1250 -i "$1/etc/php.ini"
1252 # Start Web server.
1253 while read daemon file
1254 do
1255 [ -z "$1" ] || continue
1256 if [ -f "/var/run/$file" ]
1257 then
1258 /etc/init.d/$daemon stop
1259 sleep 2
1260 fi
1261 if [ -f /etc/init.d/$daemon ]
1262 then
1263 /etc/init.d/$daemon start
1264 fi
1265 done <<EOT
1266 apache apache/httpd.pid
1267 lighttpd lighttpd.pid
1268 EOT
1269 }
1271 pre_remove_php_snmp()
1272 {
1273 sed -i '/.*=snmp.so.*/d' /etc/php.ini
1275 # Start Web server.
1276 while read daemon file
1277 do
1278 [ -z "$1" ] || continue
1279 if [ -f "/var/run/$file" ]
1280 then
1281 /etc/init.d/$daemon stop
1282 sleep 2
1283 fi
1284 if [ -f /etc/init.d/$daemon ]
1285 then
1286 /etc/init.d/$daemon start
1287 fi
1288 done <<EOT
1289 apache apache/httpd.pid
1290 lighttpd lighttpd.pid
1291 EOT
1292 }
1294 # -----------------------------------------------------------------------------
1295 pre_install_php_soap()
1296 {
1297 while read daemon file
1298 do
1299 if [ -z "$1" -a -f "/var/run/$file" ]
1300 then
1301 /etc/init.d/$daemon stop
1302 fi
1303 done <<EOT
1304 apache apache/httpd.pid
1305 lighttpd lighttpd.pid
1306 EOT
1307 }
1309 post_install_php_soap()
1310 {
1311 grep -q ^extension=soap.so "$1/etc/php.ini" ||
1312 sed -e 's|extension=msql.so|extension=msql.so\nextension=soap.so|' \
1313 -i "$1/etc/php.ini"
1315 # Start Web server.
1316 while read daemon file
1317 do
1318 [ -z "$1" ] || continue
1319 if [ -f "/var/run/$file" ]
1320 then
1321 /etc/init.d/$daemon stop
1322 sleep 2
1323 fi
1324 if [ -f /etc/init.d/$daemon ]
1325 then
1326 /etc/init.d/$daemon start
1327 fi
1328 done <<EOT
1329 apache apache/httpd.pid
1330 lighttpd lighttpd.pid
1331 EOT
1332 }
1334 pre_remove_php_soap()
1335 {
1336 sed -i '/.*=soap.so.*/d' /etc/php.ini
1338 # Start Web server.
1339 while read daemon file
1340 do
1341 [ -z "$1" ] || continue
1342 if [ -f "/var/run/$file" ]
1343 then
1344 /etc/init.d/$daemon stop
1345 sleep 2
1346 fi
1347 if [ -f /etc/init.d/$daemon ]
1348 then
1349 /etc/init.d/$daemon start
1350 fi
1351 done <<EOT
1352 apache apache/httpd.pid
1353 lighttpd lighttpd.pid
1354 EOT
1355 }
1357 # -----------------------------------------------------------------------------
1358 post_install_php_sqlite()
1359 {
1360 grep -q ^extension=sqlite3.so "$1/etc/php.ini" ||
1361 sed -e 's|extension=msql.so|extension=msql.so\nextension=sqlite3.so|' \
1362 -i "$1/etc/php.ini"
1364 # Start Web server.
1365 while read daemon file
1366 do
1367 [ -z "$1" ] || continue
1368 if [ -f "/var/run/$file" ]
1369 then
1370 /etc/init.d/$daemon stop
1371 sleep 2
1372 fi
1373 if [ -f /etc/init.d/$daemon ]
1374 then
1375 /etc/init.d/$daemon start
1376 fi
1377 done <<EOT
1378 apache apache/httpd.pid
1379 lighttpd lighttpd.pid
1380 EOT
1381 }
1383 pre_remove_php_sqlite()
1384 {
1385 sed -i '/.*=sqlite3.so.*/d' /etc/php.ini
1387 # Start Web server.
1388 while read daemon file
1389 do
1390 [ -z "$1" ] || continue
1391 if [ -f "/var/run/$file" ]
1392 then
1393 /etc/init.d/$daemon stop
1394 sleep 2
1395 fi
1396 if [ -f /etc/init.d/$daemon ]
1397 then
1398 /etc/init.d/$daemon start
1399 fi
1400 done <<EOT
1401 apache apache/httpd.pid
1402 lighttpd lighttpd.pid
1403 EOT
1404 }