wok-6.x annotate php-cups/receipt @ rev 15198
php*: add license
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Sep 07 15:59:12 2013 +0000 (2013-09-07) |
parents | 205d192370e5 |
children |
rev | line source |
---|---|
pascal@1408 | 1 # SliTaz package receipt." |
pascal@1408 | 2 |
pascal@1408 | 3 PACKAGE="php-cups" |
pascal@15068 | 4 VERSION="1.6.2" |
pascal@1408 | 5 CATEGORY="development" |
pascal@1408 | 6 SHORT_DESC="Common UNIX Printing System bindings for php." |
pascal@1408 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 8 LICENSE="GPL2 LGPL2" |
pascal@1408 | 9 WANTED="cups" |
pascal@1408 | 10 WEB_SITE="http://www.cups.org/" |
pascal@1408 | 11 |
pascal@15198 | 12 DEPENDS="cups libtasn1" |
pascal@15198 | 13 |
pascal@1408 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1408 | 15 genpkg_rules() |
pascal@1408 | 16 { |
pascal@1408 | 17 mkdir -p $fs/usr/share/php |
pascal@15068 | 18 cp $(find $install | grep phpcups.so) $fs/usr/share/php/cups.so |
pascal@1408 | 19 } |
pascal@1408 | 20 |
pascal@1408 | 21 # Post and pre install commans to stop |
pascal@1408 | 22 # and restart Web server if needed. |
pascal@1408 | 23 pre_install() |
pascal@1408 | 24 { |
pascal@1408 | 25 while read daemon file; do |
pascal@1408 | 26 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@1408 | 27 /etc/init.d/$daemon stop |
pascal@1408 | 28 fi |
pascal@1408 | 29 done <<EOT |
pascal@1408 | 30 apache apache/httpd.pid |
pascal@1408 | 31 lighttpd lighttpd.pid |
pascal@1408 | 32 EOT |
pascal@1408 | 33 } |
pascal@1408 | 34 |
pascal@1408 | 35 post_install() |
pascal@1408 | 36 { |
pascal@1833 | 37 grep -q ^extension=cups.so $1/etc/php.ini || \ |
pascal@4923 | 38 sed -e 's|extension=msql.so|extension=msql.so\nextension=cups.so|' -i $1/etc/php.ini |
pascal@1408 | 39 # Start Web server. |
pascal@1408 | 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@1408 | 47 /etc/init.d/$daemon start |
pascal@1408 | 48 fi |
pascal@1408 | 49 done <<EOT |
pascal@1408 | 50 apache apache/httpd.pid |
pascal@1408 | 51 lighttpd lighttpd.pid |
pascal@1408 | 52 EOT |
pascal@1408 | 53 } |
pascal@1408 | 54 |
pascal@1749 | 55 # Pre and post remove commands for Tazpkg. |
pascal@1749 | 56 pre_remove() |
pascal@1749 | 57 { |
pascal@1749 | 58 sed -i '/.*=cups.so.*/d' /etc/php.ini |
pascal@1749 | 59 |
pascal@1749 | 60 # Start Web server. |
pascal@1749 | 61 while read daemon file; do |
pascal@1805 | 62 [ -f "/var/run/$file" ] || continue |
pascal@1805 | 63 if [ -f /etc/init.d/$daemon ]; then |
pascal@1805 | 64 /etc/init.d/$daemon stop |
pascal@1805 | 65 sleep 2 |
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 } |