wok view nzbget-webui/receipt @ rev 20910
updated fakeroot (1.15.1 -> 1.23)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Feb 28 14:29:52 2019 +0100 (2019-02-28) |
parents | 9e01bc6321ea |
children | e1e99c585768 |
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="https://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 }