wok-6.x annotate php-common/receipt @ rev 24699
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 13 19:47:29 2022 +0000 (2022-03-13) |
parents | b10d41313e54 |
children |
rev | line source |
---|---|
pascal@1315 | 1 # SliTaz package receipt. |
pascal@1315 | 2 |
pascal@1315 | 3 PACKAGE="php-common" |
Hans-G?nter@23426 | 4 VERSION="7.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@15198 | 8 LICENSE="BSD" |
pascal@21278 | 9 WEB_SITE="https://www.php.net/" |
Hans-G?nter@23426 | 10 |
pascal@1315 | 11 WANTED="php" |
Hans-G?nter@23426 | 12 |
pascal@1315 | 13 CONFIG_FILES="/etc/php.ini" |
pascal@1315 | 14 |
pascal@1315 | 15 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1315 | 16 genpkg_rules() |
pascal@1315 | 17 { |
Hans-G?nter@23426 | 18 mkdir -p $fs/etc |
Hans-G?nter@23426 | 19 mkdir -p $fs/usr/share/applications |
Hans-G?nter@23426 | 20 mkdir -p $fs/usr/share/pixmaps |
Hans-G?nter@23426 | 21 |
Hans-G?nter@23426 | 22 cp -a $stuff/phpinfo $fs/usr/share |
Hans-G?nter@23426 | 23 cp $stuff/php.desktop $fs/usr/share/applications |
Hans-G?nter@23426 | 24 cp $stuff/php.png $fs/usr/share/pixmaps |
Hans-G?nter@23426 | 25 cp $install/etc/php.ini $fs/etc |
Hans-G?nter@23426 | 26 |
Hans-G?nter@23426 | 27 sed -i 's|.*\(extension_dir.*/usr/share/php.*\)$|\1|' \ |
Hans-G?nter@23426 | 28 $fs/etc/php.ini |
pascal@1315 | 29 } |
pascal@1315 | 30 |
pascal@1315 | 31 # Post and pre install commands |
pascal@1315 | 32 pre_install() |
pascal@1315 | 33 { |
pascal@1315 | 34 # Backup existing php.ini |
Hans-G?nter@23426 | 35 if [ -f "$1/etc/php.ini" ] |
Hans-G?nter@23426 | 36 then |
pascal@20319 | 37 echo |
pascal@1315 | 38 echo -n "Creating php.ini backup..." |
pascal@18730 | 39 cp "$1/etc/php.ini" "$1/etc/php.ini.bak" |
pascal@1315 | 40 status |
pascal@1315 | 41 fi |
pascal@1315 | 42 } |
pascal@1315 | 43 post_install() |
pascal@1315 | 44 { |
pascal@1315 | 45 # Restore original php.ini |
Hans-G?nter@23426 | 46 if [ -f "$1/etc/php.ini.bak" ] |
Hans-G?nter@23426 | 47 then |
pascal@20319 | 48 echo |
pascal@1315 | 49 echo -n "Restoring php.ini backup..." |
pascal@18730 | 50 mv -f "$1/etc/php.ini.bak" "$1/etc/php.ini" |
pascal@1315 | 51 status |
pascal@1315 | 52 fi |
pascal@1315 | 53 } |