wok-current annotate php-common/receipt @ rev 14573

Transmission-cli shouldn't install Transmission-gtk
author Brenton Scott <admin@trixarian.net>
date Fri May 24 18:26:23 2013 +0200 (2013-05-24)
parents 5f0378f7067c
children ea4381b83496
rev   line source
pascal@1315 1 # SliTaz package receipt.
pascal@1315 2
pascal@1315 3 PACKAGE="php-common"
erjo@13053 4 VERSION="5.4.4"
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 {
pankso@10819 15 mkdir -p $fs/etc \
pankso@10819 16 $fs/usr/share/applications \
pankso@10819 17 $fs/usr/share/pixmaps
pankso@10819 18 cp -a $stuff/phpinfo $fs/usr/share
pankso@10819 19 cp $stuff/php.desktop $fs/usr/share/applications
pankso@10819 20 cp $stuff/php.png $fs/usr/share/pixmaps
pankso@10819 21 cp $install/etc/php.ini $fs/etc
pascal@1315 22 }
pascal@1315 23
pascal@1315 24 # Post and pre install commands
pascal@1315 25 pre_install()
pascal@1315 26 {
pascal@1315 27 # Backup existing php.ini
pascal@1315 28 if [ -f "$1/etc/php.ini" ]; then
pascal@1315 29 echo -n "Creating php.ini backup..."
pascal@1315 30 cp $1/etc/php.ini $1/etc/php.ini.bak
pascal@1315 31 status
pascal@1315 32 fi
pascal@1315 33 }
pascal@1315 34 post_install()
pascal@1315 35 {
pascal@1315 36 # Restore original php.ini
pascal@1315 37 if [ -f "$1/etc/php.ini.bak" ]; then
pascal@1315 38 echo -n "Restoring php.ini backup..."
pascal@1315 39 mv -f $1/etc/php.ini.bak $1/etc/php.ini
pascal@1315 40 status
pascal@1315 41 fi
pascal@1315 42 }