wok annotate php-imap/receipt @ rev 21501

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