aMule: update to 2.3.1
[openwrt/svn-archive/archive.git] / net / nzbgetweb / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nzbgetweb
11 PKG_VERSION:=1.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
15 PKG_SOURCE_URL:=@SF/nzbget
16 PKG_MD5SUM:=78ccce66f9df07ee69250ec79819c37c
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/nzbgetweb
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/nzbgetweb
23 SUBMENU:=NNTP
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+nzbget +php5 +php5-cgi +php5-mod-session +php5-mod-gd +php5-mod-xml +uhttpd
27 URL:=http://nzbget.sourceforge.net/
28 TITLE:=Web interface for nzbget
29 MAINTAINER:=Artur Wronowski <arteqw@gmail.com>
30 endef
31
32 define Package/nzbgetweb/description
33 Web interface for nzbget.
34 endef
35
36 define Package/nzbgetweb/postinst
37 #!/bin/sh
38 uci batch <<EOF
39 set uhttpd.nzbgetweb=uhttpd
40 set uhttpd.nzbgetweb.listen_http=0.0.0.0:8008
41 set uhttpd.nzbgetweb.script_timeout=60
42 set uhttpd.nzbgetweb.network_timeout=30
43 set uhttpd.nzbgetweb.interpreter=.php=/usr/bin/php-cgi
44 set uhttpd.nzbgetweb.home=/www/nzbgetweb
45 set uhttpd.nzbgetweb.index_page=index.php
46 commit uhttpd
47 EOF
48 /etc/init.d/uhttpd restart
49 echo "Bind your browser to router IP with port 8008"
50 endef
51
52 define Build/Compile
53 endef
54
55 define Package/nzbgetweb/install
56 $(INSTALL_DIR) $(1)/www/nzbgetweb
57 $(CP) $(PKG_BUILD_DIR)/*.php $(1)/www/nzbgetweb/
58 $(CP) $(PKG_BUILD_DIR)/*.css $(1)/www/nzbgetweb/
59 $(CP) $(PKG_BUILD_DIR)/README $(1)/www/nzbgetweb/
60 $(CP) $(PKG_BUILD_DIR)/ChangeLog $(1)/www/nzbgetweb/
61 $(CP) $(PKG_BUILD_DIR)/images $(1)/www/nzbgetweb/
62 $(INSTALL_DIR) $(1)/www/nzbgetweb/lib
63 $(CP) ./files/lib $(1)/www/nzbgetweb/lib/
64 endef
65
66 $(eval $(call BuildPackage,nzbgetweb))