wok-6.x view phpsysinfo/receipt @ rev 13761

xfce4-taskmanager: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jan 03 11:18:18 2013 +0100 (2013-01-03)
parents
children 408c87fa22ca
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 WEB_SITE="http://phpsysinfo.sourceforge.net/"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 CONFIG_FILES="/etc/phpsysinfo.conf"
13 DEPENDS="php pcre-dev"
14 BUILD_DEPENDS=""
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 # SliTazisation from http://enira.net/?p=61
21 sed -i "s/'-q'/'-a | grep -i pts -c'/" includes/os/class.Linux.inc.php
22 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
23 [Slitaz]
24 Name = "Slitaz"
25 Image = "slitaz.png"
26 Files = "/etc/slitaz-release"
28 EOT
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/share/phpsysinfo $fs/etc
35 cp -a $src/* $fs/usr/share/phpsysinfo
36 chown -R www.www $fs/usr/share/phpsysinfo
37 mv $fs/usr/share/phpsysinfo/config.php.new $fs/etc/phpsysinfo.conf
38 chmod 600 $fs/etc/phpsysinfo.conf
39 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
40 }
42 post_install()
43 {
44 # Configure lighttpd server
45 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
46 if ! grep -q /usr/share/phpsysinfo/ $1/etc/lighttpd/lighttpd.conf; then
47 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i $1/etc/lighttpd/lighttpd.conf
48 if [ -z "$1" ]; then
49 # Start Web server.
50 /etc/init.d/lighttpd stop
51 /etc/init.d/lighttpd start
52 fi
53 fi
54 fi
55 # Configure apache server
56 if [ -f $1/etc/apache/httpd.conf ]; then
57 if [ ! -f $1/etc/apache/conf.d/phpsysinfo ]; then
58 cat > $1/etc/apache/conf.d/phpsysinfo <<EOT
59 <IfModule mod_alias.c>
60 Alias /phpsysinfo /usr/share/phpsysinfo
61 </IfModule>
62 <DirectoryMatch /usr/share/phpsysinfo/>
63 DirectoryIndex index.php
64 Options +FollowSymLinks
65 AllowOverride None
66 Order allow,deny
67 Allow from all
68 </DirectoryMatch>
69 EOT
70 if [ -z "$1" ]; then
71 # Start Web server.
72 /etc/init.d/apache stop
73 /etc/init.d/apache start
74 fi
75 fi
76 fi
77 }