wok view phpsysinfo/receipt @ rev 25601

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 16 18:06:38 2023 +0000 (10 months ago)
parents 7d834c8a352e
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 # What is the latest version available today?
22 current_version()
23 {
24 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
25 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 # SliTazisation from http://enira.net/?p=61
32 sed -i "s/'-q'/'-a | grep -i pts -c'/" \
33 includes/os/class.Linux.inc.php
34 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
35 [Slitaz]
36 Name = "Slitaz"
37 Image = "slitaz.png"
38 Files = "/etc/slitaz-release"
40 EOT
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p $fs/usr/share/phpsysinfo
47 mkdir -p $fs/etc
49 cp -a $src/* $fs/usr/share/phpsysinfo
50 chown -R www.www $fs/usr/share/phpsysinfo
51 mv $fs/usr/share/phpsysinfo/phpsysinfo.ini.new \
52 $fs/etc/phpsysinfo.conf
53 chmod 600 $fs/etc/phpsysinfo.conf
54 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
55 }
57 post_install()
58 {
59 # Configure lighttpd server
60 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
61 then
62 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"
63 then
64 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' \
65 -i "$1/etc/lighttpd/lighttpd.conf"
66 if [ -z "$1" ]
67 then
68 # Start Web server.
69 /etc/init.d/lighttpd stop
70 /etc/init.d/lighttpd start
71 fi
72 fi
73 fi
75 # Configure apache server
76 if [ -f "$1/etc/apache/httpd.conf" ]
77 then
78 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]
79 then
80 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
81 <IfModule mod_alias.c>
82 Alias /phpsysinfo /usr/share/phpsysinfo
83 </IfModule>
84 <DirectoryMatch /usr/share/phpsysinfo/>
85 DirectoryIndex index.php
86 Options +FollowSymLinks
87 AllowOverride None
88 Order allow,deny
89 Allow from all
90 </DirectoryMatch>
91 EOT
92 if [ -z "$1" ]
93 then
94 # Start Web server.
95 /etc/init.d/apache stop
96 /etc/init.d/apache start
97 fi
98 fi
99 fi
100 }