wok-next annotate php/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents 757d032c55c7
children 5669e8b3be70
rev   line source
pascal@20051 1 # SliTaz package receipt v2.
pankso@18 2
pankso@18 3 PACKAGE="php"
erjo@16732 4 VERSION="5.5.13"
pankso@204 5 CATEGORY="development"
al@20534 6 SHORT_DESC="PHP web programming language"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15198 8 LICENSE="BSD"
al@20534 9 WEB_SITE="http://www.php.net/"
al@20534 10
pankso@18 11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
slaxemulator@14614 12 WGET_URL="http://www.php.net/distributions/$TARBALL"
pankso@18 13
pascal@20098 14 BUILD_DEPENDS="sqlite3-dev libxml2-dev zlib-dev libmysqlclient mysql-dev \
al@21020 15 net-snmp-dev postgresql-dev gettext-dev openssl-dev apache-dev apr-util-dev \
al@20454 16 c-client mhash-dev libpng16-dev libunixODBC unixODBC-dev openldap-dev \
al@20513 17 libldap apr-dev libmcrypt-dev curl-dev cyrus-sasl-dev perl \
pascal@15630 18 jpeg-dev net-snmp-dev libvpx-dev apache coreutils-conditions sed re2c"
al@21020 19 SPLIT="\
al@21020 20 $PACKAGE-apache $PACKAGE-cherokee $PACKAGE-cli $PACKAGE-common \
al@21020 21 $PACKAGE-curl $PACKAGE-dba $PACKAGE-dev $PACKAGE-gd \
al@21020 22 $PACKAGE-imap $PACKAGE-ldap $PACKAGE-mcrypt $PACKAGE-mysqli \
al@21020 23 $PACKAGE-mysql $PACKAGE-odbc $PACKAGE-openssl $PACKAGE-pdo-mysql \
al@21020 24 $PACKAGE-pdo-pgsql $PACKAGE-pear $PACKAGE-pgsql $PACKAGE-snmp \
al@21020 25 $PACKAGE-soap $PACKAGE-sqlite"
al@20534 26
al@20534 27 compile_rules() {
al@21020 28 ARCH_ARGS="\
al@21020 29 --enable-mbstring \
al@21020 30 --enable-sockets \
al@21020 31 --enable-ftp \
al@21020 32 --enable-zip \
al@21020 33 --enable-calendar \
al@21020 34 --enable-exif \
al@21020 35 --config-cache \
al@21020 36 --enable-dba=shared \
al@21020 37 --with-config-file-path=/etc \
al@21020 38 --with-zlib \
al@21020 39 --with-gettext \
al@21020 40 --with-mcrypt=shared,/usr \
al@21020 41 --with-mysql=shared,/usr \
al@21020 42 --with-mysqli=shared \
al@21020 43 --with-mysql-sock=/var/run/mysqld/mysql.sock \
al@21020 44 --with-pdo-sqlite=shared,/usr \
al@21020 45 --with-pgsql=shared,/usr \
al@21020 46 --with-snmp=shared,/usr \
al@21020 47 --enable-soap=shared,/usr \
al@21020 48 --with-ldap=shared \
al@21020 49 --with-imap=shared \
al@21020 50 --with-imap-ssl \
al@21020 51 --with-mhash \
al@21020 52 --with-gd=shared \
al@21020 53 --with-jpeg-dir=/usr \
al@21020 54 --with-png-dir=/usr \
al@21020 55 --with-vpx-dir=/usr \
al@21020 56 --with-openssl=shared \
al@21020 57 --with-unixODBC=shared,/usr \
al@21020 58 --with-pear=/usr/share/php \
al@21020 59 --with-pdo-mysql=shared \
al@21020 60 --with-pdo-pgsql=shared \
al@21020 61 --with-curl=shared \
al@21020 62 --with-sqlite3=shared,/usr \
al@21020 63 --enable-maintainer-zts"
pankso@16079 64
pascal@20378 65 sed -i 's|PLANE_[UVY]\]|VPX_&|;s|IMG_FMT_I420|VPX_&|' ext/gd/libgd/webpimg.c
pascal@2605 66 sed -i 's/pam_start/pam_nostart/' configure
al@20534 67
al@20534 68 ./configure \
al@20534 69 $ARCH_ARGS \
al@20534 70 $CONFIGURE_ARGS &&
al@20534 71 make $MAKEFLAGS &&
al@21020 72 make -j1 INSTALL_ROOT=$install install
al@20534 73
al@20534 74 ./configure \
al@20534 75 $ARCH_ARGS \
al@20534 76 $CONFIGURE_ARGS \
al@20534 77 --with-apxs2=/usr/bin/apxs &&
al@20534 78 make $MAKEFLAGS &&
al@21020 79 mkdir -p $install/etc/apache &&
al@21020 80 cp /etc/apache/httpd.conf $install/etc/apache/httpd.conf &&
al@21020 81 make -j1 INSTALL_ROOT=$install install || return 1
al@20534 82
erjo@13052 83 # Production config file.
al@21020 84 mkdir -p $install/etc
al@21020 85 cp $src/php.ini-production $install/etc/php.ini || return 1
slaxemulator@10549 86 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
al@21020 87 -i $install/etc/php.ini
al@20534 88
al@20534 89 install -Dm755 $src/sapi/cgi/php-cgi $install/usr/bin/php-cgi
al@20534 90
al@20534 91 install -Dm644 $stuff/phpinfo/index.php $install/usr/share/phpinfo/index.php
al@20534 92 install -Dm644 $stuff/php.desktop $install/usr/share/applications/php.desktop
al@20534 93 install -Dm644 $stuff/php.png $install/usr/share/pixmaps/php.png
pankso@18 94 }
pankso@18 95
al@20534 96 genpkg_rules() {
pascal@20051 97 case $PACKAGE in
al@20534 98 php)
al@20534 99 copy usr/bin/php-cgi
al@20534 100 DEPENDS="php-common lighttpd zlib libxml2 sqlite3 openssl"
al@20534 101 PROVIDE="php:lighttpd"
al@20534 102 ;;
al@20534 103 php-apache)
al@20534 104 copy usr/share/apache/
al@20534 105 CAT="development|module for apache"
al@20534 106 DEPENDS="php-common apache libxml2 zlib"
al@20534 107 PROVIDE="php:apache"
al@20534 108 ;;
al@20534 109 php-cherokee)
al@20534 110 copy usr/bin/php-cgi # FIXME! the same file in "php" package
al@20534 111 CAT="development|module for cherokee"
al@20534 112 DEPENDS="php-common cherokee libxml2 zlib"
al@20534 113 PROVIDE="php:cherokee"
al@20534 114 ;;
al@20534 115 php-cli)
al@20534 116 copy usr/bin/php
al@20534 117 CAT="development|command line interpreter"
al@20534 118 DEPENDS="php-common"
al@20534 119 ;;
al@20534 120 php-common)
al@20534 121 copy phpinfo/ php.desktop php.png php.ini
al@20534 122 CAT="development|common files for PHP modules"
al@20534 123 DEPENDS=" "
al@20534 124 CONFIG_FILES="/etc/php.ini"
al@20534 125 ;;
al@20534 126 php-curl)
al@20534 127 copy curl.so
al@20534 128 CAT="development|curl module"
al@20534 129 DEPENDS="curl php"
al@20534 130 ;;
al@20534 131 php-dba)
al@20534 132 copy dba.so
al@20534 133 CAT="development|dba module"
al@20534 134 DEPENDS=" "
al@20534 135 ;;
al@20534 136 php-dev)
al@20534 137 copy @dev
al@20534 138 DEPENDS="php cyrus-sasl libldap libmysqlclient libpng16 \
pascal@20051 139 libpostgresqlclient libunixODBC mhash openssl jpeg \
pascal@20051 140 libmcrypt libtool libkrb5 libcomerr3 net-snmp"
al@20534 141 ;;
al@20534 142 php-gd)
al@20534 143 copy gd.so
al@20534 144 CAT="development|gd module"
al@20534 145 DEPENDS="libpng16 php jpeg libvpx"
al@20534 146 ;;
al@20534 147 php-imap)
al@20534 148 copy imap.so
al@20534 149 CAT="development|imap module"
al@20534 150 DEPENDS="php openssl"
al@20534 151 ;;
al@20534 152 php-ldap)
al@20534 153 copy ldap.so
al@20534 154 CAT="development|ldap module"
al@20534 155 DEPENDS="libldap php openssl cyrus-sasl libkrb5 libcomerr3"
al@20534 156 ;;
al@20534 157 php-mcrypt)
al@20534 158 copy mcrypt.so
al@20534 159 CAT="development|mcrypt module"
al@20534 160 DEPENDS="libmcrypt php libtool"
al@20534 161 ;;
al@20534 162 php-mysqli)
al@20534 163 copy mysqli.so
al@20534 164 CAT="development|mysqli module"
al@20534 165 DEPENDS="libmysqlclient php"
al@20534 166 ;;
al@20534 167 php-mysql)
al@20534 168 copy mysql.so
al@20534 169 CAT="development|mysql module"
al@20534 170 DEPENDS="libmysqlclient php"
al@20534 171 ;;
al@20534 172 php-odbc)
al@20534 173 copy odbc.so
al@20534 174 CAT="development|ODBC module"
al@20534 175 DEPENDS="unixODBC php"
al@20534 176 ;;
al@20534 177 php-openssl)
al@20534 178 copy openssl.so
al@20534 179 CAT="development|OpenSSL module"
al@20534 180 DEPENDS="php openssl"
al@20534 181 ;;
al@20534 182 php-pdo-mysql)
al@20534 183 copy pdo_mysql.so
al@20534 184 CAT="development|PDO MySQL module"
al@20534 185 DEPENDS="php php-mysql"
al@20534 186 ;;
al@20534 187 php-pdo-pgsql)
al@20534 188 copy pdo_pgsql.so
al@20534 189 CAT="development|PDO PgSQL module"
al@20534 190 DEPENDS="php php-mysql libpostgresqlclient"
al@20534 191 ;;
al@20534 192 php-pear)
al@20534 193 copy etc/pear.conf usr/bin/pe* usr/share/php/
al@20534 194 CAT="development|PEAR libs"
al@20534 195 DEPENDS="php-cli"
al@20534 196 ;;
al@20534 197 php-pgsql)
al@20534 198 copy pgsql.so
al@20534 199 CAT="development|postgresql module"
al@20534 200 DEPENDS="postgresql php"
al@20534 201 ;;
al@20534 202 php-snmp)
al@20534 203 copy snmp.so
al@20534 204 CAT="development|snmp module"
al@20534 205 DEPENDS="net-snmp php openssl"
al@20534 206 ;;
al@20534 207 php-soap)
al@20534 208 copy soap.so
al@20534 209 CAT="development|soap module"
al@20534 210 DEPENDS="php libxml2"
al@20534 211 ;;
al@20534 212 php-sqlite)
al@20534 213 copy sqlite.so sqlite3.so pdo_sqlite.so
al@20534 214 CAT="development|sqlite module"
al@20534 215 DEPENDS="php sqlite3"
al@20534 216 ;;
pascal@20051 217 esac
pankso@18 218 }
pankso@18 219
al@20534 220 # -----------------------------------------------------------------------------
al@20534 221 pre_install_php() {
slaxemulator@14614 222 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
pankso@18 223 /etc/init.d/lighttpd stop
pankso@18 224 fi
pankso@18 225 }
pankso@9861 226
al@20534 227 post_install_php() {
pascal@1143 228 # Enable php
pascal@18730 229 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
al@20534 230
al@20534 231 [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] ||
al@20534 232 tazpkg get-install lighttpd-modules --root="$1/"
al@20534 233
al@20534 234 sed \
al@20534 235 -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
al@20534 236 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
al@20534 237 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
al@20534 238 -i "$1/etc/lighttpd/lighttpd.conf"
al@20534 239
al@20534 240 grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" ||
al@20534 241 sed \
al@20534 242 -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
al@20534 243 -i "$1/etc/lighttpd/lighttpd.conf"
al@20534 244
al@20534 245 grep -q php3 "$1/etc/lighttpd/lighttpd.conf" ||
al@20534 246 sed \
al@20534 247 -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
al@20534 248 -i "$1/etc/lighttpd/lighttpd.conf"
al@20534 249
pascal@1143 250 fi
al@20534 251
pankso@18 252 # Start Web server.
al@20534 253 if [ -z "$1" -a ! -f /var/run/lighttpd.pid -a -f /etc/init.d/lighttpd ]; then
pankso@18 254 /etc/init.d/lighttpd start
pankso@18 255 fi
pankso@18 256 }
pascal@20051 257
al@20534 258 # -----------------------------------------------------------------------------
al@20534 259 pre_installi_php_apache() {
pascal@20051 260 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]; then
pascal@20051 261 /etc/init.d/apache stop
pascal@20051 262 fi
pascal@20051 263 }
pascal@20051 264
al@20534 265 post_install_php_apache() {
al@20534 266 grep -q php5_module "$1/etc/apache/httpd.conf" ||
al@20534 267 {
al@20534 268 sed \
al@20534 269 -e 's|mod_rewrite.so|mod_rewrite.so\nLoadModule php5_module share/apache/modules/libphp5.so|' \
al@20534 270 -e 's|DirectoryIndex index.html|DirectoryIndex index.html index.php|' \
al@20534 271 -e 's|mime.types|mime.types\n AddType application/x-httpd-php .php .php3 .php4 .php5\n AddType application/x-httpd-php-source .phps|' \
al@20534 272 -i "$1/etc/apache/httpd.conf"
pascal@20051 273 }
al@20534 274
al@20534 275 [ -f "$1/etc/apache/conf.d/phpinfo" ] ||
pascal@20051 276 cat > "$1/etc/apache/conf.d/phpinfo" <<EOT
pascal@20051 277 <IfModule mod_alias.c>
pascal@20051 278 Alias /phpinfo /usr/share/phpinfo
pascal@20051 279 </IfModule>
pascal@20051 280 <DirectoryMatch /usr/share/phpinfo/>
pascal@20051 281 DirectoryIndex index.php
pascal@20051 282 Options +FollowSymLinks
pascal@20051 283 AllowOverride None
pascal@20051 284 Order allow,deny
pascal@20051 285 Allow from all
pascal@20051 286 </DirectoryMatch>
pascal@20051 287 EOT
al@20534 288
pascal@20051 289 # Restart Web server.
pascal@20051 290 if [ -z "$1" -a -f "/var/run/apache/httpd.pid" ]; then
pascal@20051 291 /etc/init.d/apache stop
pascal@20051 292 sleep 2
pascal@20051 293 fi
pascal@20051 294 if [ -z "$1" ]; then
pascal@20051 295 /etc/init.d/apache start
pascal@20051 296 fi
pascal@20051 297 }
pascal@20051 298
al@20534 299 # -----------------------------------------------------------------------------
al@20534 300 pre_install_php_cherokee() {
pascal@20051 301 if [ -z "$1" -a ! -f "/var/run/cherokee.pid" ]; then
pascal@20051 302 /etc/init.d/cherokee stop
pascal@20051 303 fi
pascal@20051 304 }
pascal@20051 305
al@20534 306 post_install_php_cherokee() {
pascal@20051 307 # Enable php
pascal@20051 308 # if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@20051 309 # [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] || \
pascal@20051 310 # tazpkg get-install lighttpd-modules --root="$1/"
pascal@20051 311 # sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
pascal@20051 312 # -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
pascal@20051 313 # -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
pascal@20051 314 # -i "$1/etc/lighttpd/lighttpd.conf"
pascal@20051 315 # grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" || \
pascal@20051 316 # sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
pascal@20051 317 # -i "$1/etc/lighttpd/lighttpd.conf"
pascal@20051 318 # grep -q php3 "$1/etc/lighttpd/lighttpd.conf" || \
pascal@20051 319 # sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
pascal@20051 320 # -i "$1/etc/lighttpd/lighttpd.conf"
pascal@20051 321 # fi
pascal@20051 322
pascal@20051 323 # Start Web server.
al@20534 324 if [ -z "$1" -a ! -f /var/run/cherokee.pid -a -f /etc/init.d/cherokee ]; then
pascal@20051 325 /etc/init.d/cherokee start
pascal@20051 326 fi
pascal@20051 327 }
pascal@20051 328
al@20534 329 # -----------------------------------------------------------------------------
al@20534 330 pre_install_php_common() {
pascal@20051 331 # Backup existing php.ini
pascal@20051 332 if [ -f "$1/etc/php.ini" ]; then
pascal@20051 333 cp "$1/etc/php.ini" "$1/etc/php.ini.bak"
pascal@20051 334 fi
pascal@20051 335 }
pascal@20051 336
al@20534 337 post_install_php_common() {
al@20534 338 # Restore original php.ini
al@20534 339 if [ -f "$1/etc/php.ini.bak" ]; then
al@20534 340 mv -f "$1/etc/php.ini.bak" "$1/etc/php.ini"
al@20534 341 fi
al@20534 342 }
al@20534 343
al@20534 344 # -----------------------------------------------------------------------------
al@20534 345 pre_install_php_curl() {
pascal@20051 346 while read daemon file; do
pascal@20051 347 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 348 /etc/init.d/$daemon stop
pascal@20051 349 fi
pascal@20051 350 done <<EOT
al@20534 351 apache apache/httpd.pid
pascal@20051 352 lighttpd lighttpd.pid
pascal@20051 353 EOT
pascal@20051 354 }
pascal@20051 355
al@20534 356 post_install_php_curl() {
al@20534 357 grep -q ^extension=curl.so "$1/etc/php.ini" ||
al@20534 358 sed -e 's|extension=msql.so|extension=msql.so\nextension=curl.so|' -i "$1/etc/php.ini"
al@20534 359
pascal@20051 360 # Start Web server.
pascal@20051 361 while read daemon file; do
pascal@20051 362 [ -z "$1" ] || continue
pascal@20051 363 if [ -f "/var/run/$file" ]; then
pascal@20051 364 /etc/init.d/$daemon stop
pascal@20051 365 sleep 2
pascal@20051 366 fi
pascal@20051 367 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 368 /etc/init.d/$daemon start
pascal@20051 369 fi
pascal@20051 370 done <<EOT
al@20534 371 apache apache/httpd.pid
pascal@20051 372 lighttpd lighttpd.pid
pascal@20051 373 EOT
pascal@20051 374 }
pascal@20051 375
al@20534 376 pre_remove_php_curl() {
pascal@20051 377 sed -i '/.*=curl.so.*/d' /etc/php.ini
pascal@20051 378
pascal@20051 379 # Start Web server.
pascal@20051 380 while read daemon file; do
pascal@20051 381 [ -z "$1" ] || continue
pascal@20051 382 if [ -f "/var/run/$file" ]; then
pascal@20051 383 /etc/init.d/$daemon stop
pascal@20051 384 sleep 2
pascal@20051 385 fi
pascal@20051 386 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 387 /etc/init.d/$daemon start
pascal@20051 388 fi
pascal@20051 389 done <<EOT
al@20534 390 apache apache/httpd.pid
pascal@20051 391 lighttpd lighttpd.pid
pascal@20051 392 EOT
pascal@20051 393 }
pascal@20051 394
al@20534 395 # -----------------------------------------------------------------------------
al@20534 396 pre_install_php_dba() {
pascal@20051 397 while read daemon file; do
pascal@20051 398 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 399 /etc/init.d/$daemon stop
pascal@20051 400 fi
pascal@20051 401 done <<EOT
al@20534 402 apache apache/httpd.pid
pascal@20051 403 lighttpd lighttpd.pid
pascal@20051 404 EOT
pascal@20051 405 }
pascal@20051 406
al@20534 407 post_install_php_dba() {
al@20534 408 grep -q ^extension=dba.so "$1/etc/php.ini" ||
al@20534 409 sed -e 's|extension=msql.so|extension=msql.so\nextension=dba.so|' -i "$1/etc/php.ini"
al@20534 410
pascal@20051 411 # Start Web server.
pascal@20051 412 while read daemon file; do
pascal@20051 413 [ -z "$1" ] || continue
pascal@20051 414 if [ -f "/var/run/$file" ]; then
pascal@20051 415 /etc/init.d/$daemon stop
pascal@20051 416 sleep 2
pascal@20051 417 fi
pascal@20051 418 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 419 /etc/init.d/$daemon start
pascal@20051 420 fi
pascal@20051 421 done <<EOT
al@20534 422 apache apache/httpd.pid
pascal@20051 423 lighttpd lighttpd.pid
pascal@20051 424 EOT
pascal@20051 425 }
pascal@20051 426
al@20534 427 pre_remove_php_dba() {
pascal@20051 428 sed -i '/.*=dba.so.*/d' /etc/php.ini
pascal@20051 429
pascal@20051 430 # Start Web server.
pascal@20051 431 while read daemon file; do
pascal@20051 432 [ -z "$1" ] || continue
pascal@20051 433 if [ -f "/var/run/$file" ]; then
pascal@20051 434 /etc/init.d/$daemon stop
pascal@20051 435 sleep 2
pascal@20051 436 fi
pascal@20051 437 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 438 /etc/init.d/$daemon start
pascal@20051 439 fi
pascal@20051 440 done <<EOT
al@20534 441 apache apache/httpd.pid
pascal@20051 442 lighttpd lighttpd.pid
pascal@20051 443 EOT
pascal@20051 444 }
pascal@20051 445
al@20534 446 # -----------------------------------------------------------------------------
al@20534 447 pre_install_php_gd() {
pascal@20051 448 while read daemon file; do
pascal@20051 449 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 450 /etc/init.d/$daemon stop
pascal@20051 451 fi
pascal@20051 452 done <<EOT
al@20534 453 apache apache/httpd.pid
pascal@20051 454 lighttpd lighttpd.pid
pascal@20051 455 EOT
pascal@20051 456 }
pascal@20051 457
al@20534 458 post_install_php_gd() {
al@20534 459 grep -q ^extension=gd.so "$1/etc/php.ini" ||
al@20534 460 sed -e 's|extension=msql.so|extension=msql.so\nextension=gd.so|' -i "$1/etc/php.ini"
al@20534 461
pascal@20051 462 # Start Web server.
pascal@20051 463 while read daemon file; do
pascal@20051 464 [ -z "$1" ] || continue
pascal@20051 465 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 466 /etc/init.d/$daemon stop
pascal@20051 467 sleep 2
pascal@20051 468 fi
pascal@20051 469 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@20051 470 /etc/init.d/$daemon start
pascal@20051 471 fi
pascal@20051 472 done <<EOT
al@20534 473 apache apache/httpd.pid
pascal@20051 474 lighttpd lighttpd.pid
pascal@20051 475 EOT
pascal@20051 476 }
pascal@20051 477
al@20534 478 pre_remove_php_gd() {
pascal@20051 479 sed -i '/.*=gd.so.*/d' "$1/etc/php.ini"
pascal@20051 480
pascal@20051 481 # Start Web server.
pascal@20051 482 while read daemon file; do
pascal@20051 483 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
pascal@20051 484 [ -z "$1" ] || continue
pascal@20051 485 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 486 /etc/init.d/$daemon stop
pascal@20051 487 sleep 2
pascal@20051 488 fi
pascal@20051 489 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@20051 490 /etc/init.d/$daemon start
pascal@20051 491 fi
pascal@20051 492 fi
pascal@20051 493 done <<EOT
al@20534 494 apache apache/httpd.pid
pascal@20051 495 lighttpd lighttpd.pid
pascal@20051 496 EOT
pascal@20051 497 }
pascal@20051 498
al@20534 499 # -----------------------------------------------------------------------------
al@20534 500 pre_install_php_imap() {
pascal@20051 501 while read daemon file; do
pascal@20051 502 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 503 /etc/init.d/$daemon stop
pascal@20051 504 fi
pascal@20051 505 done <<EOT
al@20534 506 apache apache/httpd.pid
pascal@20051 507 lighttpd lighttpd.pid
pascal@20051 508 EOT
pascal@20051 509 }
pascal@20051 510
al@20534 511 post_install_php_imap() {
al@20534 512 grep -q ^extension=imap.so "$1/etc/php.ini" ||
al@20534 513 sed -e 's|extension=msql.so|extension=msql.so\nextension=imap.so|' -i "$1/etc/php.ini"
al@20534 514
pascal@20051 515 # Start Web server.
pascal@20051 516 while read daemon file; do
pascal@20051 517 [ -z "$1" ] || continue
pascal@20051 518 if [ -f "/var/run/$file" ]; then
pascal@20051 519 /etc/init.d/$daemon stop
pascal@20051 520 sleep 2
pascal@20051 521 fi
pascal@20051 522 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 523 /etc/init.d/$daemon start
pascal@20051 524 fi
pascal@20051 525 done <<EOT
al@20534 526 apache apache/httpd.pid
pascal@20051 527 lighttpd lighttpd.pid
pascal@20051 528 EOT
pascal@20051 529 }
pascal@20051 530
al@20534 531 pre_remove_php_imap() {
pascal@20051 532 sed -i '/.*=imap.so.*/d' /etc/php.ini
pascal@20051 533
pascal@20051 534 # Start Web server.
pascal@20051 535 while read daemon file; do
pascal@20051 536 [ -z "$1" ] || continue
pascal@20051 537 if [ -f "/var/run/$file" ]; then
pascal@20051 538 /etc/init.d/$daemon stop
pascal@20051 539 sleep 2
pascal@20051 540 fi
pascal@20051 541 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 542 /etc/init.d/$daemon start
pascal@20051 543 fi
pascal@20051 544 done <<EOT
al@20534 545 apache apache/httpd.pid
pascal@20051 546 lighttpd lighttpd.pid
pascal@20051 547 EOT
pascal@20051 548 }
pascal@20051 549
al@20534 550 # -----------------------------------------------------------------------------
al@20534 551 pre_install_php_ldap() {
pascal@20051 552 while read daemon file; do
pascal@20051 553 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 554 /etc/init.d/$daemon stop
pascal@20051 555 fi
pascal@20051 556 done <<EOT
al@20534 557 apache apache/httpd.pid
pascal@20051 558 lighttpd lighttpd.pid
pascal@20051 559 EOT
pascal@20051 560 }
pascal@20051 561
al@20534 562 post_install_php_ldap() {
al@20534 563 grep -q ^extension=ldap.so "$1/etc/php.ini" ||
al@20534 564 sed -e 's|extension=msql.so|extension=msql.so\nextension=ldap.so|' -i "$1/etc/php.ini"
al@20534 565
pascal@20051 566 # Start Web server.
pascal@20051 567 while read daemon file; do
pascal@20051 568 [ -z "$1" ] || continue
pascal@20051 569 if [ -f "/var/run/$file" ]; then
pascal@20051 570 /etc/init.d/$daemon stop
pascal@20051 571 sleep 2
pascal@20051 572 fi
pascal@20051 573 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 574 /etc/init.d/$daemon start
pascal@20051 575 fi
pascal@20051 576 done <<EOT
al@20534 577 apache apache/httpd.pid
pascal@20051 578 lighttpd lighttpd.pid
pascal@20051 579 EOT
pascal@20051 580 }
pascal@20051 581
al@20534 582 pre_remove_php_ldap() {
pascal@20051 583 sed -i '/.*=ldap.so.*/d' /etc/php.ini
pascal@20051 584
pascal@20051 585 # Start Web server.
pascal@20051 586 while read daemon file; do
pascal@20051 587 [ -z "$1" ] || continue
pascal@20051 588 if [ -f "/var/run/$file" ]; then
pascal@20051 589 /etc/init.d/$daemon stop
pascal@20051 590 sleep 2
pascal@20051 591 fi
pascal@20051 592 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 593 /etc/init.d/$daemon start
pascal@20051 594 fi
pascal@20051 595 done <<EOT
al@20534 596 apache apache/httpd.pid
pascal@20051 597 lighttpd lighttpd.pid
pascal@20051 598 EOT
pascal@20051 599 }
pascal@20051 600
al@20534 601 # -----------------------------------------------------------------------------
al@20534 602 pre_install_php_mcrypt() {
pascal@20051 603 while read daemon file; do
pascal@20051 604 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 605 /etc/init.d/$daemon stop
pascal@20051 606 fi
pascal@20051 607 done <<EOT
al@20534 608 apache apache/httpd.pid
pascal@20051 609 lighttpd lighttpd.pid
pascal@20051 610 EOT
pascal@20051 611 }
pascal@20051 612
al@20534 613 post_install_php_mcrypt() {
al@20534 614 grep -q ^extension=mcrypt.so "$1/etc/php.ini" ||
al@20534 615 sed -e 's|extension=msql.so|extension=msql.so\nextension=mcrypt.so|' -i "$1/etc/php.ini"
al@20534 616
pascal@20051 617 # Start Web server.
pascal@20051 618 while read daemon file; do
pascal@20051 619 [ -z "$1" ] || continue
pascal@20051 620 if [ -f "/var/run/$file" ]; then
pascal@20051 621 /etc/init.d/$daemon stop
pascal@20051 622 sleep 2
pascal@20051 623 fi
pascal@20051 624 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 625 /etc/init.d/$daemon start
pascal@20051 626 fi
pascal@20051 627 done <<EOT
al@20534 628 apache apache/httpd.pid
pascal@20051 629 lighttpd lighttpd.pid
pascal@20051 630 EOT
pascal@20051 631 }
pascal@20051 632
al@20534 633 pre_remove_php_mcrypt() {
pascal@20051 634 sed -i '/.*=mcrypt.so.*/d' /etc/php.ini
pascal@20051 635
pascal@20051 636 # Start Web server.
pascal@20051 637 while read daemon file; do
pascal@20051 638 [ -z "$1" ] || continue
pascal@20051 639 if [ -f "/var/run/$file" ]; then
pascal@20051 640 /etc/init.d/$daemon stop
pascal@20051 641 sleep 2
pascal@20051 642 fi
pascal@20051 643 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 644 /etc/init.d/$daemon start
pascal@20051 645 fi
pascal@20051 646 done <<EOT
al@20534 647 apache apache/httpd.pid
pascal@20051 648 lighttpd lighttpd.pid
pascal@20051 649 EOT
pascal@20051 650 }
pascal@20051 651
al@20534 652 # -----------------------------------------------------------------------------
al@20534 653 pre_install_php_mysqli() {
pascal@20051 654 while read daemon file; do
pascal@20051 655 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 656 /etc/init.d/$daemon stop
pascal@20051 657 fi
pascal@20051 658 done <<EOT
al@20534 659 apache apache/httpd.pid
pascal@20051 660 lighttpd lighttpd.pid
pascal@20051 661 EOT
pascal@20051 662 }
pascal@20051 663
al@20534 664 post_install_php_mysqli() {
al@20534 665 grep -q ^extension=mysqli.so "$1/etc/php.ini" ||
al@20534 666 sed -e 's|extension=msql.so|extension=msql.so\nextension=mysqli.so|' -i "$1/etc/php.ini"
al@20534 667
pascal@20051 668 # Start Web server.
pascal@20051 669 while read daemon file; do
pascal@20051 670 [ -z "$1" ] || continue
pascal@20051 671 if [ -f "/var/run/$file" ]; then
pascal@20051 672 /etc/init.d/$daemon stop
pascal@20051 673 sleep 2
pascal@20051 674 fi
pascal@20051 675 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 676 /etc/init.d/$daemon start
pascal@20051 677 fi
pascal@20051 678 done <<EOT
al@20534 679 apache apache/httpd.pid
pascal@20051 680 lighttpd lighttpd.pid
pascal@20051 681 EOT
pascal@20051 682 }
pascal@20051 683
al@20534 684 pre_remove_php_mysqli() {
pascal@20051 685 sed -i '/.*=mysqli.so.*/d' /etc/php.ini
pascal@20051 686
pascal@20051 687 # Start Web server.
pascal@20051 688 while read daemon file; do
pascal@20051 689 [ -z "$1" ] || continue
pascal@20051 690 if [ -f "/var/run/$file" ]; then
pascal@20051 691 /etc/init.d/$daemon stop
pascal@20051 692 sleep 2
pascal@20051 693 fi
pascal@20051 694 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 695 /etc/init.d/$daemon start
pascal@20051 696 fi
pascal@20051 697 done <<EOT
al@20534 698 apache apache/httpd.pid
pascal@20051 699 lighttpd lighttpd.pid
pascal@20051 700 EOT
pascal@20051 701 }
pascal@20051 702
al@20534 703 # -----------------------------------------------------------------------------
al@20534 704 pre_install_php_mysql() {
pascal@20051 705 while read daemon file; do
pascal@20051 706 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 707 /etc/init.d/$daemon stop
pascal@20051 708 fi
pascal@20051 709 done <<EOT
al@20534 710 apache apache/httpd.pid
pascal@20051 711 lighttpd lighttpd.pid
pascal@20051 712 EOT
pascal@20051 713 }
pascal@20051 714
al@20534 715 post_install_php_mysql() {
al@20534 716 grep -q ^extension=mysql.so "$1/etc/php.ini" ||
al@20534 717 sed -e 's|extension=msql.so|extension=msql.so\nextension=mysql.so|' -i "$1/etc/php.ini"
al@20534 718
pascal@20051 719 # Start Web server.
pascal@20051 720 while read daemon file; do
pascal@20051 721 [ -z "$1" ] || continue
pascal@20051 722 if [ -f "/var/run/$file" ]; then
pascal@20051 723 /etc/init.d/$daemon stop
pascal@20051 724 sleep 2
pascal@20051 725 fi
pascal@20051 726 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 727 /etc/init.d/$daemon start
pascal@20051 728 fi
pascal@20051 729 done <<EOT
al@20534 730 apache apache/httpd.pid
pascal@20051 731 lighttpd lighttpd.pid
pascal@20051 732 EOT
pascal@20051 733 }
pascal@20051 734
al@20534 735 pre_remove_php_mysql() {
pascal@20051 736 sed -i '/.*=mysql.so.*/d' /etc/php.ini
pascal@20051 737
pascal@20051 738 # Start Web server.
pascal@20051 739 while read daemon file; do
pascal@20051 740 [ -z "$1" ] || continue
pascal@20051 741 if [ -f "/var/run/$file" ]; then
pascal@20051 742 /etc/init.d/$daemon stop
pascal@20051 743 sleep 2
pascal@20051 744 fi
pascal@20051 745 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 746 /etc/init.d/$daemon start
pascal@20051 747 fi
pascal@20051 748 done <<EOT
al@20534 749 apache apache/httpd.pid
pascal@20051 750 lighttpd lighttpd.pid
pascal@20051 751 EOT
pascal@20051 752 }
pascal@20051 753
al@20534 754 # -----------------------------------------------------------------------------
al@20534 755 pre_install_php_odbc() {
pascal@20051 756 while read daemon file; do
pascal@20051 757 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 758 /etc/init.d/$daemon stop
pascal@20051 759 fi
pascal@20051 760 done <<EOT
al@20534 761 apache apache/httpd.pid
pascal@20051 762 lighttpd lighttpd.pid
pascal@20051 763 EOT
pascal@20051 764 }
pascal@20051 765
al@20534 766 post_install_php_odbc() {
al@20534 767 grep -q ^extension=odbc.so "$1/etc/php.ini" ||
al@20534 768 sed -e 's|extension=msql.so|extension=msql.so\nextension=odbc.so|' -i "$1/etc/php.ini"
al@20534 769
pascal@20051 770 # Start Web server.
pascal@20051 771 while read daemon file; do
pascal@20051 772 [ -z "$1" ] || continue
pascal@20051 773 if [ -f "/var/run/$file" ]; then
pascal@20051 774 /etc/init.d/$daemon stop
pascal@20051 775 sleep 2
pascal@20051 776 fi
pascal@20051 777 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 778 /etc/init.d/$daemon start
pascal@20051 779 fi
pascal@20051 780 done <<EOT
al@20534 781 apache apache/httpd.pid
pascal@20051 782 lighttpd lighttpd.pid
pascal@20051 783 EOT
pascal@20051 784 }
pascal@20051 785
al@20534 786 pre_remove_php_odbc() {
pascal@20051 787 sed -i '/.*=odbc.so.*/d' /etc/php.ini
pascal@20051 788
pascal@20051 789 # Start Web server.
pascal@20051 790 while read daemon file; do
pascal@20051 791 [ -z "$1" ] || continue
pascal@20051 792 if [ -f "/var/run/$file" ]; then
pascal@20051 793 /etc/init.d/$daemon stop
pascal@20051 794 sleep 2
pascal@20051 795 fi
pascal@20051 796 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 797 /etc/init.d/$daemon start
pascal@20051 798 fi
pascal@20051 799 done <<EOT
al@20534 800 apache apache/httpd.pid
pascal@20051 801 lighttpd lighttpd.pid
pascal@20051 802 EOT
pascal@20051 803 }
pascal@20051 804
al@20534 805 # -----------------------------------------------------------------------------
al@20534 806 pre_install_php_openssl() {
pascal@20051 807 while read daemon file; do
pascal@20051 808 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 809 /etc/init.d/$daemon stop
pascal@20051 810 fi
pascal@20051 811 done <<EOT
al@20534 812 apache apache/httpd.pid
pascal@20051 813 lighttpd lighttpd.pid
pascal@20051 814 EOT
pascal@20051 815 }
pascal@20051 816
al@20534 817 post_install_php_openssl() {
al@20534 818 grep -q ^extension=openssl.so "$1/etc/php.ini" ||
al@20534 819 sed -e 's|extension=msql.so|extension=msql.so\nextension=openssl.so|' -i "$1/etc/php.ini"
al@20534 820
pascal@20051 821 # Start Web server.
pascal@20051 822 while read daemon file; do
pascal@20051 823 [ -z "$1" ] || continue
pascal@20051 824 if [ -f "/var/run/$file" ]; then
pascal@20051 825 /etc/init.d/$daemon stop
pascal@20051 826 sleep 2
pascal@20051 827 fi
pascal@20051 828 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 829 /etc/init.d/$daemon start
pascal@20051 830 fi
pascal@20051 831 done <<EOT
al@20534 832 apache apache/httpd.pid
pascal@20051 833 lighttpd lighttpd.pid
pascal@20051 834 EOT
pascal@20051 835 }
pascal@20051 836
al@20534 837 pre_remove_php_openssl() {
pascal@20051 838 sed -i '/.*=openssl.so.*/d' /etc/php.ini
pascal@20051 839
pascal@20051 840 # Start Web server.
pascal@20051 841 while read daemon file; do
pascal@20051 842 [ -z "$1" ] || continue
pascal@20051 843 if [ -f "/var/run/$file" ]; then
pascal@20051 844 /etc/init.d/$daemon stop
pascal@20051 845 sleep 2
pascal@20051 846 fi
pascal@20051 847 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 848 /etc/init.d/$daemon start
pascal@20051 849 fi
pascal@20051 850 done <<EOT
al@20534 851 apache apache/httpd.pid
pascal@20051 852 lighttpd lighttpd.pid
pascal@20051 853 EOT
pascal@20051 854 }
pascal@20051 855
al@20534 856 # -----------------------------------------------------------------------------
al@20534 857 pre_install_pdo_mysql() {
pascal@20051 858 while read daemon file; do
pascal@20051 859 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 860 /etc/init.d/$daemon stop
pascal@20051 861 fi
pascal@20051 862 done <<EOT
al@20534 863 apache apache/httpd.pid
pascal@20051 864 lighttpd lighttpd.pid
pascal@20051 865 EOT
pascal@20051 866 }
pascal@20051 867
al@20534 868 post_install_pdo_mysql() {
al@20534 869 grep -q ^extension=pdo_mysql.so "$1/etc/php.ini" ||
al@20534 870 sed -e 's|extension=msql.so|extension=msql.so\nextension=pdo_mysql.so|' -i "$1/etc/php.ini"
al@20534 871
pascal@20051 872 # Start Web server.
pascal@20051 873 while read daemon file; do
pascal@20051 874 [ -z "$1" ] || continue
pascal@20051 875 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 876 /etc/init.d/$daemon stop
pascal@20051 877 sleep 2
pascal@20051 878 fi
pascal@20051 879 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@20051 880 /etc/init.d/$daemon start
pascal@20051 881 fi
pascal@20051 882 done <<EOT
al@20534 883 apache apache/httpd.pid
pascal@20051 884 lighttpd lighttpd.pid
pascal@20051 885 EOT
pascal@20051 886 }
pascal@20051 887
al@20534 888 pre_remove_pdo_mysql() {
pascal@20051 889 sed -i '/.*=pdo_mysql.so.*/d' /etc/php.ini
pascal@20051 890
pascal@20051 891 # Start Web server.
pascal@20051 892 while read daemon file; do
pascal@20051 893 [ -z "$1" ] || continue
pascal@20051 894 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 895 /etc/init.d/$daemon stop
pascal@20051 896 sleep 2
pascal@20051 897 fi
pascal@20051 898 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@20051 899 /etc/init.d/$daemon start
pascal@20051 900 fi
pascal@20051 901 done <<EOT
al@20534 902 apache apache/httpd.pid
pascal@20051 903 lighttpd lighttpd.pid
pascal@20051 904 EOT
pascal@20051 905 }
pascal@20051 906
al@20534 907 # -----------------------------------------------------------------------------
al@20534 908 pre_install_pdo_pgsql() {
pascal@20051 909 while read daemon file; do
pascal@20051 910 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 911 /etc/init.d/$daemon stop
pascal@20051 912 fi
pascal@20051 913 done <<EOT
al@20534 914 apache apache/httpd.pid
pascal@20051 915 lighttpd lighttpd.pid
pascal@20051 916 EOT
pascal@20051 917 }
pascal@20051 918
al@20534 919 post_install_pdo_pgsql() {
al@20534 920 grep -q ^extension=pdo_pgsql.so "$1/etc/php.ini" ||
al@20534 921 sed -e 's|extension=msql.so|extension=msql.so\nextension=pdo_pgsql.so|' -i "$1/etc/php.ini"
al@20534 922
pascal@20051 923 # Start Web server.
pascal@20051 924 while read daemon file; do
pascal@20051 925 [ -z "$1" ] || continue
pascal@20051 926 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 927 /etc/init.d/$daemon stop
pascal@20051 928 sleep 2
pascal@20051 929 fi
pascal@20051 930 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@20051 931 /etc/init.d/$daemon start
pascal@20051 932 fi
pascal@20051 933 done <<EOT
al@20534 934 apache apache/httpd.pid
pascal@20051 935 lighttpd lighttpd.pid
pascal@20051 936 EOT
pascal@20051 937 }
pascal@20051 938
al@20534 939 pre_remove_pdo_pgsql() {
pascal@20051 940 sed -i '/.*=pdo_pgsql.so.*/d' /etc/php.ini
pascal@20051 941
pascal@20051 942 # Start Web server.
pascal@20051 943 while read daemon file; do
pascal@20051 944 [ -z "$1" ] || continue
pascal@20051 945 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 946 /etc/init.d/$daemon stop
pascal@20051 947 sleep 2
pascal@20051 948 fi
pascal@20051 949 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@20051 950 /etc/init.d/$daemon start
pascal@20051 951 fi
pascal@20051 952 done <<EOT
al@20534 953 apache apache/httpd.pid
pascal@20051 954 lighttpd lighttpd.pid
pascal@20051 955 EOT
pascal@20051 956 }
pascal@20051 957
al@20534 958 # -----------------------------------------------------------------------------
al@20534 959 pre_install_php_pear() {
pascal@20051 960 while read daemon file; do
pascal@20051 961 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 962 /etc/init.d/$daemon stop
pascal@20051 963 fi
pascal@20051 964 done <<EOT
al@20534 965 apache apache/httpd.pid
pascal@20051 966 lighttpd lighttpd.pid
pascal@20051 967 EOT
pascal@20051 968 }
pascal@20051 969
al@20534 970 post_install_php_pear() {
pascal@20051 971 grep ^include_path "$1/etc/php.ini"
pascal@20051 972 sed -i 's|/php/includes"|/php/includes"\ninclude_path = ".:/usr/share/php"|' "$1/etc/php.ini"
pascal@20051 973 # Restart Web server.
pascal@20051 974 while read daemon file; do
pascal@20051 975 [ -z "$1" ] || continue
pascal@20051 976 if [ -f "/var/run/$file" ]; then
pascal@20051 977 /etc/init.d/$daemon stop
pascal@20051 978 sleep 2
pascal@20051 979 fi
pascal@20051 980 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 981 /etc/init.d/$daemon start
pascal@20051 982 fi
pascal@20051 983 done <<EOT
al@20534 984 apache apache/httpd.pid
pascal@20051 985 lighttpd lighttpd.pid
pascal@20051 986 EOT
pascal@20051 987 }
pascal@20051 988
al@20534 989 # -----------------------------------------------------------------------------
al@20534 990 pre_install_php_pgsql() {
pascal@20051 991 while read daemon file; do
pascal@20051 992 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 993 /etc/init.d/$daemon stop
pascal@20051 994 fi
pascal@20051 995 done <<EOT
al@20534 996 apache apache/httpd.pid
pascal@20051 997 lighttpd lighttpd.pid
pascal@20051 998 EOT
pascal@20051 999 }
pascal@20051 1000
al@20534 1001 post_install_php_pgsql() {
al@20534 1002 grep -q ^extension=pgsql.so "$1/etc/php.ini" ||
al@20534 1003 sed -e 's|extension=msql.so|extension=msql.so\nextension=pgsql.so|' -i "$1/etc/php.ini"
al@20534 1004
pascal@20051 1005 # Start Web server.
pascal@20051 1006 while read daemon file; do
pascal@20051 1007 [ -z "$1" ] || continue
pascal@20051 1008 if [ -f "/var/run/$file" ]; then
pascal@20051 1009 /etc/init.d/$daemon stop
pascal@20051 1010 sleep 2
pascal@20051 1011 fi
pascal@20051 1012 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1013 /etc/init.d/$daemon start
pascal@20051 1014 fi
pascal@20051 1015 done <<EOT
al@20534 1016 apache apache/httpd.pid
pascal@20051 1017 lighttpd lighttpd.pid
pascal@20051 1018 EOT
pascal@20051 1019 }
pascal@20051 1020
al@20534 1021 pre_remove_php_pgsql() {
pascal@20051 1022 sed -i '/.*=pgsql.so.*/d' /etc/php.ini
pascal@20051 1023
pascal@20051 1024 # Start Web server.
pascal@20051 1025 while read daemon file; do
pascal@20051 1026 [ -z "$1" ] || continue
pascal@20051 1027 if [ -f "/var/run/$file" ]; then
pascal@20051 1028 /etc/init.d/$daemon stop
pascal@20051 1029 sleep 2
pascal@20051 1030 fi
pascal@20051 1031 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1032 /etc/init.d/$daemon start
pascal@20051 1033 fi
pascal@20051 1034 done <<EOT
al@20534 1035 apache apache/httpd.pid
pascal@20051 1036 lighttpd lighttpd.pid
pascal@20051 1037 EOT
pascal@20051 1038 }
pascal@20051 1039
al@20534 1040 # -----------------------------------------------------------------------------
al@20534 1041 pre_install_php_snmp() {
pascal@20051 1042 while read daemon file; do
pascal@20051 1043 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 1044 /etc/init.d/$daemon stop
pascal@20051 1045 fi
pascal@20051 1046 done <<EOT
al@20534 1047 apache apache/httpd.pid
pascal@20051 1048 lighttpd lighttpd.pid
pascal@20051 1049 EOT
pascal@20051 1050 }
pascal@20051 1051
al@20534 1052 post_install_php_snmp() {
al@20534 1053 grep -q ^extension=snmp.so "$1/etc/php.ini" ||
al@20534 1054 sed -e 's|extension=msql.so|extension=msql.so\nextension=snmp.so|' -i "$1/etc/php.ini"
al@20534 1055
pascal@20051 1056 # Start Web server.
pascal@20051 1057 while read daemon file; do
pascal@20051 1058 [ -z "$1" ] || continue
pascal@20051 1059 if [ -f "/var/run/$file" ]; then
pascal@20051 1060 /etc/init.d/$daemon stop
pascal@20051 1061 sleep 2
pascal@20051 1062 fi
pascal@20051 1063 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1064 /etc/init.d/$daemon start
pascal@20051 1065 fi
pascal@20051 1066 done <<EOT
al@20534 1067 apache apache/httpd.pid
pascal@20051 1068 lighttpd lighttpd.pid
pascal@20051 1069 EOT
pascal@20051 1070 }
pascal@20051 1071
al@20534 1072 pre_remove_php_snmp() {
pascal@20051 1073 sed -i '/.*=snmp.so.*/d' /etc/php.ini
pascal@20051 1074
pascal@20051 1075 # Start Web server.
pascal@20051 1076 while read daemon file; do
pascal@20051 1077 [ -z "$1" ] || continue
pascal@20051 1078 if [ -f "/var/run/$file" ]; then
pascal@20051 1079 /etc/init.d/$daemon stop
pascal@20051 1080 sleep 2
pascal@20051 1081 fi
pascal@20051 1082 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1083 /etc/init.d/$daemon start
pascal@20051 1084 fi
pascal@20051 1085 done <<EOT
al@20534 1086 apache apache/httpd.pid
pascal@20051 1087 lighttpd lighttpd.pid
pascal@20051 1088 EOT
pascal@20051 1089 }
pascal@20051 1090
al@20534 1091 # -----------------------------------------------------------------------------
al@20534 1092 pre_install_php_soap() {
pascal@20051 1093 while read daemon file; do
pascal@20051 1094 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@20051 1095 /etc/init.d/$daemon stop
pascal@20051 1096 fi
pascal@20051 1097 done <<EOT
al@20534 1098 apache apache/httpd.pid
pascal@20051 1099 lighttpd lighttpd.pid
pascal@20051 1100 EOT
pascal@20051 1101 }
pascal@20051 1102
al@20534 1103 post_install_php_soap() {
al@20534 1104 grep -q ^extension=soap.so "$1/etc/php.ini" ||
al@20534 1105 sed -e 's|extension=msql.so|extension=msql.so\nextension=soap.so|' -i "$1/etc/php.ini"
al@20534 1106
pascal@20051 1107 # Start Web server.
pascal@20051 1108 while read daemon file; do
pascal@20051 1109 [ -z "$1" ] || continue
pascal@20051 1110 if [ -f "/var/run/$file" ]; then
pascal@20051 1111 /etc/init.d/$daemon stop
pascal@20051 1112 sleep 2
pascal@20051 1113 fi
pascal@20051 1114 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1115 /etc/init.d/$daemon start
pascal@20051 1116 fi
pascal@20051 1117 done <<EOT
al@20534 1118 apache apache/httpd.pid
pascal@20051 1119 lighttpd lighttpd.pid
pascal@20051 1120 EOT
pascal@20051 1121 }
pascal@20051 1122
al@20534 1123 pre_remove_php_soap() {
pascal@20051 1124 sed -i '/.*=soap.so.*/d' /etc/php.ini
pascal@20051 1125
pascal@20051 1126 # Start Web server.
pascal@20051 1127 while read daemon file; do
pascal@20051 1128 [ -z "$1" ] || continue
pascal@20051 1129 if [ -f "/var/run/$file" ]; then
pascal@20051 1130 /etc/init.d/$daemon stop
pascal@20051 1131 sleep 2
pascal@20051 1132 fi
pascal@20051 1133 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1134 /etc/init.d/$daemon start
pascal@20051 1135 fi
pascal@20051 1136 done <<EOT
al@20534 1137 apache apache/httpd.pid
pascal@20051 1138 lighttpd lighttpd.pid
pascal@20051 1139 EOT
pascal@20051 1140 }
pascal@20051 1141
al@20534 1142 # -----------------------------------------------------------------------------
al@20534 1143 post_install_php_sqlite() {
al@20534 1144 grep -q ^extension=sqlite3.so "$1/etc/php.ini" ||
al@20534 1145 sed -e 's|extension=msql.so|extension=msql.so\nextension=sqlite3.so|' -i "$1/etc/php.ini"
al@20534 1146
pascal@20051 1147 # Start Web server.
pascal@20051 1148 while read daemon file; do
pascal@20051 1149 [ -z "$1" ] || continue
pascal@20051 1150 if [ -f "/var/run/$file" ]; then
pascal@20051 1151 /etc/init.d/$daemon stop
pascal@20051 1152 sleep 2
pascal@20051 1153 fi
pascal@20051 1154 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1155 /etc/init.d/$daemon start
pascal@20051 1156 fi
pascal@20051 1157 done <<EOT
al@20534 1158 apache apache/httpd.pid
pascal@20051 1159 lighttpd lighttpd.pid
pascal@20051 1160 EOT
pascal@20051 1161 }
pascal@20051 1162
al@20534 1163 pre_remove_php_sqlite() {
pascal@20051 1164 sed -i '/.*=sqlite3.so.*/d' /etc/php.ini
pascal@20051 1165
pascal@20051 1166 # Start Web server.
pascal@20051 1167 while read daemon file; do
pascal@20051 1168 [ -z "$1" ] || continue
pascal@20051 1169 if [ -f "/var/run/$file" ]; then
pascal@20051 1170 /etc/init.d/$daemon stop
pascal@20051 1171 sleep 2
pascal@20051 1172 fi
pascal@20051 1173 if [ -f /etc/init.d/$daemon ]; then
pascal@20051 1174 /etc/init.d/$daemon start
pascal@20051 1175 fi
pascal@20051 1176 done <<EOT
al@20534 1177 apache apache/httpd.pid
pascal@20051 1178 lighttpd lighttpd.pid
pascal@20051 1179 EOT
pascal@20051 1180 }