[packages] net-snmp: Fix conflicting snmpv3mibs module include
[openwrt/svn-archive/archive.git] / libs / net-snmp / Makefile
index e599c4d7de3cce675d4cb99dd5615874675cabdf..d0be2ddbb5a0c0c795e31ced8dcd03d9c8d183c6 100644 (file)
@@ -1,16 +1,15 @@
-# 
-# Copyright (C) 2006-2007 OpenWrt.org
+#
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=net-snmp
 PKG_VERSION:=5.1.2
-PKG_RELEASE:=2.3
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/net-snmp
@@ -77,6 +76,7 @@ endef
 define Package/snmpd-static
 $(call Package/net-snmp/Default)
   TITLE:=Open source SNMP implementation (daemon)
+  DEPENDS:=+libelf
 endef
 
 define Package/snmpd-static/description
@@ -95,6 +95,7 @@ SNMP_MIB_MODULES_INCLUDED = \
        host/hr_proc \
        host/hr_storage \
        host/hr_system \
+       ieee802dot11 \
        mibII/at \
        mibII/icmp \
        mibII/interfaces \
@@ -110,7 +111,6 @@ SNMP_MIB_MODULES_INCLUDED = \
        snmpv3/snmpMPDStats \
        snmpv3/usmStats \
        snmpv3/usmUser \
-       snmpv3mibs \
        tunnel \
        ucd-snmp/disk \
        ucd-snmp/dlmod \
@@ -127,7 +127,6 @@ SNMP_MIB_MODULES_EXCLUDED = \
        agent_mibs \
        agentx \
        host \
-       ieee802dot11 \
        mibII \
        notification \
        snmpv3mibs \
@@ -139,6 +138,8 @@ SNMP_TRANSPORTS_INCLUDED = Callback UDP
 
 SNMP_TRANSPORTS_EXCLUDED = TCP TCPv6 UDPv6 Unix
 
+TARGET_CFLAGS += $(FPIC)
+
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
@@ -181,14 +182,14 @@ define Build/Compile
 endef
 
 define Build/InstallDev
-       mkdir -p $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(1)/usr/bin/
-       mkdir -p $(1)/usr/include
+       $(INSTALL_DIR) $(2)/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(2)/bin/
+       $(SED) 's,=/usr,=$(STAGING_DIR)/usr,g' $(2)/bin/net-snmp-config
+
+       $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(1)/usr/include/
-       mkdir -p $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(1)/usr/lib/
-       $(SED) 's,-I/usr/include,,g' $(1)/usr/bin/net-snmp-config
-       $(SED) 's,-L/usr/lib,,g' $(1)/usr/bin/net-snmp-config
 endef
 
 define Package/libnetsnmp/install