wok-current view phpsysinfo/receipt @ rev 25420
Update some web_site
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 08 07:39:58 2022 +0000 (2022-08-08) |
parents | 5ea0ce1cecc0 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="phpsysinfo"
4 VERSION="3.4.0"
5 CATEGORY="misc"
6 SHORT_DESC="Displays information about your system nicely."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://phpsysinfo.github.io/phpsysinfo/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/refs/tags/v$VERSION.tar.gz"
14 DEPENDS="pcre-dev php"
15 BUILD_DEPENDS=""
17 CONFIG_FILES="/etc/phpsysinfo.conf"
19 HOST_ARCH="any"
21 current_version()
22 {
23 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
24 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 # SliTazisation from http://enira.net/?p=61
31 sed -i "s/'-q'/'-a | grep -i pts -c'/" \
32 includes/os/class.Linux.inc.php
33 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
34 [Slitaz]
35 Name = "Slitaz"
36 Image = "slitaz.png"
37 Files = "/etc/slitaz-release"
39 EOT
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/usr/share/phpsysinfo
46 mkdir -p $fs/etc
48 cp -a $src/* $fs/usr/share/phpsysinfo
49 chown -R www.www $fs/usr/share/phpsysinfo
50 mv $fs/usr/share/phpsysinfo/phpsysinfo.ini.new \
51 $fs/etc/phpsysinfo.conf
52 chmod 600 $fs/etc/phpsysinfo.conf
53 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
54 }
56 post_install()
57 {
58 # Configure lighttpd server
59 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
60 then
61 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"
62 then
63 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' \
64 -i "$1/etc/lighttpd/lighttpd.conf"
65 if [ -z "$1" ]
66 then
67 # Start Web server.
68 /etc/init.d/lighttpd stop
69 /etc/init.d/lighttpd start
70 fi
71 fi
72 fi
74 # Configure apache server
75 if [ -f "$1/etc/apache/httpd.conf" ]
76 then
77 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]
78 then
79 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
80 <IfModule mod_alias.c>
81 Alias /phpsysinfo /usr/share/phpsysinfo
82 </IfModule>
83 <DirectoryMatch /usr/share/phpsysinfo/>
84 DirectoryIndex index.php
85 Options +FollowSymLinks
86 AllowOverride None
87 Order allow,deny
88 Allow from all
89 </DirectoryMatch>
90 EOT
91 if [ -z "$1" ]
92 then
93 # Start Web server.
94 /etc/init.d/apache stop
95 /etc/init.d/apache start
96 fi
97 fi
98 fi
99 }