wok view php-mcrypt/receipt @ rev 4923

php-*: msql.so extension may exists eventualy
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 15 20:58:17 2010 +0100 (2010-02-15)
parents 22b929532887
children f3327707164a
line source
1 # SliTaz package receipt.
3 PACKED_SIZE="24.0k"
4 UNPACKED_SIZE="60.0k"
5 PACKAGE="php-mcrypt"
6 VERSION="5.2.11"
7 CATEGORY="development"
8 SHORT_DESC="mcrypt module for PHP web programming language."
9 MAINTAINER="erjo@slitaz.org"
10 DEPENDS="libmcrypt php"
11 WEB_SITE="http://www.php.net/"
12 WANTED="php"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/php
18 cp $(find $_pkg | grep mcrypt.so) $fs/usr/share/php/
19 }
21 # Post and pre install commans to stop
22 # and restart Web server if needed.
23 pre_install()
24 {
25 while read daemon file; do
26 if [ -z "$1" -a -f "/var/run/$file" ]; then
27 /etc/init.d/$daemon stop
28 fi
29 done <<EOT
30 apache apache/httpd.pid
31 lighttpd lighttpd.pid
32 EOT
33 }
35 post_install()
36 {
37 grep -q ^extension=mcrypt.so $1/etc/php.ini || \
38 sed -e 's|extension=msql.so|extension=msql.so\nextension=mcrypt.so|' -i $1/etc/php.ini
39 # Start Web server.
40 while read daemon file; do
41 [ -z "$1" ] || continue
42 if [ -f "/var/run/$file" ]; then
43 /etc/init.d/$daemon stop
44 sleep 2
45 fi
46 if [ -f /etc/init.d/$daemon ]; then
47 /etc/init.d/$daemon start
48 fi
49 done <<EOT
50 apache apache/httpd.pid
51 lighttpd lighttpd.pid
52 EOT
53 }
55 # Pre and post remove commands for Tazpkg.
56 pre_remove()
57 {
58 sed -i '/.*=mcrypt.so.*/d' /etc/php.ini
60 # Start Web server.
61 while read daemon file; do
62 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
63 /etc/init.d/$daemon stop
64 sleep 2
65 /etc/init.d/$daemon start
66 fi
67 done <<EOT
68 apache apache/httpd.pid
69 lighttpd lighttpd.pid
70 EOT
71 }