2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=@SF
/net-snmp
18 PKG_MD5SUM
:=8080555ab3f90011f25d5122042d9a8d
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libnetsnmp
29 TITLE
:=Open source SNMP implementation
(librairies
)
30 DESCRIPTION
:=Open source SNMP
(Simple Network Management Protocol
) implementation
(libraries
).
\\\
31 Simple Network Management Protocol
(SNMP
) is a widely used
\\\
32 protocol for monitoring the health and welfare of network
\\\
33 equipment
(eg. routers
), computer equipment and even devices
\\\
34 like UPSs. Net-SNMP is a suite of applications used to implement
\\\
35 SNMP v1
, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
\\\
37 This package contains shared libraries
, needed by other programs.
38 URL
:=http
://www.net-snmp.org
/
41 define Package
/snmp-utils
45 TITLE
:=Open source SNMP implementation
(utilities
)
46 DESCRIPTION
:=Open source SNMP
(Simple Network Management Protocol
) implementation
(utilities
).
\\\
47 Simple Network Management Protocol
(SNMP
) is a widely used
\\\
48 protocol for monitoring the health and welfare of network
\\\
49 equipment
(eg. routers
), computer equipment and even devices
\\\
50 like UPSs. Net-SNMP is a suite of applications used to implement
\\\
51 SNMP v1
, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
\\\
53 This package contains SNMP client utilities.
54 URL
:=http
://www.net-snmp.org
/
61 TITLE
:=Open source SNMP implementation
(daemon
)
62 DESCRIPTION
:=Open source SNMP
(Simple Network Management Protocol
) implementation
(daemon
).
\\\
63 Simple Network Management Protocol
(SNMP
) is a widely used
\\\
64 protocol for monitoring the health and welfare of network
\\\
65 equipment
(eg. routers
), computer equipment and even devices
\\\
66 like UPSs. Net-SNMP is a suite of applications used to implement
\\\
67 SNMP v1
, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
\\\
69 This package contains the SNMP agent
, dynamically linked.
70 URL
:=http
://www.net-snmp.org
/
73 define Package
/snmpd
/conffiles
78 define Package
/snmpd-static
81 TITLE
:=Open source SNMP implementation
(daemon
)
82 DESCRIPTION
:=Open source SNMP
(Simple Network Management Protocol
) implementation
(daemon
).
\\\
83 Simple Network Management Protocol
(SNMP
) is a widely used
\\\
84 protocol for monitoring the health and welfare of network
\\\
85 equipment
(eg. routers
), computer equipment and even devices
\\\
86 like UPSs. Net-SNMP is a suite of applications used to implement
\\\
87 SNMP v1
, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
\\\
89 This package contains the SNMP agent
, statically linked.
90 URL
:=http
://www.net-snmp.org
/
93 define Package
/snmpd-static
/conffiles
98 SNMP_MIB_MODULES_INCLUDED
= \
119 snmpv3
/snmpMPDStats \
126 ucd-snmp
/extensible \
135 SNMP_MIB_MODULES_EXCLUDED
= \
147 SNMP_TRANSPORTS_INCLUDED
= Callback UDP
149 SNMP_TRANSPORTS_EXCLUDED
= TCP TCPv6 UDPv6 Unix
151 PKG_CONFIGURE_OPTIONS
= \
154 --with-endianness
=little \
155 --with-logfile
=/var
/log
/snmpd.log \
156 --with-persistent-directory
=/usr
/lib
/snmp
/ \
157 --with-default-snmp-version
=1 \
158 --with-sys-contact
=root@localhost \
159 --with-sys-location
=Unknown \
160 --enable-applications \
161 --disable-debugging \
166 --with-out-mib-modules
="$(SNMP_MIB_MODULES_EXCLUDED)" \
167 --with-mib-modules
="$(SNMP_MIB_MODULES_INCLUDED)" \
168 --with-out-transports
="$(SNMP_TRANSPORTS_EXCLUDED)" \
169 --with-transports
="$(SNMP_TRANSPORTS_INCLUDED)" \
175 define Build
/Configure
176 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
177 $(TARGET_CONFIGURE_OPTS
) \
178 CFLAGS
="$(TARGET_CFLAGS)" \
179 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
180 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
181 ac_cv_header_pcap_h
=no \
183 --target
=$(GNU_TARGET_NAME
) \
184 --host
=$(GNU_TARGET_NAME
) \
185 --build
=$(GNU_HOST_NAME
) \
186 --program-prefix
="" \
187 --program-suffix
="" \
191 --datadir=/usr
/share \
192 --includedir=/usr
/include \
193 --infodir=/usr
/share
/info \
195 --libexecdir
=/usr
/lib \
196 --localstatedir
=/var \
197 --mandir=/usr
/share
/man \
198 --sbindir
=/usr
/sbin \
200 $(DISABLE_LARGEFILE
) \
202 $(PKG_CONFIGURE_OPTIONS
) \
207 rm -rf
$(PKG_INSTALL_DIR
)
208 mkdir
-p
$(PKG_INSTALL_DIR
)
209 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
210 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
212 ( cd
$(PKG_INSTALL_DIR
); mv .
/usr
/sbin
/snmpd .
/usr
/sbin
/snmpd-shared
; )
213 #ifneq ($(CONFIG_PACKAGE_snmpd-static),)
214 ( cd
$(PKG_BUILD_DIR
); rm -f agent
/snmpd
; )
215 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
216 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -static" \
217 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
219 ( cd
$(PKG_INSTALL_DIR
); mv .
/usr
/sbin
/snmpd .
/usr
/sbin
/snmpd-static
; )
223 define Package
/libnetsnmp
/install
224 $(INSTALL_DIR
) $(1)/usr
/lib
225 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.so.
* $(1)/usr
/lib
/
228 define Package
/snmpd
/install
229 $(INSTALL_DIR
) $(1)/etc
/snmp
230 $(INSTALL_DATA
) .
/files
/snmpd.conf
$(1)/etc
/snmp
/snmpd.conf
231 $(INSTALL_DIR
) $(1)/etc
/default
232 $(INSTALL_DATA
) .
/files
/snmpd.default
$(1)/etc
/default
/snmpd
233 $(INSTALL_DIR
) $(1)/etc
/init.d
234 $(INSTALL_BIN
) .
/files
/snmpd.init
$(1)/etc
/init.d
/snmpd
235 $(INSTALL_DIR
) $(1)/usr
/sbin
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd-shared
$(1)/usr
/sbin
/snmpd
239 define Package
/snmpd-static
/install
240 $(INSTALL_DIR
) $(1)/etc
/snmp
241 $(INSTALL_DATA
) .
/files
/snmpd.conf
$(1)/etc
/snmp
/snmpd.conf
242 $(INSTALL_DIR
) $(1)/etc
/default
243 $(INSTALL_DATA
) .
/files
/snmpd.default
$(1)/etc
/default
/snmpd
244 $(INSTALL_DIR
) $(1)/etc
/init.d
245 $(INSTALL_BIN
) .
/files
/snmpd.init
$(1)/etc
/init.d
/snmpd
246 $(INSTALL_DIR
) $(1)/usr
/sbin
247 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd-static
$(1)/usr
/sbin
/snmpd
250 define Package
/snmp-utils
/install
251 $(INSTALL_DIR
) $(1)/usr
/bin
252 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/snmp
{get,set
,status
,test,trap
,walk
} $(1)/usr
/bin
/
255 define Build
/InstallDev
256 mkdir
-p
$(STAGING_DIR
)/usr
/bin
257 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/net-snmp-config
$(STAGING_DIR
)/usr
/bin
/
258 mkdir
-p
$(STAGING_DIR
)/usr
/include
259 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/net-snmp
$(STAGING_DIR
)/usr
/include/
260 mkdir
-p
$(STAGING_DIR
)/usr
/lib
261 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
264 define Build
/UninstallDev
266 $(STAGING_DIR
)/usr
/bin
/net-snmp-config \
267 $(STAGING_DIR
)/usr
/include/net-snmp \
268 $(STAGING_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*}
271 $(eval
$(call BuildPackage
,libnetsnmp
))
272 $(eval
$(call BuildPackage
,snmp-utils
))
273 $(eval
$(call BuildPackage
,snmpd
))
274 $(eval
$(call BuildPackage
,snmpd-static
))