cfd1992543e16880e5d7e3bc6f333f035baa5836
[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 PKG_BUILD_PARALLEL:=1
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/mini-snmpd/Default
25 TITLE:=SNMP server for embedded systems
26 URL:=http://members.aon.at/linuxfreak/linux/mini_snmpd.html
27 endef
28
29 define Package/mini-snmpd
30 $(call Package/mini-snmpd/Default)
31 SECTION:=net
32 CATEGORY:=Network
33 TITLE+= (IPv4 only)
34 VARIANT:=ipv4
35 endef
36
37 define Package/mini-snmpd6
38 $(call Package/mini-snmpd/Default)
39 SECTION:=ipv6
40 CATEGORY:=IPv6
41 TITLE+= (IPv6 only)
42 VARIANT:=ipv6
43 DEPENDS:=+kmod-ipv6
44 endef
45
46
47 PKG_OFLAGS:=$(TARGET_CFLAGS) -DSYSLOG
48 ifeq ($(BUILD_VARIANT),ipv6)
49 PKG_OFLAGS+= -DIPV6
50 endif
51
52 MAKE_FLAGS+= \
53 OFLAGS="$(PKG_OFLAGS)" \
54 STRIP="/bin/true" \
55 INSTALL_ROOT="$(PKG_INSTALL_DIR)"
56
57 define Build/Compile
58 $(call Build/Compile/Default,mini_snmpd)
59 endef
60
61 define Package/mini-snmpd/install
62 $(INSTALL_DIR) $(1)/usr/bin
63 $(CP) $(PKG_INSTALL_DIR)/sbin/mini_snmpd $(1)/usr/bin/
64 $(INSTALL_DIR) $(1)/etc/config
65 $(INSTALL_CONF) ./files/mini_snmpd.config $(1)/etc/config/mini_snmpd
66 $(INSTALL_DIR) $(1)/etc/init.d
67 $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd
68 endef
69
70 Package/mini-snmpd6/install=$(Package/mini-snmpd/install)
71
72 $(eval $(call BuildPackage,mini-snmpd))
73 $(eval $(call BuildPackage,mini-snmpd6))