wok-6.x view php-common/receipt @ rev 20319
Up tazlito (501)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 20 13:28:18 2018 +0200 (2018-05-20) |
parents | 9e01bc6321ea |
children | b95ac33cc6fe |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-common"
4 VERSION="5.5.13"
5 CATEGORY="development"
6 SHORT_DESC="Common files for PHP modules."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://www.php.net/"
10 WANTED="php"
11 CONFIG_FILES="/etc/php.ini"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/etc \
17 $fs/usr/share/applications \
18 $fs/usr/share/pixmaps
19 cp -a $stuff/phpinfo $fs/usr/share
20 cp $stuff/php.desktop $fs/usr/share/applications
21 cp $stuff/php.png $fs/usr/share/pixmaps
22 cp $install/etc/php.ini $fs/etc
23 }
25 # Post and pre install commands
26 pre_install()
27 {
28 # Backup existing php.ini
29 if [ -f "$1/etc/php.ini" ]; then
30 echo
31 echo -n "Creating php.ini backup..."
32 cp "$1/etc/php.ini" "$1/etc/php.ini.bak"
33 status
34 fi
35 }
36 post_install()
37 {
38 # Restore original php.ini
39 if [ -f "$1/etc/php.ini.bak" ]; then
40 echo
41 echo -n "Restoring php.ini backup..."
42 mv -f "$1/etc/php.ini.bak" "$1/etc/php.ini"
43 status
44 fi
45 }