wok rev 23431

updated phpsysinfo (3.0.18 -> 3.3.2)
author Hans-G?nter Theisgen
date Wed Apr 01 17:19:45 2020 +0100 (2020-04-01)
parents fea693604883
children 4cf10037f0f9
files phpsysinfo/receipt
line diff
     1.1 --- a/phpsysinfo/receipt	Wed Apr 01 17:01:57 2020 +0100
     1.2 +++ b/phpsysinfo/receipt	Wed Apr 01 17:19:45 2020 +0100
     1.3 @@ -1,26 +1,29 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="phpsysinfo"
     1.7 -VERSION="3.0.18"
     1.8 +VERSION="3.3.2"
     1.9  CATEGORY="misc"
    1.10  SHORT_DESC="Displays information about your system nicely."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12  LICENSE="GPL2"
    1.13 -WEB_SITE="http://phpsysinfo.sourceforge.net/"
    1.14 +WEB_SITE="http://phpsysinfo.github.io/phpsysinfo/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17 -WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.18 -CONFIG_FILES="/etc/phpsysinfo.conf"
    1.19 -HOST_ARCH="any"
    1.20 +WGET_URL="https://github.com/rk4an/$PACKAGE/archive/v$VERSION.tar.gz"
    1.21  
    1.22  DEPENDS="php pcre-dev"
    1.23  BUILD_DEPENDS=""
    1.24  
    1.25 +CONFIG_FILES="/etc/phpsysinfo.conf"
    1.26 +
    1.27 +HOST_ARCH="any"
    1.28 +
    1.29  # Rules to configure and make the package.
    1.30  compile_rules()
    1.31  {
    1.32 -	cd $src
    1.33  	# SliTazisation from http://enira.net/?p=61
    1.34 -	sed -i "s/'-q'/'-a | grep -i pts -c'/" includes/os/class.Linux.inc.php
    1.35 +	sed -i "s/'-q'/'-a | grep -i pts -c'/" \
    1.36 +		includes/os/class.Linux.inc.php
    1.37  	grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
    1.38  [Slitaz]
    1.39  Name = "Slitaz"
    1.40 @@ -33,30 +36,39 @@
    1.41  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.42  genpkg_rules()
    1.43  {
    1.44 -	mkdir -p $fs/usr/share/phpsysinfo $fs/etc
    1.45 -	cp -a $src/* $fs/usr/share/phpsysinfo
    1.46 -	chown -R www.www $fs/usr/share/phpsysinfo
    1.47 -	mv $fs/usr/share/phpsysinfo/config.php.new $fs/etc/phpsysinfo.conf
    1.48 -	chmod 600 $fs/etc/phpsysinfo.conf
    1.49 -	ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
    1.50 +	mkdir -p $fs/usr/share/phpsysinfo
    1.51 +	mkdir -p $fs/etc
    1.52 +
    1.53 +	cp -a $src/*			$fs/usr/share/phpsysinfo
    1.54 +	chown -R www.www		$fs/usr/share/phpsysinfo
    1.55 +	mv $fs/usr/share/phpsysinfo/phpsysinfo.ini.new \
    1.56 +					$fs/etc/phpsysinfo.conf
    1.57 +	chmod 600			$fs/etc/phpsysinfo.conf
    1.58 +	ln -s /etc/phpsysinfo.conf	$fs/usr/share/phpsysinfo/config.php
    1.59  }
    1.60  
    1.61  post_install()
    1.62  {
    1.63  	# Configure lighttpd server
    1.64 -	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.65 -		if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.66 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.67 -			if [ -z "$1" ]; then
    1.68 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
    1.69 +	  then
    1.70 +		if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"
    1.71 +		  then
    1.72 +			sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.73 +			if [ -z "$1" ]
    1.74 +			  then
    1.75  				# Start Web server.
    1.76  				/etc/init.d/lighttpd stop
    1.77  				/etc/init.d/lighttpd start
    1.78  			fi
    1.79  		fi
    1.80  	fi
    1.81 +
    1.82  	# Configure apache server
    1.83 -	if [ -f "$1/etc/apache/httpd.conf" ]; then
    1.84 -		if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]; then
    1.85 +	if [ -f "$1/etc/apache/httpd.conf" ]
    1.86 +	  then
    1.87 +		if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]
    1.88 +		  then
    1.89  			cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
    1.90  <IfModule mod_alias.c>
    1.91      Alias /phpsysinfo /usr/share/phpsysinfo
    1.92 @@ -69,7 +81,8 @@
    1.93      Allow from all
    1.94  </DirectoryMatch>
    1.95  EOT
    1.96 -			if [ -z "$1" ]; then
    1.97 +			if [ -z "$1" ]
    1.98 +			  then
    1.99  				# Start Web server.
   1.100  				/etc/init.d/apache stop
   1.101  				/etc/init.d/apache start