wok-next view php-common/receipt @ rev 1469
lxpanel: apply patch once
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 04 11:57:29 2008 +0000 (2008-10-04) |
parents | |
children | 60fa2013526b |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-common"
4 VERSION="5.2.5"
5 CATEGORY="development"
6 SHORT_DESC="Common files for PHP modules."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://www.php.net/"
9 WANTED="php"
10 CONFIG_FILES="/etc/php.ini"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/share $fs/etc
16 cp -a $_pkg/usr/share/phpinfo $fs/usr/share
17 cp -a $_pkg/usr/share/applications $fs/usr/share
18 cp -a $_pkg/usr/share/pixmap $fs/usr/share
19 cp $_pkg/etc/php.ini $fs/etc
20 }
22 # Post and pre install commands
23 pre_install()
24 {
25 # Backup existing php.ini
26 if [ -f "$1/etc/php.ini" ]; then
27 echo -n "Creating php.ini backup..."
28 cp $1/etc/php.ini $1/etc/php.ini.bak
29 status
30 fi
31 }
32 post_install()
33 {
34 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
35 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
36 etc/php.ini
37 EOT
38 # Restore original php.ini
39 if [ -f "$1/etc/php.ini.bak" ]; then
40 echo -n "Restoring php.ini backup..."
41 mv -f $1/etc/php.ini.bak $1/etc/php.ini
42 status
43 fi
44 }
46 repack_cleanup()
47 {
48 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
49 }