wok-next annotate php-gd/receipt @ rev 16771
Up: xarchiver (0.5.3) and patch it to use icons instead of pixmaps.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Jun 20 04:30:32 2014 +0300 (2014-06-20) |
parents | 76c1f14d1820 |
children | 9e01bc6321ea |
rev | line source |
---|---|
pascal@1326 | 1 # SliTaz package receipt. |
pascal@1326 | 2 |
pascal@1326 | 3 PACKAGE="php-gd" |
erjo@16733 | 4 VERSION="5.5.13" |
pascal@1326 | 5 CATEGORY="development" |
pascal@1326 | 6 SHORT_DESC="gd module for PHP web programming language." |
pascal@1326 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 8 LICENSE="BSD" |
pascal@1326 | 9 WEB_SITE="http://www.php.net/" |
pascal@1326 | 10 WANTED="php" |
pascal@1326 | 11 |
pascal@15198 | 12 DEPENDS="libpng php jpeg libvpx" |
pascal@15198 | 13 |
pascal@1326 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1326 | 15 genpkg_rules() |
pascal@1326 | 16 { |
pascal@1326 | 17 mkdir -p $fs/usr/share/php |
slaxemulator@14614 | 18 cp $(find $install | grep gd.so) $fs/usr/share/php/ |
pascal@1326 | 19 } |
pascal@1326 | 20 |
pascal@1326 | 21 # Post and pre install commans to stop |
pascal@1326 | 22 # and restart Web server if needed. |
pascal@1326 | 23 pre_install() |
pascal@1326 | 24 { |
pascal@1326 | 25 while read daemon file; do |
pascal@1326 | 26 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@1326 | 27 /etc/init.d/$daemon stop |
pascal@1326 | 28 fi |
pascal@1326 | 29 done <<EOT |
pascal@1326 | 30 apache apache/httpd.pid |
pascal@1326 | 31 lighttpd lighttpd.pid |
pascal@1326 | 32 EOT |
pascal@1326 | 33 } |
pascal@1326 | 34 |
pascal@1326 | 35 post_install() |
pascal@1326 | 36 { |
pascal@1833 | 37 grep -q ^extension=gd.so $1/etc/php.ini || \ |
pascal@4923 | 38 sed -e 's|extension=msql.so|extension=msql.so\nextension=gd.so|' -i $1/etc/php.ini |
pascal@1326 | 39 # Start Web server. |
pascal@1326 | 40 while read daemon file; do |
pascal@1805 | 41 [ -z "$1" ] || continue |
pascal@1805 | 42 if [ -z "$1" -a -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 [ -z "$1" -a -f /etc/init.d/$daemon ]; then |
pascal@1326 | 47 /etc/init.d/$daemon start |
pascal@1326 | 48 fi |
pascal@1326 | 49 done <<EOT |
pascal@1326 | 50 apache apache/httpd.pid |
pascal@1326 | 51 lighttpd lighttpd.pid |
pascal@1326 | 52 EOT |
pascal@1326 | 53 } |
pascal@1326 | 54 |
pascal@1749 | 55 # Pre and post remove commands for Tazpkg. |
pascal@1749 | 56 pre_remove() |
pascal@1749 | 57 { |
slaxemulator@14614 | 58 sed -i '/.*=gd.so.*/d' $1/etc/php.ini |
pascal@1749 | 59 |
pascal@1749 | 60 # Start Web server. |
pascal@1749 | 61 while read daemon file; do |
pascal@1805 | 62 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then |
slaxemulator@14614 | 63 [ -z "$1" ] || continue |
slaxemulator@14614 | 64 if [ -z "$1" -a -f "/var/run/$file" ]; then |
slaxemulator@14614 | 65 /etc/init.d/$daemon stop |
slaxemulator@14614 | 66 sleep 2 |
slaxemulator@14614 | 67 fi |
slaxemulator@14614 | 68 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then |
slaxemulator@14614 | 69 /etc/init.d/$daemon start |
slaxemulator@14614 | 70 fi |
pascal@1749 | 71 fi |
pascal@1749 | 72 done <<EOT |
pascal@1749 | 73 apache apache/httpd.pid |
pascal@1749 | 74 lighttpd lighttpd.pid |
pascal@1749 | 75 EOT |
pascal@1749 | 76 } |