wok-current annotate php-pdo-pgsql/receipt @ rev 22389

Add php-opcache
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 28 21:44:13 2019 +0100 (2019-11-28)
parents 84a3b4b621e1
children b10d41313e54
rev   line source
pankso@4428 1 # SliTaz package receipt.
pankso@4428 2
pankso@4428 3 PACKAGE="php-pdo-pgsql"
pascal@22388 4 VERSION="7.3.12"
pankso@4428 5 CATEGORY="development"
pankso@4428 6 SHORT_DESC="PDO PgSQL module for PHP web programming language."
pankso@4428 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15198 8 LICENSE="BSD"
pascal@21278 9 WEB_SITE="https://www.php.net/"
pankso@4428 10 WANTED="php"
pankso@4428 11
pascal@15198 12 DEPENDS="php php-mysql libpostgresqlclient"
pascal@15198 13
pankso@4428 14 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@4428 15 genpkg_rules()
pankso@4428 16 {
pankso@4428 17 mkdir -p $fs/usr/share/php
slaxemulator@14614 18 cp $(find $install | grep pdo_pgsql.so) $fs/usr/share/php/
pankso@4428 19 }
pankso@4428 20
pankso@4428 21 # Post and pre install commans to stop
pankso@4428 22 # and restart Web server if needed.
pankso@4428 23 pre_install()
pankso@4428 24 {
pankso@4428 25 while read daemon file; do
pankso@4428 26 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@4428 27 /etc/init.d/$daemon stop
pankso@4428 28 fi
pankso@4428 29 done <<EOT
pankso@4428 30 apache apache/httpd.pid
pankso@4428 31 lighttpd lighttpd.pid
pankso@4428 32 EOT
pankso@4428 33 }
pankso@4428 34
pankso@4428 35 post_install()
pankso@4428 36 {
pascal@18730 37 grep -q ^extension=pdo_pgsql.so "$1/etc/php.ini" || \
pascal@22389 38 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=pdo_pgsql.so|' -i "$1/etc/php.ini"
pankso@4428 39 # Start Web server.
pankso@4428 40 while read daemon file; do
pankso@4428 41 [ -z "$1" ] || continue
pankso@4428 42 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@4428 43 /etc/init.d/$daemon stop
pankso@4428 44 sleep 2
pankso@4428 45 fi
pankso@4428 46 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pankso@4428 47 /etc/init.d/$daemon start
pankso@4428 48 fi
pankso@4428 49 done <<EOT
pankso@4428 50 apache apache/httpd.pid
pankso@4428 51 lighttpd lighttpd.pid
pankso@4428 52 EOT
pankso@4428 53 }
pankso@4428 54
pankso@4428 55 # Pre and post remove commands for Tazpkg.
pankso@4428 56 pre_remove()
pankso@4428 57 {
pankso@4428 58 sed -i '/.*=pdo_pgsql.so.*/d' /etc/php.ini
pankso@4428 59
pankso@4428 60 # Start Web server.
pankso@4428 61 while read daemon file; do
slaxemulator@14614 62 [ -z "$1" ] || continue
slaxemulator@14614 63 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@4428 64 /etc/init.d/$daemon stop
pankso@4428 65 sleep 2
slaxemulator@14614 66 fi
slaxemulator@14614 67 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pankso@4428 68 /etc/init.d/$daemon start
pankso@4428 69 fi
pankso@4428 70 done <<EOT
pankso@4428 71 apache apache/httpd.pid
pankso@4428 72 lighttpd lighttpd.pid
pankso@4428 73 EOT
pankso@4428 74 }