wok-next view nzbget/receipt @ rev 21057

Deal with HOST_ARCH="any"
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Dec 03 14:47:30 2018 +0200 (2018-12-03)
parents d5aab818505e
children b19bbe01a93a
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="https://nzbget.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 BUILD_DEPENDS="libxml2-dev openssl-dev ncurses-dev zlib-dev"
15 SPLIT="$PACKAGE-webui $PACKAGE"
17 compile_rules() {
18 ./configure \
19 --disable-parcheck \
20 $CONFIGURE_ARGS &&
21 make &&
22 make -j1 DESTDIR=$install install || return 1
24 mkdir -p $install/etc/
25 mv $install/usr/share/nzbget/nzbget.conf $install/etc/
26 }
28 genpkg_rules() {
29 case $PACKAGE in
30 nzbget-webui)
31 copy usr/share/nzbget/webui/
32 CAT="network|web user interface"
33 DEPENDS="nzbget"
34 ;;
35 nzbget)
36 copy @std @rm
37 DEPENDS="libxml2 openssl ncurses gcc-lib-base"
38 CONFIG_FILES="/etc/nzbget.conf"
39 ;;
40 esac
41 }
43 post_install_nzbget_webui() {
44 # Configure lighttpd server
45 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
46 if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf"; then
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"
48 if [ -z "$1" ]; then
49 # Start Web server.
50 /etc/init.d/lighttpd stop
51 /etc/init.d/lighttpd start
52 fi
53 fi
54 fi
55 # Configure apache server
56 if [ -f "$1/etc/apache/httpd.conf" ]; then
57 if [ ! -f "$1/etc/apache/conf.d/nzbget" ]; then
58 cat > "$1/etc/apache/conf.d/nzbget" <<EOT
59 <IfModule mod_alias.c>
60 Alias /nzbget /usr/share/nzbget/webui
61 </IfModule>
62 <Directory /usr/share/nzbget/webui/>
63 DirectoryIndex index.html
64 Options +FollowSymLinks
65 AllowOverride None
66 Order allow,deny
67 Allow from all
68 </Directory>
69 EOT
70 if [ -z "$1" ]; then
71 # Start Web server.
72 /etc/init.d/apache stop
73 /etc/init.d/apache start
74 fi
75 fi
76 fi
77 }