wok-next view phpsysinfo/receipt @ rev 20458

Unlock x86_64 architecture
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 02 12:12:14 2018 +0200 (2018-03-02)
parents 9e01bc6321ea
children cbe34297250f
line source
1 # SliTaz package receipt.
3 PACKAGE="phpsysinfo"
4 VERSION="3.0.18"
5 CATEGORY="misc"
6 SHORT_DESC="Displays information about your system nicely."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://phpsysinfo.sourceforge.net/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/phpsysinfo.conf"
14 DEPENDS="php pcre-dev"
15 BUILD_DEPENDS=""
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 # SliTazisation from http://enira.net/?p=61
22 sed -i "s/'-q'/'-a | grep -i pts -c'/" includes/os/class.Linux.inc.php
23 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
24 [Slitaz]
25 Name = "Slitaz"
26 Image = "slitaz.png"
27 Files = "/etc/slitaz-release"
29 EOT
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/share/phpsysinfo $fs/etc
36 cp -a $src/* $fs/usr/share/phpsysinfo
37 chown -R www.www $fs/usr/share/phpsysinfo
38 mv $fs/usr/share/phpsysinfo/config.php.new $fs/etc/phpsysinfo.conf
39 chmod 600 $fs/etc/phpsysinfo.conf
40 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
41 }
43 post_install()
44 {
45 # Configure lighttpd server
46 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
47 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
48 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
49 if [ -z "$1" ]; then
50 # Start Web server.
51 /etc/init.d/lighttpd stop
52 /etc/init.d/lighttpd start
53 fi
54 fi
55 fi
56 # Configure apache server
57 if [ -f "$1/etc/apache/httpd.conf" ]; then
58 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]; then
59 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
60 <IfModule mod_alias.c>
61 Alias /phpsysinfo /usr/share/phpsysinfo
62 </IfModule>
63 <DirectoryMatch /usr/share/phpsysinfo/>
64 DirectoryIndex index.php
65 Options +FollowSymLinks
66 AllowOverride None
67 Order allow,deny
68 Allow from all
69 </DirectoryMatch>
70 EOT
71 if [ -z "$1" ]; then
72 # Start Web server.
73 /etc/init.d/apache stop
74 /etc/init.d/apache start
75 fi
76 fi
77 fi
78 }