wok rev 17192

Add nzbget
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 07 15:46:53 2014 +0000 (2014-10-07)
parents c92b838a23c5
children bc03e47a67e8
files nzbget-webui/receipt nzbget/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nzbget-webui/receipt	Tue Oct 07 15:46:53 2014 +0000
     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 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/nzbget/receipt	Tue Oct 07 15:46:53 2014 +0000
     2.3 @@ -0,0 +1,35 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="nzbget"
     2.7 +VERSION="13.0"
     2.8 +CATEGORY="network"
     2.9 +SHORT_DESC="The most efficient usenet downloader."
    2.10 +MAINTAINER="pascal.bellard@slitaz.org"
    2.11 +LICENSE="GPL2"
    2.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.13 +WEB_SITE="http://nzbget.net/"
    2.14 +WGET_URL="$SF_MIRROR/nzbget/nzbget-stable/$VERSION/$TARBALL"
    2.15 +CONFIG_FILES="/etc/nzbget.conf"
    2.16 +
    2.17 +DEPENDS="libxml2 libssl ncurses gcc-lib-base"
    2.18 +BUILD_DEPENDS="libxml2-dev openssl-dev ncurses-dev zlib-dev"
    2.19 +
    2.20 +# Rules to configure and make the package.
    2.21 +compile_rules()
    2.22 +{
    2.23 +	./configure --prefix=/usr \
    2.24 +		--disable-parcheck \
    2.25 +		$CONFIGURE_ARGS &&
    2.26 +	make &&
    2.27 +	make DESTDIR=$DESTDIR install
    2.28 +}
    2.29 +
    2.30 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.31 +genpkg_rules()
    2.32 +{
    2.33 +	mkdir -p $fs/usr/share/nzbget $fs/etc
    2.34 +	cp -a $install/usr/bin $fs/usr
    2.35 +	cp -a $install/usr/sbin $fs/usr
    2.36 +	cp -a $install/usr/share/nzbget/nzbget.conf $fs/etc
    2.37 +	cp -a $install/usr/share/nzbget/scripts $fs/usr/share/nbzget
    2.38 +}