wok-6.x annotate nzbget-webui/receipt @ rev 23997
linld: add iso support (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 08 20:36:59 2021 +0000 (2021-01-08) |
parents | a78610b2eb47 |
children | d30dcfb0598a |
rev | line source |
---|---|
pascal@17192 | 1 # SliTaz package receipt. |
pascal@17192 | 2 |
pascal@17192 | 3 PACKAGE="nzbget-webui" |
Hans-G?nter@23255 | 4 VERSION="21.0" |
pascal@17192 | 5 CATEGORY="network" |
pascal@17192 | 6 SHORT_DESC="The most efficient usenet downloader, web user interface." |
pascal@17192 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@17192 | 8 LICENSE="GPL2" |
pascal@20669 | 9 WEB_SITE="https://nzbget.net/" |
pascal@17192 | 10 |
Hans-G?nter@23255 | 11 DEPENDS="nzbget" |
pascal@17192 | 12 WANTED="nzbget" |
pascal@17192 | 13 |
pascal@17192 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@17192 | 15 genpkg_rules() |
pascal@17192 | 16 { |
pascal@17192 | 17 mkdir -p $fs/usr/share/nzbget |
Hans-G?nter@23255 | 18 cp -a $install/usr/share/nzbget/webui $fs/usr/share/nbzget |
pascal@17192 | 19 } |
pascal@17192 | 20 |
pascal@17192 | 21 post_install() |
pascal@17192 | 22 { |
pascal@17192 | 23 # Configure lighttpd server |
Hans-G?nter@23255 | 24 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23255 | 25 then |
Hans-G?nter@23255 | 26 if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23255 | 27 then |
pascal@18730 | 28 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/nzbget/" => "/usr/share/nzbget/webui/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23255 | 29 if [ -z "$1" ] |
Hans-G?nter@23255 | 30 then |
pascal@17192 | 31 # Start Web server. |
pascal@17192 | 32 /etc/init.d/lighttpd stop |
pascal@17192 | 33 /etc/init.d/lighttpd start |
pascal@17192 | 34 fi |
pascal@17192 | 35 fi |
pascal@17192 | 36 fi |
Hans-G?nter@23255 | 37 |
pascal@17192 | 38 # Configure apache server |
Hans-G?nter@23255 | 39 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23255 | 40 then |
Hans-G?nter@23255 | 41 if [ ! -f "$1/etc/apache/conf.d/nzbget" ] |
Hans-G?nter@23255 | 42 then |
pascal@18730 | 43 cat > "$1/etc/apache/conf.d/nzbget" <<EOT |
pascal@17192 | 44 <IfModule mod_alias.c> |
pascal@17192 | 45 Alias /nzbget /usr/share/nzbget/webui |
pascal@17192 | 46 </IfModule> |
pascal@17192 | 47 <Directory /usr/share/nzbget/webui/> |
pascal@17192 | 48 DirectoryIndex index.html |
pascal@17192 | 49 Options +FollowSymLinks |
pascal@17192 | 50 AllowOverride None |
pascal@17192 | 51 Order allow,deny |
pascal@17192 | 52 Allow from all |
pascal@17192 | 53 </Directory> |
pascal@17192 | 54 EOT |
Hans-G?nter@23255 | 55 if [ -z "$1" ] |
Hans-G?nter@23255 | 56 then |
pascal@17192 | 57 # Start Web server. |
pascal@17192 | 58 /etc/init.d/apache stop |
pascal@17192 | 59 /etc/init.d/apache start |
pascal@17192 | 60 fi |
pascal@17192 | 61 fi |
pascal@17192 | 62 fi |
pascal@17192 | 63 } |