net-snmpd: convert snmpd-static to dummy package
authorStijn Tintel <redacted>
Fri, 13 Jan 2017 19:38:28 +0000 (20:38 +0100)
committerStijn Tintel <redacted>
Sun, 15 Jan 2017 17:17:58 +0000 (18:17 +0100)
We believe snmpd-static isn't useful, but download stats show it's still
being downloaded. Instead of dropping it, make it a dummy package that
depends on snmpd.

Signed-off-by: Stijn Tintel <redacted>
Acked-by: Jo-Philipp Wich <redacted>
net/net-snmp/Makefile

index ad8684bdb5ff02c4ad377398e8b4e7608d59c317..08e36e85b583660e8ee3e76ebf152ad798a78c39 100644 (file)
@@ -91,15 +91,10 @@ endef
 
 define Package/snmpd-static
 $(call Package/net-snmp/Default)
+  DEPENDS:=+snmpd
   TITLE:=Open source SNMP implementation (daemon)
-  DEPENDS:=+PACKAGE_libnl-core:libnl-core
 endef
 
-define Package/snmpd-static/description
-$(call Package/net-snmp/Default/description)
- .
- This package contains the SNMP agent, statically linked.
-endef
 
 
 SNMP_MIB_MODULES_INCLUDED = \
@@ -202,21 +197,11 @@ endif
 
 TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/usr/lib
 
-ifdef CONFIG_PACKAGE_snmpd-static
-  define Build/Compile/static
-       $(MAKE) -C $(PKG_BUILD_DIR)/agent \
-               LDFLAGS="$(TARGET_LDFLAGS) -lm -static" \
-               EXEEXT="-static" \
-               snmpd-static
-  endef
-endif
-
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
                LDFLAGS="$(TARGET_LDFLAGS) -lm -lc" \
                all install
-       $(Build/Compile/static)
 endef
 
 define Build/InstallDev
@@ -260,21 +245,6 @@ define Package/snmpd/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd
 endef
 
-define Package/snmpd-static/conffiles
-/etc/config/snmpd
-endef
-
-define Package/snmpd-static/install
-       $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd
-       $(INSTALL_DIR) $(1)/etc/snmp
-       ln -sf /var/run/snmpd.conf $(1)/etc/snmp/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/agent/snmpd-static $(1)/usr/sbin/snmpd
-endef
-
 $(eval $(call BuildPackage,libnetsnmp))
 $(eval $(call BuildPackage,snmp-mibs))
 $(eval $(call BuildPackage,snmp-utils))
git clone https://git.99rst.org/PROJECT