Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / net / mini_snmpd / Makefile
1 #
2 # Copyright (C) 2009-2016 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.4-rc1
12 PKG_RELEASE:=3
13 PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
14 PKG_LICENSE:=GPL-2.0
15 PKG_LICENSE_FILES:=COPYING
16
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_URL:=https://github.com/troglobit/mini-snmpd.git
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE_VERSION:=203d92e60ed09466d6676c6ad20ad6cb2ce08a5d
21 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
22 PKG_MIRROR_HASH:=175d4d9b69c3195ef850eaffd8ac63d012a052089b4a9d074b4d3aef96888b8f
23
24 PKG_FIXUP:=autoreconf
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
26 PKG_BUILD_PARALLEL:=1
27 PKG_INSTALL:=1
28 # As warned by upstream maintainer and binutils
29 # however compiler warnings can be ignored until next binutils release
30 # https://github.com/wongsyrone/openwrt-1/issues/67
31 # PKG_SSP:=0
32 # PKG_RELRO:=0
33
34 include $(INCLUDE_DIR)/package.mk
35
36 define Package/mini_snmpd
37 SECTION:=net
38 CATEGORY:=Network
39 TITLE:=A tiny SNMP server for embedded systems
40 URL:=http://troglobit.github.io/mini-snmpd.html
41 # uncomment if you just want the binary, not the init script
42 # openwrt requires init script runtime dependencies be defined for make menuconfig
43 # (e.g busybox sysntpd)
44 DEPENDS:=+jsonfilter +ubus +procd +ubox
45 endef
46
47 CONFIGURE_ARGS+= \
48 $(if $(CONFIG_IPV6),,--disable-ipv6)
49
50 # Configure weirdness - Disabled by default, explicitately disabling turns feature on!
51 # --disable-debug \
52 # --disable-demo - Upstream Github Issue #4 Fixed 20160707
53
54 define Package/mini_snmpd/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mini_snmpd $(1)/usr/bin/
57 $(INSTALL_DIR) $(1)/etc/config
58 $(INSTALL_CONF) ./files/mini_snmpd.config $(1)/etc/config/mini_snmpd
59 $(INSTALL_DIR) $(1)/etc/init.d
60 $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd
61 endef
62
63 define Package/mini_snmpd/conffiles
64 /etc/config/mini_snmpd
65 endef
66
67 $(eval $(call BuildPackage,mini_snmpd))