wok-next annotate nzbget/receipt @ rev 20459
Combine receipts
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 02 13:45:43 2018 +0200 (2018-03-02) |
parents | e6615350078d |
children | d43bf7aae921 |
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" |
pascal@17192 | 12 WGET_URL="$SF_MIRROR/nzbget/nzbget-stable/$VERSION/$TARBALL" |
pascal@17192 | 13 |
pascal@17192 | 14 BUILD_DEPENDS="libxml2-dev openssl-dev ncurses-dev zlib-dev" |
al@20459 | 15 SPLIT="nzbget-webui" |
pascal@17192 | 16 |
al@20459 | 17 compile_rules() { |
al@20459 | 18 ./configure \ |
al@20459 | 19 --prefix=/usr \ |
pascal@17192 | 20 --disable-parcheck \ |
pascal@17192 | 21 $CONFIGURE_ARGS && |
pascal@17192 | 22 make && |
pascal@17193 | 23 make -j 1 DESTDIR=$DESTDIR install |
pascal@17192 | 24 } |
pascal@17192 | 25 |
al@20459 | 26 genpkg_rules() { |
al@20459 | 27 case $PACKAGE in |
al@20459 | 28 nzbget) |
al@20459 | 29 mkdir -p $fs/usr/share/nzbget $fs/etc |
al@20459 | 30 cp -a $install/usr/bin $fs/usr |
al@20459 | 31 cp -a $install/usr/sbin $fs/usr |
al@20459 | 32 cp -a $install/usr/share/nzbget/nzbget.conf $fs/etc |
al@20459 | 33 cp -a $install/usr/share/nzbget/scripts $fs/usr/share/nbzget |
al@20459 | 34 DEPENDS="libxml2 openssl ncurses gcc-lib-base" |
al@20459 | 35 CONFIG_FILES="/etc/nzbget.conf" |
al@20459 | 36 ;; |
al@20459 | 37 nzbget-webui) |
al@20459 | 38 mkdir -p $fs/usr/share/nzbget |
al@20459 | 39 cp -a $install/usr/share/nzbget/webui $fs/usr/share/nbzget |
al@20459 | 40 CAT="network|web user interface" |
al@20459 | 41 DEPENDS="nzbget" |
al@20459 | 42 ;; |
al@20459 | 43 esac |
pascal@17192 | 44 } |
al@20459 | 45 |
al@20459 | 46 post_install_nzbget_webui() { |
al@20459 | 47 # Configure lighttpd server |
al@20459 | 48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
al@20459 | 49 if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf"; then |
al@20459 | 50 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 | 51 if [ -z "$1" ]; then |
al@20459 | 52 # Start Web server. |
al@20459 | 53 /etc/init.d/lighttpd stop |
al@20459 | 54 /etc/init.d/lighttpd start |
al@20459 | 55 fi |
al@20459 | 56 fi |
al@20459 | 57 fi |
al@20459 | 58 # Configure apache server |
al@20459 | 59 if [ -f "$1/etc/apache/httpd.conf" ]; then |
al@20459 | 60 if [ ! -f "$1/etc/apache/conf.d/nzbget" ]; then |
al@20459 | 61 cat > "$1/etc/apache/conf.d/nzbget" <<EOT |
al@20459 | 62 <IfModule mod_alias.c> |
al@20459 | 63 Alias /nzbget /usr/share/nzbget/webui |
al@20459 | 64 </IfModule> |
al@20459 | 65 <Directory /usr/share/nzbget/webui/> |
al@20459 | 66 DirectoryIndex index.html |
al@20459 | 67 Options +FollowSymLinks |
al@20459 | 68 AllowOverride None |
al@20459 | 69 Order allow,deny |
al@20459 | 70 Allow from all |
al@20459 | 71 </Directory> |
al@20459 | 72 EOT |
al@20459 | 73 if [ -z "$1" ]; then |
al@20459 | 74 # Start Web server. |
al@20459 | 75 /etc/init.d/apache stop |
al@20459 | 76 /etc/init.d/apache start |
al@20459 | 77 fi |
al@20459 | 78 fi |
al@20459 | 79 fi |
al@20459 | 80 } |