wok-6.x annotate php-dba/receipt @ rev 24029

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