wok-next view php-mhash/receipt @ rev 1761

Up: homebank (4.0)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Nov 25 12:23:22 2008 +0100 (2008-11-25)
parents 0db2ef809433
children 1143af92f66a
line source
1 # SliTaz package receipt.
3 PACKAGE="php-mhash"
4 VERSION="5.2.5"
5 CATEGORY="development"
6 SHORT_DESC="mhash module for PHP web programming language."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="php mhash"
9 WEB_SITE="http://www.php.net/"
10 WANTED="php"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/share/php
16 cp $(find $_pkg | grep mhash.so) $fs/usr/share/php/
17 }
19 # Post and pre install commans to stop
20 # and restart Web server if needed.
21 pre_install()
22 {
23 while read daemon file; do
24 if [ -z "$1" -a -f "/var/run/$file" ]; then
25 /etc/init.d/$daemon stop
26 fi
27 done <<EOT
28 apache apache/httpd.pid
29 lighttpd lighttpd.pid
30 EOT
31 }
33 post_install()
34 {
35 grep -q ^extension=msql.so $1/etc/php.ini || \
36 sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=mhash.so|' -i $1/etc/php.ini
37 # Start Web server.
38 while read daemon file; do
39 if [ -z "$1" -a -f /etc/init.d/$daemon \
40 -a ! -f "/var/run/$file" ]; then
41 /etc/init.d/$daemon start
42 fi
43 done <<EOT
44 apache apache/httpd.pid
45 lighttpd lighttpd.pid
46 EOT
47 }
49 # Pre and post remove commands for Tazpkg.
50 pre_remove()
51 {
52 sed -i '/.*=mhash.so.*/d' /etc/php.ini
54 # Start Web server.
55 while read daemon file; do
56 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
57 /etc/init.d/$daemon start
58 fi
59 done <<EOT
60 apache apache/httpd.pid
61 lighttpd lighttpd.pid
62 EOT
63 }