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