From fcea484f9ae70b0b5ba303518ad332e4ae66a01c Mon Sep 17 00:00:00 2001 From: nico Date: Sat, 17 Apr 2010 16:49:59 +0000 Subject: [PATCH] [packages] mini_snmpd: build 2 variants, one for IPv4 and one for IPv6 git-svn-id: svn://svn.openwrt.org/openwrt/packages@20956 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/mini_snmpd/Makefile | 43 ++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/net/mini_snmpd/Makefile b/net/mini_snmpd/Makefile index c49b6eb3c..0b9918996 100644 --- a/net/mini_snmpd/Makefile +++ b/net/mini_snmpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010 OpenWrt.org +# Copyright (C) 2009-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,36 +9,50 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mini_snmpd PKG_VERSION:=1.0 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=mini_snmpd.tar.gz PKG_SOURCE_URL:=http://members.aon.at/linuxfreak/linux/ PKG_MD5SUM:=13f2202ff01ff6b6463989f34f453063 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk -define Package/mini-snmpd - SECTION:=net - CATEGORY:=Network +define Package/mini-snmpd/Default TITLE:=SNMP server for embedded systems URL:=http://members.aon.at/linuxfreak/linux/mini_snmpd.html - DEPENDS:=+IPV6:kmod-ipv6 +endef + +define Package/mini-snmpd +$(call Package/mini-snmpd/Default) + SECTION:=net + CATEGORY:=Network + TITLE+= (IPv4 only) + VARIANT:=ipv4 +endef + +define Package/mini-snmpd6 +$(call Package/mini-snmpd/Default) + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE+= (IPv6 only) + VARIANT:=ipv6 + DEPENDS:=+kmod-ipv6 endef +PKG_OFLAGS:=$(TARGET_CFLAGS) -DSYSLOG +ifeq ($(BUILD_VARIANT),ipv6) + PKG_OFLAGS+= -DIPV6 +endif + MAKE_FLAGS+= \ + OFLAGS="$(PKG_OFLAGS)" \ STRIP="/bin/true" \ INSTALL_ROOT="$(PKG_INSTALL_DIR)" \ mini_snmpd install -ifeq ($(CONFIG_IPV6),y) -MAKE_FLAGS+= OFLAGS="$(TARGET_CFLAGS) -DSYSLOG -DIPV6" -else -MAKE_FLAGS+= OFLAGS="$(TARGET_CFLAGS) -DSYSLOG" -endif - define Package/mini-snmpd/install $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/sbin/mini_snmpd $(1)/usr/bin/ @@ -48,4 +62,7 @@ define Package/mini-snmpd/install $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd endef +Package/mini-snmpd6/install=$(Package/mini-snmpd/install) + $(eval $(call BuildPackage,mini-snmpd)) +$(eval $(call BuildPackage,mini-snmpd6))