wok-6.x diff php-common/receipt @ rev 1425
postgresql: ensure not to overload tux user
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 28 18:45:59 2008 +0000 (2008-09-28) |
parents | |
children | 60fa2013526b |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-common/receipt Sun Sep 28 18:45:59 2008 +0000 1.3 @@ -0,0 +1,49 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php-common" 1.7 +VERSION="5.2.5" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Common files for PHP modules." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://www.php.net/" 1.12 +WANTED="php" 1.13 +CONFIG_FILES="/etc/php.ini" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr/share $fs/etc 1.19 + cp -a $_pkg/usr/share/phpinfo $fs/usr/share 1.20 + cp -a $_pkg/usr/share/applications $fs/usr/share 1.21 + cp -a $_pkg/usr/share/pixmap $fs/usr/share 1.22 + cp $_pkg/etc/php.ini $fs/etc 1.23 +} 1.24 + 1.25 +# Post and pre install commands 1.26 +pre_install() 1.27 +{ 1.28 + # Backup existing php.ini 1.29 + if [ -f "$1/etc/php.ini" ]; then 1.30 + echo -n "Creating php.ini backup..." 1.31 + cp $1/etc/php.ini $1/etc/php.ini.bak 1.32 + status 1.33 + fi 1.34 +} 1.35 +post_install() 1.36 +{ 1.37 + ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 1.38 + $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 1.39 +etc/php.ini 1.40 +EOT 1.41 + # Restore original php.ini 1.42 + if [ -f "$1/etc/php.ini.bak" ]; then 1.43 + echo -n "Restoring php.ini backup..." 1.44 + mv -f $1/etc/php.ini.bak $1/etc/php.ini 1.45 + status 1.46 + fi 1.47 +} 1.48 + 1.49 +repack_cleanup() 1.50 +{ 1.51 + zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 1.52 +}