wok-next annotate nzbget/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | d457c4e37c1b |
children |
rev | line source |
---|---|
al@20459 | 1 # SliTaz package receipt v2. |
pascal@17192 | 2 |
pascal@17192 | 3 PACKAGE="nzbget" |
Hans-G?nter@21388 | 4 VERSION="21.0" |
pascal@17192 | 5 CATEGORY="network" |
al@20459 | 6 SHORT_DESC="The most efficient usenet downloader" |
pascal@17192 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@17192 | 8 LICENSE="GPL2" |
al@21041 | 9 WEB_SITE="https://nzbget.net/" |
al@20459 | 10 |
pascal@17192 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@21020 | 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@17192 | 13 |
Hans-G?nter@21388 | 14 BUILD_DEPENDS="libxml2-dev ncurses-dev openssl-dev zlib-dev" |
al@21020 | 15 SPLIT="$PACKAGE-webui $PACKAGE" |
pascal@17192 | 16 |
Hans-G?nter@21388 | 17 compile_rules() |
Hans-G?nter@21388 | 18 { |
Hans-G?nter@21388 | 19 ./configure \ |
Hans-G?nter@21388 | 20 --disable-parcheck \ |
pascal@17192 | 21 $CONFIGURE_ARGS && |
pascal@17192 | 22 make && |
al@21020 | 23 make -j1 DESTDIR=$install install || return 1 |
al@20513 | 24 |
al@20513 | 25 mkdir -p $install/etc/ |
Hans-G?nter@21388 | 26 mv $install/usr/share/nzbget/nzbget.conf $install/etc/ |
pascal@17192 | 27 } |
pascal@17192 | 28 |
Hans-G?nter@21388 | 29 genpkg_rules() |
Hans-G?nter@21388 | 30 { |
al@20459 | 31 case $PACKAGE in |
al@20513 | 32 nzbget-webui) |
al@20513 | 33 copy usr/share/nzbget/webui/ |
al@20513 | 34 CAT="network|web user interface" |
al@20513 | 35 DEPENDS="nzbget" |
al@20513 | 36 ;; |
al@20459 | 37 nzbget) |
al@20513 | 38 copy @std @rm |
Hans-G?nter@21388 | 39 DEPENDS="gcc-lib-base libxml2 ncurses openssl" |
al@20459 | 40 CONFIG_FILES="/etc/nzbget.conf" |
al@20459 | 41 ;; |
al@20459 | 42 esac |
pascal@17192 | 43 } |
al@20459 | 44 |
Hans-G?nter@21388 | 45 post_install_nzbget_webui() |
Hans-G?nter@21388 | 46 { |
al@20459 | 47 # Configure lighttpd server |
Hans-G?nter@21388 | 48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@21388 | 49 then |
Hans-G?nter@21388 | 50 if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@21388 | 51 then |
Hans-G?nter@21388 | 52 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/nzbget/" => "/usr/share/nzbget/webui/",|g' \ |
Hans-G?nter@21388 | 53 -i "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@21388 | 54 if [ -z "$1" ] |
Hans-G?nter@21388 | 55 then |
al@20459 | 56 # Start Web server. |
al@20459 | 57 /etc/init.d/lighttpd stop |
al@20459 | 58 /etc/init.d/lighttpd start |
al@20459 | 59 fi |
al@20459 | 60 fi |
al@20459 | 61 fi |
al@20459 | 62 # Configure apache server |
Hans-G?nter@21388 | 63 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@21388 | 64 then |
Hans-G?nter@21388 | 65 if [ ! -f "$1/etc/apache/conf.d/nzbget" ] |
Hans-G?nter@21388 | 66 then |
al@20459 | 67 cat > "$1/etc/apache/conf.d/nzbget" <<EOT |
al@20459 | 68 <IfModule mod_alias.c> |
al@20459 | 69 Alias /nzbget /usr/share/nzbget/webui |
al@20459 | 70 </IfModule> |
al@20459 | 71 <Directory /usr/share/nzbget/webui/> |
al@20459 | 72 DirectoryIndex index.html |
al@20459 | 73 Options +FollowSymLinks |
al@20459 | 74 AllowOverride None |
al@20459 | 75 Order allow,deny |
al@20459 | 76 Allow from all |
al@20459 | 77 </Directory> |
al@20459 | 78 EOT |
Hans-G?nter@21388 | 79 if [ -z "$1" ] |
Hans-G?nter@21388 | 80 then |
al@20459 | 81 # Start Web server. |
al@20459 | 82 /etc/init.d/apache stop |
al@20459 | 83 /etc/init.d/apache start |
al@20459 | 84 fi |
al@20459 | 85 fi |
al@20459 | 86 fi |
al@20459 | 87 } |