wok annotate phpsysinfo/receipt @ rev 15753

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