mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 14:55:00 +02:00
Add net-snmp package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@991 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
c7b955b365
commit
3b5357f927
29
openwrt/package/net-snmp/Config.in
Normal file
29
openwrt/package/net-snmp/Config.in
Normal file
@ -0,0 +1,29 @@
|
||||
config BR2_PACKAGE_NET_SNMP
|
||||
prompt "net-snmp - Open source SNMP (Simple Network Management Protocol) implementation"
|
||||
bool
|
||||
default y if CONFIG_DEVEL
|
||||
help
|
||||
Simple Network Management Protocol (SNMP) is a widely used
|
||||
protocol for monitoring the health and welfare of network
|
||||
equipment (eg. routers), computer equipment and even devices
|
||||
like UPSs. Net-SNMP is a suite of applications used to implement
|
||||
SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
|
||||
|
||||
http://www.net-snmp.org/
|
||||
|
||||
|
||||
config BR2_PACKAGE_LIBNETSNMP
|
||||
tristate "libnet-snmp - SNMP libraries"
|
||||
default m if CONFIG_DEVEL
|
||||
depends BR2_PACKAGE_NET_SNMP
|
||||
|
||||
config BR2_PACKAGE_SNMPD
|
||||
tristate "snmdp - SNMP agent"
|
||||
default m if CONFIG_DEVEL
|
||||
depends BR2_PACKAGE_LIBNETSNMP
|
||||
|
||||
config BR2_PACKAGE_SNMP_UTILS
|
||||
tristate "snmp-utils - SNMP client utilities"
|
||||
default m if CONFIG_DEVEL
|
||||
depends BR2_PACKAGE_LIBNETSNMP
|
||||
|
159
openwrt/package/net-snmp/Makefile
Normal file
159
openwrt/package/net-snmp/Makefile
Normal file
@ -0,0 +1,159 @@
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=net-snmp
|
||||
PKG_VERSION:=5.1.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=8080555ab3f90011f25d5122042d9a8d
|
||||
|
||||
PKG_SOURCE_URL:=@SF/net-snmp
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
SNMP_MIB_MODULES_INCLUDED = \
|
||||
host/hr_device \
|
||||
host/hr_disk \
|
||||
host/hr_filesys \
|
||||
host/hr_network \
|
||||
host/hr_partition \
|
||||
host/hr_proc \
|
||||
host/hr_storage \
|
||||
host/hr_system \
|
||||
ieee802dot11 \
|
||||
mibII/at \
|
||||
mibII/icmp \
|
||||
mibII/interfaces \
|
||||
mibII/ip \
|
||||
mibII/snmp_mib \
|
||||
mibII/sysORTable \
|
||||
mibII/system_mib \
|
||||
mibII/tcp \
|
||||
mibII/udp \
|
||||
mibII/vacm_context \
|
||||
mibII/vacm_vars \
|
||||
snmpv3/snmpEngine \
|
||||
snmpv3/snmpMPDStats \
|
||||
snmpv3/usmStats \
|
||||
snmpv3/usmUser \
|
||||
snmpv3mibs \
|
||||
tunnel \
|
||||
ucd-snmp/loadave \
|
||||
ucd-snmp/memory \
|
||||
ucd-snmp/proc \
|
||||
ucd-snmp/vmstat \
|
||||
util_funcs \
|
||||
utilities/execute \
|
||||
|
||||
SNMP_MIB_MODULES_EXCLUDED = \
|
||||
agent_mibs \
|
||||
agentx \
|
||||
host \
|
||||
mibII \
|
||||
notification \
|
||||
snmpv3mibs \
|
||||
target \
|
||||
ucd_snmp \
|
||||
utilities \
|
||||
|
||||
SNMP_TRANSPORTS_INCLUDED = UDP
|
||||
|
||||
SNMP_TRANSPORTS_EXCLUDED = Callback TCP TCPv6 UDPv6 Unix
|
||||
|
||||
PKG_CONFIGURE_OPTIONS = \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--with-endianness=little \
|
||||
--with-logfile=/var/log/snmpd.log \
|
||||
--with-persistent-directory=/usr/lib/snmp/ \
|
||||
--with-default-snmp-version=1 \
|
||||
--with-sys-contact=root@localhost \
|
||||
--with-sys-location=Unknown \
|
||||
--enable-applications \
|
||||
--disable-debugging \
|
||||
--disable-ipv6 \
|
||||
--disable-manuals \
|
||||
--disable-mib-loading \
|
||||
--disable-mibs \
|
||||
--disable-scripts \
|
||||
--with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \
|
||||
--with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \
|
||||
--with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \
|
||||
--with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \
|
||||
--without-opaque-special-types \
|
||||
--without-openssl \
|
||||
--without-libwrap \
|
||||
--without-rpm \
|
||||
--without-zlib \
|
||||
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,SNMPD,snmpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,SNMP_UTILS,snmp-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
$(PKG_BUILD_DIR)/.configured:
|
||||
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
||||
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
||||
ac_cv_header_pcap_h=no \
|
||||
./configure \
|
||||
--target=$(GNU_TARGET_NAME) \
|
||||
--host=$(GNU_TARGET_NAME) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--program-prefix="" \
|
||||
--program-suffix="" \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--datadir=/usr/share \
|
||||
--includedir=/usr/include \
|
||||
--infodir=/usr/share/info \
|
||||
--libdir=/usr/lib \
|
||||
--libexecdir=/usr/lib \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/share/man \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
$(DISABLE_LARGEFILE) \
|
||||
$(DISABLE_NLS) \
|
||||
$(PKG_CONFIGURE_OPTIONS) \
|
||||
);
|
||||
touch $@
|
||||
|
||||
$(PKG_BUILD_DIR)/.built:
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
mkdir -p $(PKG_INSTALL_DIR)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
touch $@
|
||||
|
||||
$(IPKG_LIBNETSNMP):
|
||||
install -d -m0755 $(IDIR_LIBNETSNMP)/usr/lib
|
||||
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(IDIR_LIBNETSNMP)/usr/lib/
|
||||
$(RSTRIP) $(IDIR_LIBNETSNMP)
|
||||
$(IPKG_BUILD) $(IDIR_LIBNETSNMP) $(PACKAGE_DIR)
|
||||
|
||||
$(IPKG_SNMPD):
|
||||
install -d -m0755 $(IDIR_SNMPD)/etc/snmp
|
||||
install -m0644 ./files/snmpd.conf $(IDIR_SNMPD)/etc/snmp/snmpd.conf
|
||||
install -d -m0755 $(IDIR_SNMPD)/etc/default
|
||||
install -m0644 ./files/snmpd.default $(IDIR_SNMPD)/etc/default/snmpd
|
||||
install -d -m0755 $(IDIR_SNMPD)/etc/init.d
|
||||
install -m0755 ./files/snmpd.init $(IDIR_SNMPD)/etc/init.d/snmpd
|
||||
install -d -m0755 $(IDIR_SNMPD)/usr/sbin
|
||||
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(IDIR_SNMPD)/usr/sbin/
|
||||
$(RSTRIP) $(IDIR_SNMPD)
|
||||
$(IPKG_BUILD) $(IDIR_SNMPD) $(PACKAGE_DIR)
|
||||
|
||||
$(IPKG_SNMP_UTILS):
|
||||
install -d -m0755 $(IDIR_SNMP_UTILS)/usr/bin
|
||||
cp -fpR $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,walk} $(IDIR_SNMP_UTILS)/usr/bin/
|
||||
$(RSTRIP) $(IDIR_SNMP_UTILS)
|
||||
$(IPKG_BUILD) $(IDIR_SNMP_UTILS) $(PACKAGE_DIR)
|
14
openwrt/package/net-snmp/files/snmpd.conf
Normal file
14
openwrt/package/net-snmp/files/snmpd.conf
Normal file
@ -0,0 +1,14 @@
|
||||
com2sec ro default public
|
||||
com2sec rw localhost private
|
||||
|
||||
group public v1 ro
|
||||
group public v2c ro
|
||||
group public usm ro
|
||||
group private v1 rw
|
||||
group private v2c rw
|
||||
group private usm rw
|
||||
|
||||
view all included .1
|
||||
|
||||
access public "" any noauth exact all none none
|
||||
access private "" any noauth exact all all all
|
1
openwrt/package/net-snmp/files/snmpd.default
Normal file
1
openwrt/package/net-snmp/files/snmpd.default
Normal file
@ -0,0 +1 @@
|
||||
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid"
|
25
openwrt/package/net-snmp/files/snmpd.init
Normal file
25
openwrt/package/net-snmp/files/snmpd.init
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
DEFAULT=/etc/default/snmpd
|
||||
LIB_D=/var/lib/snmp
|
||||
LOG_D=/var/log
|
||||
RUN_D=/var/run
|
||||
PID_F=$RUN_D/snmpd.pid
|
||||
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
[ -d $LIB_D ] || mkdir -p $LIB_D
|
||||
[ -d $LOG_D ] || mkdir -p $LOG_D
|
||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||
snmpd $OPTIONS
|
||||
;;
|
||||
stop)
|
||||
[ -f $PID_F ] && kill $(cat $PID_F)
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 (start|stop)"
|
||||
exit 1
|
||||
esac
|
||||
exit $?
|
8
openwrt/package/net-snmp/ipkg/libnetsnmp.control
Normal file
8
openwrt/package/net-snmp/ipkg/libnetsnmp.control
Normal file
@ -0,0 +1,8 @@
|
||||
Package: libnetsnmp
|
||||
Priority: optional
|
||||
Section: libs
|
||||
Version: [TBDL]
|
||||
Architecture: [TBDL]
|
||||
Maintainer: Nico <nthill@free.fr>
|
||||
Source: http://nthill.free.fr/openwrt/sources/net-snmp/
|
||||
Description: an SNMP library
|
9
openwrt/package/net-snmp/ipkg/snmp-utils.control
Normal file
9
openwrt/package/net-snmp/ipkg/snmp-utils.control
Normal file
@ -0,0 +1,9 @@
|
||||
Package: snmp-utils
|
||||
Priority: optional
|
||||
Section: admin
|
||||
Version: [TBDL]
|
||||
Architecture: [TBDL]
|
||||
Maintainer: Nico <nthill@free.fr>
|
||||
Source: http://nthill.free.fr/openwrt/sources/net-snmp/
|
||||
Description: a collection of SNMP utilities
|
||||
Depends: libsnmp
|
2
openwrt/package/net-snmp/ipkg/snmpd.conffiles
Normal file
2
openwrt/package/net-snmp/ipkg/snmpd.conffiles
Normal file
@ -0,0 +1,2 @@
|
||||
/etc/default/snmpd
|
||||
/etc/snmp/snmpd.conf
|
9
openwrt/package/net-snmp/ipkg/snmpd.control
Normal file
9
openwrt/package/net-snmp/ipkg/snmpd.control
Normal file
@ -0,0 +1,9 @@
|
||||
Package: snmpd
|
||||
Priority: optional
|
||||
Section: admin
|
||||
Version: [TBDL]
|
||||
Architecture: [TBDL]
|
||||
Maintainer: Nico <nthill@free.fr>
|
||||
Source: http://nthill.free.fr/openwrt/sources/net-snmp/
|
||||
Description: an SNMP agent
|
||||
Depends: libsnmp
|
7282
openwrt/package/net-snmp/patches/500-debian-subset-5.1.2-6.1.patch
Normal file
7282
openwrt/package/net-snmp/patches/500-debian-subset-5.1.2-6.1.patch
Normal file
File diff suppressed because it is too large
Load Diff
6156
openwrt/package/net-snmp/patches/750-ieee802dot11.patch
Normal file
6156
openwrt/package/net-snmp/patches/750-ieee802dot11.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user