wok-next annotate nzbget/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | d43bf7aae921 |
children | d457c4e37c1b |
rev | line source |
---|---|
al@20459 | 1 # SliTaz package receipt v2. |
pascal@17192 | 2 |
pascal@17192 | 3 PACKAGE="nzbget" |
pascal@17192 | 4 VERSION="13.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@20459 | 9 WEB_SITE="http://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 |
pascal@17192 | 14 BUILD_DEPENDS="libxml2-dev openssl-dev ncurses-dev zlib-dev" |
al@21020 | 15 SPLIT="$PACKAGE-webui $PACKAGE" |
pascal@17192 | 16 |
al@20459 | 17 compile_rules() { |
al@20459 | 18 ./configure \ |
pascal@17192 | 19 --disable-parcheck \ |
pascal@17192 | 20 $CONFIGURE_ARGS && |
pascal@17192 | 21 make && |
al@21020 | 22 make -j1 DESTDIR=$install install || return 1 |
al@20513 | 23 |
al@20513 | 24 mkdir -p $install/etc/ |
al@20513 | 25 mv $install/usr/share/nzbget/nzbget.conf $install/etc/ |
pascal@17192 | 26 } |
pascal@17192 | 27 |
al@20459 | 28 genpkg_rules() { |
al@20459 | 29 case $PACKAGE in |
al@20513 | 30 nzbget-webui) |
al@20513 | 31 copy usr/share/nzbget/webui/ |
al@20513 | 32 CAT="network|web user interface" |
al@20513 | 33 DEPENDS="nzbget" |
al@20513 | 34 ;; |
al@20459 | 35 nzbget) |
al@20513 | 36 copy @std @rm |
al@20459 | 37 DEPENDS="libxml2 openssl ncurses gcc-lib-base" |
al@20459 | 38 CONFIG_FILES="/etc/nzbget.conf" |
al@20459 | 39 ;; |
al@20459 | 40 esac |
pascal@17192 | 41 } |
al@20459 | 42 |
al@20459 | 43 post_install_nzbget_webui() { |
al@20459 | 44 # Configure lighttpd server |
al@20459 | 45 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
al@20459 | 46 if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf"; then |
al@20459 | 47 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/nzbget/" => "/usr/share/nzbget/webui/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
al@20459 | 48 if [ -z "$1" ]; then |
al@20459 | 49 # Start Web server. |
al@20459 | 50 /etc/init.d/lighttpd stop |
al@20459 | 51 /etc/init.d/lighttpd start |
al@20459 | 52 fi |
al@20459 | 53 fi |
al@20459 | 54 fi |
al@20459 | 55 # Configure apache server |
al@20459 | 56 if [ -f "$1/etc/apache/httpd.conf" ]; then |
al@20459 | 57 if [ ! -f "$1/etc/apache/conf.d/nzbget" ]; then |
al@20459 | 58 cat > "$1/etc/apache/conf.d/nzbget" <<EOT |
al@20459 | 59 <IfModule mod_alias.c> |
al@20459 | 60 Alias /nzbget /usr/share/nzbget/webui |
al@20459 | 61 </IfModule> |
al@20459 | 62 <Directory /usr/share/nzbget/webui/> |
al@20459 | 63 DirectoryIndex index.html |
al@20459 | 64 Options +FollowSymLinks |
al@20459 | 65 AllowOverride None |
al@20459 | 66 Order allow,deny |
al@20459 | 67 Allow from all |
al@20459 | 68 </Directory> |
al@20459 | 69 EOT |
al@20459 | 70 if [ -z "$1" ]; then |
al@20459 | 71 # Start Web server. |
al@20459 | 72 /etc/init.d/apache stop |
al@20459 | 73 /etc/init.d/apache start |
al@20459 | 74 fi |
al@20459 | 75 fi |
al@20459 | 76 fi |
al@20459 | 77 } |