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