source: packages/net/mini_snmpd/Makefile @ 26826

Last change on this file since 26826 was 26826, checked in by jow, 6 years ago

[packages] mini-snmpd: make IPv4 / IPv6 mode switchable when daemon is built with IPv6 support, previously it was hardcoded to v6

File size: 1.5 KB
Line 
1#
2# Copyright (C) 2009-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=mini_snmpd
11PKG_VERSION:=1.2b
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://members.aon.at/linuxfreak/linux/
16PKG_MD5SUM:=9e432c50ba8216d7fab0983b11b7112a
17
18PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)
19PKG_BUILD_PARALLEL:=1
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/mini-snmpd/Default
25  TITLE:=SNMP server for embedded systems
26  URL:=http://members.aon.at/linuxfreak/linux/mini_snmpd.html
27endef
28
29define Package/mini-snmpd
30$(call Package/mini-snmpd/Default)
31  SECTION:=net
32  CATEGORY:=Network
33  TITLE+= Mini Snmpd
34endef
35
36PKG_OFLAGS:=$(TARGET_CFLAGS) -DSYSLOG
37
38ifeq ($(CONFIG_IPV6),y)
39  PKG_OFLAGS+= -D__IPV6__
40else
41  PKG_OFLAGS+= -D__IPV4__
42endif
43
44MAKE_FLAGS+= \
45        OFLAGS="$(PKG_OFLAGS)" \
46        STRIP="/bin/true" \
47        INSTALL_ROOT="$(PKG_INSTALL_DIR)"
48
49define Build/Compile
50        $(call Build/Compile/Default,mini_snmpd)
51endef
52
53define Package/mini-snmpd/install
54        $(INSTALL_DIR) $(1)/usr/bin
55        $(CP) $(PKG_INSTALL_DIR)/sbin/mini_snmpd $(1)/usr/bin/
56        $(INSTALL_DIR) $(1)/etc/config
57        $(INSTALL_CONF) ./files/mini_snmpd.config $(1)/etc/config/mini_snmpd
58        $(INSTALL_DIR) $(1)/etc/init.d
59        $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd
60endef
61
62Package/mini-snmpd6/install=$(Package/mini-snmpd/install)
63
64$(eval $(call BuildPackage,mini-snmpd))
Note: See TracBrowser for help on using the repository browser.