wok-current diff nzbget-webui/receipt @ rev 18537

Up mp(5.2.10), kkedit(0.2.11), mplayer: fix *desktop
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Mon Nov 02 12:40:01 2015 +0100 (2015-11-02)
parents
children 9e01bc6321ea
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nzbget-webui/receipt	Mon Nov 02 12:40:01 2015 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nzbget-webui"
     1.7 +VERSION="13.0"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="The most efficient usenet downloader, web user interface."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +LICENSE="GPL2"
    1.12 +WEB_SITE="http://nzbget.net/"
    1.13 +
    1.14 +WANTED="nzbget"
    1.15 +DEPENDS="nzbget"
    1.16 +
    1.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.18 +genpkg_rules()
    1.19 +{
    1.20 +	mkdir -p $fs/usr/share/nzbget
    1.21 +	cp -a $install/usr/share/nzbget/webui $fs/usr/share/nbzget
    1.22 +}
    1.23 +
    1.24 +post_install()
    1.25 +{
    1.26 +	# Configure lighttpd server
    1.27 +	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
    1.28 +		if ! grep -q /usr/share/nzbget/ $1/etc/lighttpd/lighttpd.conf; then
    1.29 +	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/nzbget/" => "/usr/share/nzbget/webui/",|g' -i $1/etc/lighttpd/lighttpd.conf
    1.30 +			if [ -z "$1" ]; then
    1.31 +				# Start Web server.
    1.32 +				/etc/init.d/lighttpd stop
    1.33 +				/etc/init.d/lighttpd start
    1.34 +			fi
    1.35 +		fi
    1.36 +	fi
    1.37 +	# Configure apache server
    1.38 +	if [ -f $1/etc/apache/httpd.conf ]; then
    1.39 +		if [ ! -f $1/etc/apache/conf.d/nzbget ]; then
    1.40 +			cat > $1/etc/apache/conf.d/nzbget <<EOT
    1.41 +<IfModule mod_alias.c>
    1.42 +    Alias /nzbget /usr/share/nzbget/webui
    1.43 +</IfModule>
    1.44 +<Directory /usr/share/nzbget/webui/>
    1.45 +    DirectoryIndex index.html
    1.46 +    Options +FollowSymLinks
    1.47 +    AllowOverride None
    1.48 +    Order allow,deny
    1.49 +    Allow from all
    1.50 +</Directory>
    1.51 +EOT
    1.52 +			if [ -z "$1" ]; then
    1.53 +				# Start Web server.
    1.54 +				/etc/init.d/apache stop
    1.55 +				/etc/init.d/apache start
    1.56 +			fi
    1.57 +		fi
    1.58 +	fi
    1.59 +}