wok-6.x view php-gd/receipt @ rev 23950
syslinux/taziso: fix tazbootkey
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 20 21:21:51 2020 +0000 (2020-09-20) |
parents | b10d41313e54 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-gd"
4 VERSION="7.4.4"
5 CATEGORY="development"
6 SHORT_DESC="gd module for PHP web programming language."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.php.net/"
11 DEPENDS="jpeg libpng libvpx php"
12 WANTED="php"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/php
18 cp $(find $install | grep gd.so) $fs/usr/share/php/
19 }
21 # Post and pre install commans to stop
22 # and restart Web server if needed.
23 pre_install()
24 {
25 while read daemon file
26 do
27 if [ -z "$1" -a -f "/var/run/$file" ]
28 then
29 /etc/init.d/$daemon stop
30 fi
31 done <<EOT
32 apache apache/httpd.pid
33 lighttpd lighttpd.pid
34 EOT
35 }
37 post_install()
38 {
39 grep -q ^extension=gd.so "$1/etc/php.ini" ||
40 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=gd.so|' \
41 -i "$1/etc/php.ini"
43 # Start Web server.
44 while read daemon file
45 do
46 [ -z "$1" ] || continue
47 if [ -z "$1" -a -f "/var/run/$file" ]
48 then
49 /etc/init.d/$daemon stop
50 sleep 2
51 fi
52 if [ -z "$1" -a -f /etc/init.d/$daemon ]
53 then
54 /etc/init.d/$daemon start
55 fi
56 done <<EOT
57 apache apache/httpd.pid
58 lighttpd lighttpd.pid
59 EOT
60 }
62 # Pre and post remove commands for Tazpkg.
63 pre_remove()
64 {
65 sed -i '/.*=gd.so.*/d' "$1/etc/php.ini"
67 # Start Web server.
68 while read daemon file
69 do
70 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]
71 then
72 [ -z "$1" ] || continue
73 if [ -z "$1" -a -f "/var/run/$file" ]
74 then
75 /etc/init.d/$daemon stop
76 sleep 2
77 fi
78 if [ -z "$1" -a -f /etc/init.d/$daemon ]
79 then
80 /etc/init.d/$daemon start
81 fi
82 fi
83 done <<EOT
84 apache apache/httpd.pid
85 lighttpd lighttpd.pid
86 EOT
87 }