2009-06-26 20:07:43 +00:00
|
|
|
#
|
2010-12-21 06:56:01 +00:00
|
|
|
# Copyright (C) 2009-2010 OpenWrt.org
|
2009-04-09 14:00:11 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=leafnode
|
2010-12-21 06:56:01 +00:00
|
|
|
PKG_VERSION:=1.11.8
|
2009-04-09 14:00:11 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2009-06-26 20:07:43 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/leafnode
|
2010-12-21 06:56:01 +00:00
|
|
|
PKG_MD5SUM:=a3edafeb854efaa3fbb0f7951d02160f
|
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
2009-04-09 14:00:11 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+=--sysconfdir=/etc/leafnode
|
|
|
|
CONFIGURE_VARS+=LIBS=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
|
|
|
|
2009-04-29 12:56:17 +00:00
|
|
|
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
|
2009-04-09 14:00:11 +00:00
|
|
|
|
|
|
|
EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
|
|
|
|
2009-06-26 20:07:43 +00:00
|
|
|
define Package/leafnode/Default
|
2009-04-09 14:00:11 +00:00
|
|
|
SUBMENU:=NNTP
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2009-06-26 20:07:43 +00:00
|
|
|
URL:=http://leafnode.sourceforge.net
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode
|
|
|
|
$(call Package/leafnode/Default)
|
2009-04-09 14:00:11 +00:00
|
|
|
DEPENDS:=+libpcre +xinetd
|
|
|
|
TITLE:=Leafnode store-and-forward NNTP proxy
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode/description
|
|
|
|
This package contains the "leafnode", "fetchnews" and
|
|
|
|
"texpire" programs and the necessary configuration files
|
|
|
|
for the leafnode proxy
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode-extra
|
2009-06-26 20:07:43 +00:00
|
|
|
$(call Package/leafnode/Default)
|
2009-04-09 14:00:11 +00:00
|
|
|
DEPENDS:=leafnode
|
2009-06-26 20:07:43 +00:00
|
|
|
TITLE:=Leafnode extra programs
|
2009-04-09 14:00:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode-extra/description
|
|
|
|
This package contains the more rarely used "checkgroups",
|
|
|
|
"applyfilter" and "leafnode-version" programs from the
|
|
|
|
leafnode suite
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode/conffiles
|
|
|
|
/etc/leafnode/config.example
|
|
|
|
/etc/xinetd.d/nntp
|
|
|
|
/etc/crontabs/news
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode/postinst
|
|
|
|
#!/bin/sh
|
2010-12-21 06:56:01 +00:00
|
|
|
grep -q '^news:' $${IPKG_INSTROOT}/etc/passwd 2>/dev/null
|
|
|
|
[ $$? -ne 0 ] && echo "news:*:31:31:news:/var/spool/news:/bin/true" >>$${IPKG_INSTROOT}/etc/passwd && echo "news:x:31:" >>$${IPKG_INSTROOT}/etc/group || exit 0
|
2009-04-09 14:00:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-12-21 06:56:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/leafnode $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fetchnews $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/texpire $(1)/usr/sbin/
|
2009-04-09 14:00:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/leafnode
|
2010-12-21 06:56:01 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/leafnode/config.example $(1)/etc/leafnode/
|
2009-04-09 14:00:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/xinetd.d
|
2010-12-21 06:56:01 +00:00
|
|
|
$(INSTALL_DATA) ./files/nntp $(1)/etc/xinetd.d/
|
2009-04-09 14:00:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/crontabs
|
2010-12-21 06:56:01 +00:00
|
|
|
$(INSTALL_DATA) ./files/news $(1)/etc/crontabs/
|
2009-04-09 14:00:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/leafnode-extra/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-12-21 06:56:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/checkgroups $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/applyfilter $(1)/usr/sbin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/leafnode-version $(1)/usr/bin/
|
2009-04-09 14:00:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,leafnode))
|
|
|
|
$(eval $(call BuildPackage,leafnode-extra))
|