wok-current rev 23432

updated phpvirtualbox (4.0-7 -> 5.2.1)
author Hans-G?nter Theisgen
date Wed Apr 01 17:31:39 2020 +0100 (2020-04-01)
parents 4599dfc8c5d5
children 1c3d6bf88894
files phpvirtualbox/receipt
line diff
     1.1 --- a/phpvirtualbox/receipt	Wed Apr 01 17:19:45 2020 +0100
     1.2 +++ b/phpvirtualbox/receipt	Wed Apr 01 17:31:39 2020 +0100
     1.3 @@ -1,26 +1,30 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="phpvirtualbox"
     1.7 -VERSION="4.0-7"
     1.8 +VERSION="5.2.1"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Virtualbox AJAX interface."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12  LICENSE="GPL3"
    1.13 -TARBALL="$PACKAGE-$VERSION.zip"
    1.14  WEB_SITE="https://github.com/phpvirtualbox/phpvirtualbox"
    1.15 -WGET_URL="http://$PACKAGE.googlecode.com/files/$TARBALL"
    1.16 +
    1.17 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.18 +WGET_URL="$WEB_SITE/archive/${VERSION%.*}-${VERSION##*.}.tar.gz"
    1.19  
    1.20  DEPENDS="php-soap virtualbox"
    1.21  
    1.22  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.23  genpkg_rules()
    1.24  {
    1.25 -	mkdir -p $fs/usr/share $fs/etc
    1.26 -	cp -a $src $fs/usr/share/phpvirtualbox
    1.27 -	cp -a $fs/usr/share/phpvirtualbox/config.php-example $fs/etc/phpvirtualbox.php
    1.28 -	dos2unix $fs/etc/phpvirtualbox.php
    1.29 -	ln -s /etc/phpvirtualbox.php $fs/usr/share/phpvirtualbox/config.php
    1.30 -	cp -a stuff/* $fs/
    1.31 +	mkdir -p $fs/usr/share
    1.32 +	mkdir -p $fs/etc
    1.33 +
    1.34 +	cp -a $src			$fs/usr/share/phpvirtualbox
    1.35 +	cp -a $fs/usr/share/phpvirtualbox/config.php-example \
    1.36 +					$fs/etc/phpvirtualbox.php
    1.37 +	dos2unix			$fs/etc/phpvirtualbox.php
    1.38 +	ln -s /etc/phpvirtualbox.php	$fs/usr/share/phpvirtualbox/config.php
    1.39 +	cp -a stuff/*			$fs
    1.40  }
    1.41  
    1.42  post_install()
    1.43 @@ -30,19 +34,25 @@
    1.44  	chroot "$1/" VBoxManage setproperty websrvauthlibrary null 
    1.45  
    1.46  	# Configure lighttpd server
    1.47 -	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.48 -		if ! grep -q /usr/share/phpvirtualbox/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.49 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phpvirtualbox/" => "/usr/share/phpvirtualbox/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.50 -			if [ -z "$1" ]; then
    1.51 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
    1.52 +	  then
    1.53 +		if ! grep -q /usr/share/phpvirtualbox/ "$1/etc/lighttpd/lighttpd.conf"
    1.54 +		  then
    1.55 +			sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phpvirtualbox/" => "/usr/share/phpvirtualbox/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.56 +			if [ -z "$1" ]
    1.57 +			  then
    1.58  				# Start Web server.
    1.59  				/etc/init.d/lighttpd stop
    1.60  				/etc/init.d/lighttpd start
    1.61  			fi
    1.62  		fi
    1.63  	fi
    1.64 +
    1.65  	# Configure apache server
    1.66 -	if [ -f "$1/etc/apache/httpd.conf" ]; then
    1.67 -		if [ ! -f "$1/etc/apache/conf.d/phpvirtualbox" ]; then
    1.68 +	if [ -f "$1/etc/apache/httpd.conf" ]
    1.69 +	  then
    1.70 +		if [ ! -f "$1/etc/apache/conf.d/phpvirtualbox" ]
    1.71 +		  then
    1.72  			cat > "$1/etc/apache/conf.d/phpvirtualbox" <<EOT
    1.73  <IfModule mod_alias.c>
    1.74      Alias /phpvirtualbox /usr/share/phpvirtualbox
    1.75 @@ -55,7 +65,8 @@
    1.76      Allow from all
    1.77  </DirectoryMatch>
    1.78  EOT
    1.79 -			if [ -z "$1" ]; then
    1.80 +			if [ -z "$1" ]
    1.81 +			  then
    1.82  				# Start Web server.
    1.83  				/etc/init.d/apache stop
    1.84  				/etc/init.d/apache start