wok-current view nzbget-webui/receipt @ rev 17281

Up gparted (0.20.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 26 18:29:21 2014 +0100 (2014-10-26)
parents
children 9e01bc6321ea
line source
1 # SliTaz package receipt.
3 PACKAGE="nzbget-webui"
4 VERSION="13.0"
5 CATEGORY="network"
6 SHORT_DESC="The most efficient usenet downloader, web user interface."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://nzbget.net/"
11 WANTED="nzbget"
12 DEPENDS="nzbget"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/nzbget
18 cp -a $install/usr/share/nzbget/webui $fs/usr/share/nbzget
19 }
21 post_install()
22 {
23 # Configure lighttpd server
24 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
25 if ! grep -q /usr/share/nzbget/ $1/etc/lighttpd/lighttpd.conf; then
26 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/nzbget/" => "/usr/share/nzbget/webui/",|g' -i $1/etc/lighttpd/lighttpd.conf
27 if [ -z "$1" ]; then
28 # Start Web server.
29 /etc/init.d/lighttpd stop
30 /etc/init.d/lighttpd start
31 fi
32 fi
33 fi
34 # Configure apache server
35 if [ -f $1/etc/apache/httpd.conf ]; then
36 if [ ! -f $1/etc/apache/conf.d/nzbget ]; then
37 cat > $1/etc/apache/conf.d/nzbget <<EOT
38 <IfModule mod_alias.c>
39 Alias /nzbget /usr/share/nzbget/webui
40 </IfModule>
41 <Directory /usr/share/nzbget/webui/>
42 DirectoryIndex index.html
43 Options +FollowSymLinks
44 AllowOverride None
45 Order allow,deny
46 Allow from all
47 </Directory>
48 EOT
49 if [ -z "$1" ]; then
50 # Start Web server.
51 /etc/init.d/apache stop
52 /etc/init.d/apache start
53 fi
54 fi
55 fi
56 }