1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
9 PKG_HASH
:= b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf
10 PKG_DESCR
:= snmp agent
11 PKG_SECTION
:= net
/misc
12 PKG_DEPENDS
:= libnetsnmp libelf libnl
13 PKG_BUILDDEP
:= libelf libnl
14 PKG_URL
:= http
://www.net-snmp.org
/
15 PKG_SITES
:= $(MASTER_SITE_SOURCEFORGE
:=net-snmp
/)
17 PKG_LIBNAME
:= libnetsnmp
20 DISTFILES
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
22 PKG_SUBPKGS
:= SNMPD SNMP_UTILS LIBNETSNMP
23 PKGSD_SNMP_UTILS
:= snmp utilities
24 PKGSS_SNMP_UTILS
:= libnetsnmp libelf
25 PKGSD_LIBNETSNMP
:= snmp library
26 PKGSS_LIBNETSNMP
:= libelf
27 PKGSC_LIBNETSNMP
:= libs
/net
29 PKG_FLAVOURS_SNMPD
:= WITH_IPV6
30 PKGFD_WITH_IPV6
:= enable ipv6 support
32 include $(ADK_TOPDIR
)/mk
/package.mk
34 $(eval
$(call PKG_template
,SNMPD
,snmpd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKG_DEPENDS
),$(PKG_DESCR
),$(PKG_SECTION
)))
35 $(eval
$(call PKG_template
,SNMP_UTILS
,snmp-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKGSS_SNMP_UTILS
),$(PKGSD_SNMP_UTILS
),$(PKG_SECTION
)))
36 $(eval
$(call PKG_template
,LIBNETSNMP
,libnetsnmp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(PKGSS_LIBNETSNMP
),$(PKGSD_LIBNETSNMP
),$(PKGSC_LIBNETSNMP
),$(PKG_OPTS
)))
38 SNMP_TRANSPORTS_INCLUDED
:= UDP TCP Callback Unix
39 SNMP_TRANSPORTS_EXCLUDED
:= Alias
40 ifneq ($(ADK_PACKAGE_SNMPD_WITH_IPV6
),)
41 SNMP_TRANSPORTS_INCLUDED
+= TCPIPv6 UDPIPv6
43 SNMP_TRANSPORTS_EXCLUDED
:= TCPIPv6 UDPIPv6
46 TARGET_LDFLAGS
+= -pthread
47 CONFIGURE_ARGS
+= --with-defaults \
48 --with-persistent-directory
=/etc
/snmp \
49 --with-default-snmp-version
=3 \
50 --with-sys-contact
=root@localhost \
51 --with-sys-location
=Unknown \
52 --enable-applications \
53 --disable-embedded-perl \
54 --without-perl-modules \
57 --disable-mib-loading \
60 --with-transports
="$(SNMP_TRANSPORTS_INCLUDED)" \
61 --with-out-transports
="$(SNMP_TRANSPORTS_EXCLUDED)" \
62 --with-opaque-special-types \
68 ifneq ($(ADK_PACKAGE_SNMPD_WITH_IPV6
),)
69 CONFIGURE_ARGS
+= --enable-ipv6
71 CONFIGURE_ARGS
+= --disable-ipv6
74 FAKE_FLAGS
+= INSTALL_PREFIX
="$(WRKINST)"
77 $(INSTALL_DIR
) $(IDIR_LIBNETSNMP
)/usr
/lib
78 $(CP
) $(WRKINST
)/usr
/lib
/libnetsnmp
*.so
* $(IDIR_LIBNETSNMP
)/usr
/lib
/
81 $(INSTALL_DIR
) $(IDIR_SNMPD
)/etc
/snmp
82 $(INSTALL_DIR
) $(IDIR_SNMPD
)/usr
/sbin
83 $(INSTALL_DATA
) .
/files
/snmpd.conf
$(IDIR_SNMPD
)/etc
/snmp
/snmpd.conf
84 $(INSTALL_BIN
) $(WRKINST
)/usr
/sbin
/snmpd
$(IDIR_SNMPD
)/usr
/sbin
/snmpd
87 $(INSTALL_DIR
) $(IDIR_SNMP_UTILS
)/usr
/bin
88 $(CP
) $(WRKINST
)/usr
/bin
/snmp
{get,set
,status
,test,trap
,walk
} \
89 $(IDIR_SNMP_UTILS
)/usr
/bin
/
91 include $(ADK_TOPDIR
)/mk
/pkg-bottom.mk