2 # Copyright (C) 2009-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/leafnode
16 PKG_MD5SUM:=a3edafeb854efaa3fbb0f7951d02160f
20 include $(INCLUDE_DIR)/package.mk
22 CONFIGURE_ARGS+=--sysconfdir=/etc/leafnode
23 CONFIGURE_VARS+=LIBS=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
25 EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
27 EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
29 define Package/leafnode/Default
33 URL:=http://leafnode.sourceforge.net
36 define Package/leafnode
37 $(call Package/leafnode/Default)
38 DEPENDS:=+libpcre +xinetd
39 TITLE:=Leafnode store-and-forward NNTP proxy
42 define Package/leafnode/description
43 This package contains the "leafnode", "fetchnews" and
44 "texpire" programs and the necessary configuration files
45 for the leafnode proxy
48 define Package/leafnode-extra
49 $(call Package/leafnode/Default)
51 TITLE:=Leafnode extra programs
54 define Package/leafnode-extra/description
55 This package contains the more rarely used "checkgroups",
56 "applyfilter" and "leafnode-version" programs from the
60 define Package/leafnode/conffiles
61 /etc/leafnode/config.example
66 define Package/leafnode/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/leafnode $(1)/usr/sbin/
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fetchnews $(1)/usr/sbin/
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/texpire $(1)/usr/sbin/
71 $(INSTALL_DIR) $(1)/etc/leafnode
72 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/leafnode/config.example $(1)/etc/leafnode/
73 $(INSTALL_DIR) $(1)/etc/xinetd.d
74 $(INSTALL_DATA) ./files/nntp $(1)/etc/xinetd.d/
75 $(INSTALL_DIR) $(1)/etc/crontabs
76 $(INSTALL_DATA) ./files/news $(1)/etc/crontabs/
77 $(INSTALL_DIR) $(1)/etc/init.d
78 $(INSTALL_BIN) ./files/leafnode.init $(1)/etc/init.d/leafnode
81 define Package/leafnode-extra/install
82 $(INSTALL_DIR) $(1)/usr/sbin
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/checkgroups $(1)/usr/sbin/
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/applyfilter $(1)/usr/sbin/
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/leafnode-version $(1)/usr/bin/
89 $(eval $(call BuildPackage,leafnode))
90 $(eval $(call BuildPackage,leafnode-extra))