wok-6.x annotate php-odbc/receipt @ rev 23386

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