wok-current view php-common/receipt @ rev 20437
php-common: fix extension_dir in /etc/php.ini (thanks anggit)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 09 10:36:45 2018 +0200 (2018-09-09) |
parents | 970c5ec9a60a |
children | f892b13c8f81 |
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 sed -i '|.*\(extension_dir.*/usr/share/php.*\)$|\1|' $fs/etc/php.ini
24 }
26 # Post and pre install commands
27 pre_install()
28 {
29 # Backup existing php.ini
30 if [ -f "$1/etc/php.ini" ]; then
31 echo
32 echo -n "Creating php.ini backup..."
33 cp "$1/etc/php.ini" "$1/etc/php.ini.bak"
34 status
35 fi
36 }
37 post_install()
38 {
39 # Restore original php.ini
40 if [ -f "$1/etc/php.ini.bak" ]; then
41 echo
42 echo -n "Restoring php.ini backup..."
43 mv -f "$1/etc/php.ini.bak" "$1/etc/php.ini"
44 status
45 fi
46 }