wok-next annotate php-imap/receipt @ rev 14614
Up: php to 5.4.13.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Jun 01 06:40:14 2013 +0000 (2013-06-01) |
parents | 855f42b596c0 |
children | 78cb1e930abd |
rev | line source |
---|---|
pascal@1324 | 1 # SliTaz package receipt. |
pascal@1324 | 2 |
pascal@1324 | 3 PACKAGE="php-imap" |
slaxemulator@14614 | 4 VERSION="5.4.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@1324 | 8 DEPENDS="php openssl" |
pascal@1324 | 9 WEB_SITE="http://www.php.net/" |
pascal@1324 | 10 WANTED="php" |
pascal@1324 | 11 |
pascal@1324 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1324 | 13 genpkg_rules() |
pascal@1324 | 14 { |
pascal@1324 | 15 mkdir -p $fs/usr/share/php |
slaxemulator@14614 | 16 cp $(find $install | grep imap.so) $fs/usr/share/php/ |
pascal@1324 | 17 } |
pascal@1324 | 18 |
pascal@1324 | 19 # Post and pre install commans to stop |
pascal@1324 | 20 # and restart Web server if needed. |
pascal@1324 | 21 pre_install() |
pascal@1324 | 22 { |
pascal@1324 | 23 while read daemon file; do |
pascal@1324 | 24 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@1324 | 25 /etc/init.d/$daemon stop |
pascal@1324 | 26 fi |
pascal@1324 | 27 done <<EOT |
pascal@1324 | 28 apache apache/httpd.pid |
pascal@1324 | 29 lighttpd lighttpd.pid |
pascal@1324 | 30 EOT |
pascal@1324 | 31 } |
pascal@1324 | 32 |
pascal@1324 | 33 post_install() |
pascal@1324 | 34 { |
pascal@1833 | 35 grep -q ^extension=imap.so $1/etc/php.ini || \ |
pascal@4923 | 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=imap.so|' -i $1/etc/php.ini |
pascal@1324 | 37 # Start Web server. |
pascal@1324 | 38 while read daemon file; do |
pascal@1805 | 39 [ -z "$1" ] || continue |
pascal@1805 | 40 if [ -f "/var/run/$file" ]; then |
pascal@1805 | 41 /etc/init.d/$daemon stop |
pascal@1805 | 42 sleep 2 |
pascal@1805 | 43 fi |
pascal@1805 | 44 if [ -f /etc/init.d/$daemon ]; then |
pascal@1324 | 45 /etc/init.d/$daemon start |
pascal@1324 | 46 fi |
pascal@1324 | 47 done <<EOT |
pascal@1324 | 48 apache apache/httpd.pid |
pascal@1324 | 49 lighttpd lighttpd.pid |
pascal@1324 | 50 EOT |
pascal@1324 | 51 } |
pascal@1324 | 52 |
pascal@1749 | 53 # Pre and post remove commands for Tazpkg. |
pascal@1749 | 54 pre_remove() |
pascal@1749 | 55 { |
pascal@1749 | 56 sed -i '/.*=imap.so.*/d' /etc/php.ini |
pascal@1749 | 57 |
pascal@1749 | 58 # Start Web server. |
pascal@1749 | 59 while read daemon file; do |
slaxemulator@14614 | 60 [ -z "$1" ] || continue |
slaxemulator@14614 | 61 if [ -f "/var/run/$file" ]; then |
pascal@1805 | 62 /etc/init.d/$daemon stop |
pascal@1805 | 63 sleep 2 |
slaxemulator@14614 | 64 fi |
slaxemulator@14614 | 65 if [ -f /etc/init.d/$daemon ]; then |
pascal@1749 | 66 /etc/init.d/$daemon start |
pascal@1749 | 67 fi |
pascal@1749 | 68 done <<EOT |
pascal@1749 | 69 apache apache/httpd.pid |
pascal@1749 | 70 lighttpd lighttpd.pid |
pascal@1749 | 71 EOT |
pascal@1749 | 72 } |