[package] ship nzbget's default configuration (#5945)
[openwrt/svn-archive/archive.git] / net / nzbget / 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:=nzbget
11 PKG_VERSION:=0.6.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/nzbget
16 PKG_MD5SUM:=eb95b3930abffb570e37af8d284c1f9d
17
18 PKG_FIXUP:=libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 TARGET_LDFLAGS+=-Wl,-rpath-link="$(STAGING_DIR)/usr/lib"
23 TARGET_CFLAGS += $(FPIC)
24
25 define Package/nzbget
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libxml2 +libpar2 +libopenssl +libpthread
29 URL:=http://nzbget.sourceforge.net/
30 TITLE:=Binary newsgrabber
31 endef
32
33 define Package/nzbget/description
34 A command-line client/server based binary newsgrabber for nzb-files.
35 endef
36
37 CONFIGURE_ARGS += \
38 --disable-static \
39 --disable-nls \
40 --disable-curses \
41 --with-tlslib=OpenSSL \
42 --with-libpar2-includes=$(STAGING_DIR)/usr/include/libpar2 \
43 --with-libpar2-libraries=$(STAGING_DIR)/usr/lib \
44 --with-libsigc-includes=$(STAGING_DIR)/usr/include/sigc++-2.0 \
45 --with-libsigc-libraries=$(STAGING_DIR)/usr/lib \
46 --with-openssl-includes=$(STAGING_DIR)/usr/include \
47 --with-openssl-libraries=$(STAGING_DIR)/usr/lib \
48 , \
49 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
50
51 CONFIGURE_VARS += \
52 ac_cv_header_regex_h=no \
53 CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS"
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 $(TARGET_CONFIGURE_OPTS) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 install all
60 endef
61
62 define Package/nzbget/install
63 $(INSTALL_DIR) $(1)/usr/sbin
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nzbget $(1)/usr/sbin/
65 $(INSTALL_DIR) $(1)/etc
66 $(INSTALL_DATA) $(PKG_BUILD_DIR)/nzbget.conf.example $(1)/etc/nzbget.conf
67 endef
68
69 $(eval $(call BuildPackage,nzbget))