0b99189960ef6bf75dc0bfe04ef25b8fd5dcae8f
[openwrt/svn-archive/archive.git] / net / mini_snmpd / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mini_snmpd
11 PKG_VERSION:=1.0
12 PKG_RELEASE:=7
13
14 PKG_SOURCE:=mini_snmpd.tar.gz
15 PKG_SOURCE_URL:=http://members.aon.at/linuxfreak/linux/
16 PKG_MD5SUM:=13f2202ff01ff6b6463989f34f453063
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/mini-snmpd/Default
23 TITLE:=SNMP server for embedded systems
24 URL:=http://members.aon.at/linuxfreak/linux/mini_snmpd.html
25 endef
26
27 define Package/mini-snmpd
28 $(call Package/mini-snmpd/Default)
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE+= (IPv4 only)
32 VARIANT:=ipv4
33 endef
34
35 define Package/mini-snmpd6
36 $(call Package/mini-snmpd/Default)
37 SECTION:=ipv6
38 CATEGORY:=IPv6
39 TITLE+= (IPv6 only)
40 VARIANT:=ipv6
41 DEPENDS:=+kmod-ipv6
42 endef
43
44
45 PKG_OFLAGS:=$(TARGET_CFLAGS) -DSYSLOG
46 ifeq ($(BUILD_VARIANT),ipv6)
47 PKG_OFLAGS+= -DIPV6
48 endif
49
50 MAKE_FLAGS+= \
51 OFLAGS="$(PKG_OFLAGS)" \
52 STRIP="/bin/true" \
53 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
54 mini_snmpd install
55
56 define Package/mini-snmpd/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(CP) $(PKG_INSTALL_DIR)/sbin/mini_snmpd $(1)/usr/bin/
59 $(INSTALL_DIR) $(1)/etc/config
60 $(INSTALL_CONF) ./files/mini_snmpd.config $(1)/etc/config/mini_snmpd
61 $(INSTALL_DIR) $(1)/etc/init.d
62 $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd
63 endef
64
65 Package/mini-snmpd6/install=$(Package/mini-snmpd/install)
66
67 $(eval $(call BuildPackage,mini-snmpd))
68 $(eval $(call BuildPackage,mini-snmpd6))