1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-10 16:36:16 +02:00

add an snmpd-static package

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2192 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2005-10-20 09:05:51 +00:00
parent 2699c8d3af
commit 680ed499d4
5 changed files with 96 additions and 44 deletions

View File

@ -119,7 +119,7 @@ package-$(BR2_PACKAGE_MYSQL) += mysql
package-$(BR2_PACKAGE_NANO) += nano package-$(BR2_PACKAGE_NANO) += nano
package-$(BR2_PACKAGE_NCURSES) += ncurses package-$(BR2_PACKAGE_NCURSES) += ncurses
package-$(BR2_COMPILE_NDISC6) += ndisc package-$(BR2_COMPILE_NDISC6) += ndisc
package-$(BR2_PACKAGE_NET_SNMP) += net-snmp package-$(BR2_COMPILE_NET_SNMP) += net-snmp
package-$(BR2_PACKAGE_NETSTAT_NAT) += netstat-nat package-$(BR2_PACKAGE_NETSTAT_NAT) += netstat-nat
package-$(BR2_PACKAGE_NFS_SERVER) += nfs-server package-$(BR2_PACKAGE_NFS_SERVER) += nfs-server
package-$(BR2_PACKAGE_NMAP) += nmap package-$(BR2_PACKAGE_NMAP) += nmap

View File

@ -1,16 +1,16 @@
menu "net-snmp - Open source SNMP (Simple Network Management Protocol) implementation" menu "net-snmp - Open source SNMP (Simple Network Management Protocol) implementation"
config BR2_PACKAGE_NET_SNMP config BR2_COMPILE_NET_SNMP
bool bool
default n default n
depends BR2_PACKAGE_LIBNETSNMP depends BR2_PACKAGE_LIBNETSNMP || BR2_PACKAGE_SNMP_UTILS || BR2_PACKAGE_SNMPD || BR2_PACKAGE_SNMPD_STATIC
select BR2_PACKAGE_LIBELF
config BR2_PACKAGE_LIBNETSNMP config BR2_PACKAGE_LIBNETSNMP
prompt "libnetsnmp - SNMP shared libraries" prompt "libnetsnmp - SNMP shared libraries"
tristate tristate
default m if CONFIG_DEVEL default m if CONFIG_DEVEL
select BR2_PACKAGE_NET_SNMP select BR2_COMPILE_NET_SNMP
select BR2_PACKAGE_LIBELF
help help
Simple Network Management Protocol (SNMP) is a widely used Simple Network Management Protocol (SNMP) is a widely used
protocol for monitoring the health and welfare of network protocol for monitoring the health and welfare of network
@ -23,26 +23,10 @@ config BR2_PACKAGE_LIBNETSNMP
This package contains shared libraries, needed by other programs. This package contains shared libraries, needed by other programs.
config BR2_PACKAGE_SNMPD
prompt "snmpd - SNMP agent"
tristate
select BR2_PACKAGE_LIBNETSNMP
default m 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/
This package contains the SNMP agent.
config BR2_PACKAGE_SNMP_UTILS config BR2_PACKAGE_SNMP_UTILS
prompt "snmp-utils - SNMP client utilities" prompt "snmp-utils - SNMP client utilities"
tristate tristate
select BR2_COMPILE_NET_SNMP
select BR2_PACKAGE_LIBNETSNMP select BR2_PACKAGE_LIBNETSNMP
default m if CONFIG_DEVEL default m if CONFIG_DEVEL
help help
@ -57,4 +41,39 @@ config BR2_PACKAGE_SNMP_UTILS
This package contains the SNMP client utilities. This package contains the SNMP client utilities.
config BR2_PACKAGE_SNMPD
prompt "snmpd - SNMP agent"
tristate
select BR2_COMPILE_NET_SNMP
select BR2_PACKAGE_LIBNETSNMP
default m 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/
This package contains the SNMP agent, dynamically linked.
config BR2_PACKAGE_SNMPD_STATIC
prompt "snmpd-static - SNMP agent (static)"
tristate
select BR2_COMPILE_NET_SNMP
default m 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/
This package contains the SNMP agent, statically linked.
endmenu endmenu

View File

@ -96,36 +96,37 @@ include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(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,SNMPD,snmpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,SNMPD_STATIC,snmpd-static,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,SNMP_UTILS,snmp-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,SNMP_UTILS,snmp-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
ac_cv_header_pcap_h=no \ ac_cv_header_pcap_h=no \
./configure \ ./configure \
--target=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \ --build=$(GNU_HOST_NAME) \
--program-prefix="" \ --program-prefix="" \
--program-suffix="" \ --program-suffix="" \
--prefix=/usr \ --prefix=/usr \
--exec-prefix=/usr \ --exec-prefix=/usr \
--bindir=/usr/bin \ --bindir=/usr/bin \
--datadir=/usr/share \ --datadir=/usr/share \
--includedir=/usr/include \ --includedir=/usr/include \
--infodir=/usr/share/info \ --infodir=/usr/share/info \
--libdir=/usr/lib \ --libdir=/usr/lib \
--libexecdir=/usr/lib \ --libexecdir=/usr/lib \
--localstatedir=/var \ --localstatedir=/var \
--mandir=/usr/share/man \ --mandir=/usr/share/man \
--sbindir=/usr/sbin \ --sbindir=/usr/sbin \
--sysconfdir=/etc \ --sysconfdir=/etc \
$(DISABLE_LARGEFILE) \ $(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \ $(DISABLE_NLS) \
$(PKG_CONFIGURE_OPTIONS) \ $(PKG_CONFIGURE_OPTIONS) \
); );
touch $@ touch $@
@ -135,6 +136,15 @@ $(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
all install all install
( cd $(PKG_INSTALL_DIR); mv ./usr/sbin/snmpd ./usr/sbin/snmpd-shared; )
ifneq ($(BR2_PACKAGE_SNMPD_STATIC),)
( cd $(PKG_BUILD_DIR); rm -f agent/snmpd; )
$(MAKE) -C $(PKG_BUILD_DIR) \
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -static" \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
all install
( cd $(PKG_INSTALL_DIR); mv ./usr/sbin/snmpd ./usr/sbin/snmpd-static; )
endif
touch $@ touch $@
$(IPKG_LIBNETSNMP): $(IPKG_LIBNETSNMP):
@ -151,10 +161,22 @@ $(IPKG_SNMPD):
install -d -m0755 $(IDIR_SNMPD)/etc/init.d install -d -m0755 $(IDIR_SNMPD)/etc/init.d
install -m0755 ./files/snmpd.init $(IDIR_SNMPD)/etc/init.d/snmpd install -m0755 ./files/snmpd.init $(IDIR_SNMPD)/etc/init.d/snmpd
install -d -m0755 $(IDIR_SNMPD)/usr/sbin install -d -m0755 $(IDIR_SNMPD)/usr/sbin
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(IDIR_SNMPD)/usr/sbin/ install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/snmpd-shared $(IDIR_SNMPD)/usr/sbin/snmpd
$(RSTRIP) $(IDIR_SNMPD) $(RSTRIP) $(IDIR_SNMPD)
$(IPKG_BUILD) $(IDIR_SNMPD) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_SNMPD) $(PACKAGE_DIR)
$(IPKG_SNMPD_STATIC):
install -d -m0755 $(IDIR_SNMPD_STATIC)/etc/snmp
install -m0644 ./files/snmpd.conf $(IDIR_SNMPD_STATIC)/etc/snmp/snmpd.conf
install -d -m0755 $(IDIR_SNMPD_STATIC)/etc/default
install -m0644 ./files/snmpd.default $(IDIR_SNMPD_STATIC)/etc/default/snmpd
install -d -m0755 $(IDIR_SNMPD_STATIC)/etc/init.d
install -m0755 ./files/snmpd.init $(IDIR_SNMPD_STATIC)/etc/init.d/snmpd
install -d -m0755 $(IDIR_SNMPD_STATIC)/usr/sbin
install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/snmpd-static $(IDIR_SNMPD_STATIC)/usr/sbin/snmpd
$(RSTRIP) $(IDIR_SNMPD_STATIC)
$(IPKG_BUILD) $(IDIR_SNMPD_STATIC) $(PACKAGE_DIR)
$(IPKG_SNMP_UTILS): $(IPKG_SNMP_UTILS):
install -d -m0755 $(IDIR_SNMP_UTILS)/usr/bin install -d -m0755 $(IDIR_SNMP_UTILS)/usr/bin
cp -fpR $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(IDIR_SNMP_UTILS)/usr/bin/ cp -fpR $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(IDIR_SNMP_UTILS)/usr/bin/

View File

@ -0,0 +1,2 @@
/etc/default/snmpd
/etc/snmp/snmpd.conf

View File

@ -0,0 +1,9 @@
Package: snmpd-static
Priority: optional
Section: admin
Version: [TBDL]
Architecture: [TBDL]
Maintainer: Nico <nthill@free.fr>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/net-snmp/
Description: SNMP agent
Depends: libelf