wok-next view nzbget/receipt @ rev 20465
Up LibreOffice (6.0.2), TiMidity++, jack, zstd (1.3.3)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Mar 07 23:09:42 2018 +0200 (2018-03-07) |
parents | e6615350078d |
children | d43bf7aae921 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nzbget"
4 VERSION="13.0"
5 CATEGORY="network"
6 SHORT_DESC="The most efficient usenet downloader"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://nzbget.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/nzbget/nzbget-stable/$VERSION/$TARBALL"
14 BUILD_DEPENDS="libxml2-dev openssl-dev ncurses-dev zlib-dev"
15 SPLIT="nzbget-webui"
17 compile_rules() {
18 ./configure \
19 --prefix=/usr \
20 --disable-parcheck \
21 $CONFIGURE_ARGS &&
22 make &&
23 make -j 1 DESTDIR=$DESTDIR install
24 }
26 genpkg_rules() {
27 case $PACKAGE in
28 nzbget)
29 mkdir -p $fs/usr/share/nzbget $fs/etc
30 cp -a $install/usr/bin $fs/usr
31 cp -a $install/usr/sbin $fs/usr
32 cp -a $install/usr/share/nzbget/nzbget.conf $fs/etc
33 cp -a $install/usr/share/nzbget/scripts $fs/usr/share/nbzget
34 DEPENDS="libxml2 openssl ncurses gcc-lib-base"
35 CONFIG_FILES="/etc/nzbget.conf"
36 ;;
37 nzbget-webui)
38 mkdir -p $fs/usr/share/nzbget
39 cp -a $install/usr/share/nzbget/webui $fs/usr/share/nbzget
40 CAT="network|web user interface"
41 DEPENDS="nzbget"
42 ;;
43 esac
44 }
46 post_install_nzbget_webui() {
47 # Configure lighttpd server
48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
49 if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf"; then
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"
51 if [ -z "$1" ]; then
52 # Start Web server.
53 /etc/init.d/lighttpd stop
54 /etc/init.d/lighttpd start
55 fi
56 fi
57 fi
58 # Configure apache server
59 if [ -f "$1/etc/apache/httpd.conf" ]; then
60 if [ ! -f "$1/etc/apache/conf.d/nzbget" ]; then
61 cat > "$1/etc/apache/conf.d/nzbget" <<EOT
62 <IfModule mod_alias.c>
63 Alias /nzbget /usr/share/nzbget/webui
64 </IfModule>
65 <Directory /usr/share/nzbget/webui/>
66 DirectoryIndex index.html
67 Options +FollowSymLinks
68 AllowOverride None
69 Order allow,deny
70 Allow from all
71 </Directory>
72 EOT
73 if [ -z "$1" ]; then
74 # Start Web server.
75 /etc/init.d/apache stop
76 /etc/init.d/apache start
77 fi
78 fi
79 fi
80 }