wok view php-mcrypt/receipt @ rev 10373

rox-filer: dont be stuck when compileling
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 23 12:26:03 2011 +0200 (2011-05-23)
parents a82ead0ea109
children 855f42b596c0
line source
1 # SliTaz package receipt.
3 PACKAGE="php-mcrypt"
4 VERSION="5.2.17"
5 CATEGORY="development"
6 SHORT_DESC="mcrypt module for PHP web programming language."
7 MAINTAINER="erjo@slitaz.org"
8 WEB_SITE="http://www.php.net/"
9 WANTED="php"
11 DEPENDS="libmcrypt php libltdl"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/usr/share/php
17 cp $(find $_pkg | grep mcrypt.so) $fs/usr/share/php/
18 }
20 # Post and pre install commans to stop
21 # and restart Web server if needed.
22 pre_install()
23 {
24 while read daemon file; do
25 if [ -z "$1" -a -f "/var/run/$file" ]; then
26 /etc/init.d/$daemon stop
27 fi
28 done <<EOT
29 apache apache/httpd.pid
30 lighttpd lighttpd.pid
31 EOT
32 }
34 post_install()
35 {
36 grep -q ^extension=mcrypt.so $1/etc/php.ini || \
37 sed -e 's|extension=msql.so|extension=msql.so\nextension=mcrypt.so|' -i $1/etc/php.ini
38 # Start Web server.
39 while read daemon file; do
40 [ -z "$1" ] || continue
41 if [ -f "/var/run/$file" ]; then
42 /etc/init.d/$daemon stop
43 sleep 2
44 fi
45 if [ -f /etc/init.d/$daemon ]; then
46 /etc/init.d/$daemon start
47 fi
48 done <<EOT
49 apache apache/httpd.pid
50 lighttpd lighttpd.pid
51 EOT
52 }
54 # Pre and post remove commands for Tazpkg.
55 pre_remove()
56 {
57 sed -i '/.*=mcrypt.so.*/d' /etc/php.ini
59 # Start Web server.
60 while read daemon file; do
61 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
62 /etc/init.d/$daemon stop
63 sleep 2
64 /etc/init.d/$daemon start
65 fi
66 done <<EOT
67 apache apache/httpd.pid
68 lighttpd lighttpd.pid
69 EOT
70 }