wok-6.x view phpsysinfo/receipt @ rev 24017
tuxpaint: no parallel make
author | Hans-G?nter Theisgen |
---|---|
date | Sat Feb 27 15:07:25 2021 +0100 (2021-02-27) |
parents | 4599dfc8c5d5 |
children | 5ea0ce1cecc0 |
line source
1 # SliTaz package receipt.
3 PACKAGE="phpsysinfo"
4 VERSION="3.3.2"
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/rk4an/$PACKAGE/archive/v$VERSION.tar.gz"
14 DEPENDS="php pcre-dev"
15 BUILD_DEPENDS=""
17 CONFIG_FILES="/etc/phpsysinfo.conf"
19 HOST_ARCH="any"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 # SliTazisation from http://enira.net/?p=61
25 sed -i "s/'-q'/'-a | grep -i pts -c'/" \
26 includes/os/class.Linux.inc.php
27 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
28 [Slitaz]
29 Name = "Slitaz"
30 Image = "slitaz.png"
31 Files = "/etc/slitaz-release"
33 EOT
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/usr/share/phpsysinfo
40 mkdir -p $fs/etc
42 cp -a $src/* $fs/usr/share/phpsysinfo
43 chown -R www.www $fs/usr/share/phpsysinfo
44 mv $fs/usr/share/phpsysinfo/phpsysinfo.ini.new \
45 $fs/etc/phpsysinfo.conf
46 chmod 600 $fs/etc/phpsysinfo.conf
47 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
48 }
50 post_install()
51 {
52 # Configure lighttpd server
53 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
54 then
55 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"
56 then
57 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
58 if [ -z "$1" ]
59 then
60 # Start Web server.
61 /etc/init.d/lighttpd stop
62 /etc/init.d/lighttpd start
63 fi
64 fi
65 fi
67 # Configure apache server
68 if [ -f "$1/etc/apache/httpd.conf" ]
69 then
70 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]
71 then
72 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
73 <IfModule mod_alias.c>
74 Alias /phpsysinfo /usr/share/phpsysinfo
75 </IfModule>
76 <DirectoryMatch /usr/share/phpsysinfo/>
77 DirectoryIndex index.php
78 Options +FollowSymLinks
79 AllowOverride None
80 Order allow,deny
81 Allow from all
82 </DirectoryMatch>
83 EOT
84 if [ -z "$1" ]
85 then
86 # Start Web server.
87 /etc/init.d/apache stop
88 /etc/init.d/apache start
89 fi
90 fi
91 fi
92 }