wok-next diff smbwebclient/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d43bf7aae921
children
line diff
     1.1 --- a/smbwebclient/receipt	Wed Mar 21 15:58:17 2018 +0200
     1.2 +++ b/smbwebclient/receipt	Sat Nov 21 14:32:44 2020 +0100
     1.3 @@ -3,19 +3,15 @@
     1.4  PACKAGE="smbwebclient"
     1.5  VERSION="2.9"
     1.6  CATEGORY="network"
     1.7 -SHORT_DESC="Samba client over the Web."
     1.8 +SHORT_DESC="Samba client over the Web"
     1.9  MAINTAINER="pascal.bellard@slitaz.org"
    1.10  LICENSE="GPL2"
    1.11 +WEB_SITE="http://smbwebclient.sourceforge.net/"
    1.12 +
    1.13  TARBALL="$PACKAGE-$VERSION.php.gz"
    1.14 -WEB_SITE="http://$PACKAGE.sourceforge.net/"
    1.15  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.16 -CONFIG_FILES="/etc/samba/smbwebclient.conf"
    1.17  
    1.18 -DEPENDS="php smbclient"
    1.19 -
    1.20 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.21 -genpkg_rules()
    1.22 -{
    1.23 +genpkg_rules() {
    1.24  	if [ ! -d $src ]; then
    1.25  		mkdir -p $src
    1.26  		cp $SRC/$TARBALL $src
    1.27 @@ -25,19 +21,20 @@
    1.28  	mkdir -p $fs/usr/share/samba $fs/etc/samba
    1.29  	cp -a $src/. $fs/usr/share/samba
    1.30  	cp -a $stuff/* $fs
    1.31 +	DEPENDS="php smbclient"
    1.32 +	CONFIG_FILES="/etc/samba/smbwebclient.conf"
    1.33  }
    1.34  
    1.35 -post_install()
    1.36 -{
    1.37 +post_install() {
    1.38  	if [ -f "$1/etc/locale.conf" ]; then
    1.39  		lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*})
    1.40  		sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
    1.41  			"$1/etc/samba/smbwebclient.conf"
    1.42  	fi
    1.43 -	
    1.44 +
    1.45  	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.46  		if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.47 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/smbwebclient/" => "/usr/share/samba/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.48 +			sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/smbwebclient/" => "/usr/share/samba/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.49  			if [ -z "$1" ]; then
    1.50  				# Start Web server.
    1.51  				/etc/init.d/lighttpd stop
    1.52 @@ -45,6 +42,7 @@
    1.53  			fi
    1.54  		fi
    1.55  	fi
    1.56 +
    1.57  	# Configure apache server
    1.58  	if [ -f "$1/etc/apache/httpd.conf" ]; then
    1.59  		if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then
    1.60 @@ -66,9 +64,12 @@
    1.61  			fi
    1.62  		fi
    1.63  	fi
    1.64 -	cat <<EOF
    1.65 ----
    1.66 -Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf 
    1.67 ----
    1.68 +
    1.69 +	[- n "$quiet" ] || cat <<"EOF"
    1.70 +
    1.71 +	.-----------------------------------------------.
    1.72 +	| Check $cfgDefaultServer in configuration file |
    1.73 +	| /etc/samba/smbwebclient.conf                  |
    1.74 +	'-----------------------------------------------'
    1.75  EOF
    1.76  }