diff options
author | Cédric Krier <cedk@gentoo.org> | 2006-11-26 21:37:22 +0000 |
---|---|---|
committer | Cédric Krier <cedk@gentoo.org> | 2006-11-26 21:37:22 +0000 |
commit | eed1bc0a8bf3ce1209368796c70b1605044850c4 (patch) | |
tree | d58c581dbf5f767489a2c068e0c9cb1e3eddf56e /net-analyzer/net-snmp | |
parent | Revision bump with identical ebuild to get rid of quotes inside the CLASSPATH... (diff) | |
download | historical-eed1bc0a8bf3ce1209368796c70b1605044850c4.tar.gz historical-eed1bc0a8bf3ce1209368796c70b1605044850c4.tar.bz2 historical-eed1bc0a8bf3ce1209368796c70b1605044850c4.zip |
Version bump
Package-Manager: portage-2.1.1-r1
Diffstat (limited to 'net-analyzer/net-snmp')
-rw-r--r-- | net-analyzer/net-snmp/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/net-snmp/Manifest | 32 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/digest-net-snmp-5.4 | 3 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch | 20 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/snmpd.conf | 17 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/snmpd.rc7 | 30 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/snmptrapd.rc7 | 22 | ||||
-rw-r--r-- | net-analyzer/net-snmp/net-snmp-5.4.ebuild | 175 |
8 files changed, 303 insertions, 5 deletions
diff --git a/net-analyzer/net-snmp/ChangeLog b/net-analyzer/net-snmp/ChangeLog index 9a6bc65464d6..6eb5d2200d33 100644 --- a/net-analyzer/net-snmp/ChangeLog +++ b/net-analyzer/net-snmp/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/net-snmp # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.139 2006/10/23 13:04:29 mattm Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.140 2006/11/26 21:37:22 cedk Exp $ + +*net-snmp-5.4 (26 Nov 2006) + + 26 Nov 2006; Cedric Krier <cedk@gentoo.org> + +files/net-snmp-5.4-makefile.patch, +files/snmpd.conf, +files/snmpd.rc7, + +files/snmptrapd.rc7, +net-snmp-5.4.ebuild: + Version bump *net-snmp-5.3.1-r1 (23 Oct 2006) diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest index b5e507634d66..ea718e418e87 100644 --- a/net-analyzer/net-snmp/Manifest +++ b/net-analyzer/net-snmp/Manifest @@ -26,6 +26,10 @@ AUX net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037 RMD160 4c2d25a50375f950642a4 MD5 3f888bb1a96a76d1a54af4f0a50fceff files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037 RMD160 4c2d25a50375f950642a49d79678532f89b36ede files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037 SHA256 a806f3208729c5b3f8946d4bdf3e97c3540e99adf91b363b308adcc96b6c051b files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037 +AUX net-snmp-5.4-makefile.patch 597 RMD160 90f8e6db0a05fd21c06e98b65b4bbd377f931fe9 SHA1 2ff51b2ab2df2224dd34ca1af16430fbf0b97927 SHA256 fd8c6ceda9c5d99cd92f81a7977d2134960ee14fac3ab9f1f8c6d03c6a69edb1 +MD5 d61d49e044489f4b4549cda0b7cbc336 files/net-snmp-5.4-makefile.patch 597 +RMD160 90f8e6db0a05fd21c06e98b65b4bbd377f931fe9 files/net-snmp-5.4-makefile.patch 597 +SHA256 fd8c6ceda9c5d99cd92f81a7977d2134960ee14fac3ab9f1f8c6d03c6a69edb1 files/net-snmp-5.4-makefile.patch 597 AUX net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 SHA1 3e795339fc93306a4d662feeaa16faca2509a058 SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86 MD5 25d92c9a7adcbb80240a914a8f6bbfe5 files/net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 files/net-snmp-lm_sensors.patch 13686 @@ -38,14 +42,27 @@ AUX snmpd-5.1.rc6 714 RMD160 1f7cef43888500044be0b0d4938574922b48bcfd SHA1 74680 MD5 0dbde7b1bdd9c9dc988039e676800337 files/snmpd-5.1.rc6 714 RMD160 1f7cef43888500044be0b0d4938574922b48bcfd files/snmpd-5.1.rc6 714 SHA256 8f02a26a794a5c37e4cb4092ab61f82a6d7ec5876146738d4630ed147cc9ccf6 files/snmpd-5.1.rc6 714 +AUX snmpd.conf 604 RMD160 082bfd6b9a2bbd18009518629fceacd97cc48909 SHA1 57f781406a4f6a84bda67cdbb9bb9b485a6143c3 SHA256 106ed0517ee19f66bfa6bc4597bb70d99c473670db958375d9441ebed5de2ad9 +MD5 9ec926a37edf7bbe861defcd4161cd5a files/snmpd.conf 604 +RMD160 082bfd6b9a2bbd18009518629fceacd97cc48909 files/snmpd.conf 604 +SHA256 106ed0517ee19f66bfa6bc4597bb70d99c473670db958375d9441ebed5de2ad9 files/snmpd.conf 604 +AUX snmpd.rc7 706 RMD160 137d85e5f2b7cae62e214141aabcec495777007e SHA1 8d94d3bb2d3b43e20604030dc585c735685cf99b SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe +MD5 7f66808dbbe407d788d9bd9676f5d07a files/snmpd.rc7 706 +RMD160 137d85e5f2b7cae62e214141aabcec495777007e files/snmpd.rc7 706 +SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe files/snmpd.rc7 706 AUX snmptrapd.conf 635 RMD160 aba7b7196835bd359174156a527e13188f76e248 SHA1 0d296caa01c789455c3cd4c67cd81aca5547681d SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3 MD5 791cd8d81154f2c1d01e3f87b86faa44 files/snmptrapd.conf 635 RMD160 aba7b7196835bd359174156a527e13188f76e248 files/snmptrapd.conf 635 SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3 files/snmptrapd.conf 635 +AUX snmptrapd.rc7 557 RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 SHA1 dcaac6c0f9e086e49f653f100e0c3f9a7f65db1d SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c +MD5 f12dedff94a6a3359f76a012fad7ec79 files/snmptrapd.rc7 557 +RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 files/snmptrapd.rc7 557 +SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c files/snmptrapd.rc7 557 DIST net-snmp-5.2.1.2.tar.gz 3869893 RMD160 30abfbde24caa7d04990bd111822b98b012f4a0c SHA1 e93a76e081df0bfb5aa126dbad5f182176f9579e SHA256 770c56d059e52ee164cfa0d914618a982e40674a269ce28daddc580c4b67fe60 DIST net-snmp-5.2.2.tar.gz 3919826 RMD160 54c0bcc34ca6462aaab9ba69b06955dd7c11670f SHA1 2c45d24c5784b8b469e9ba3fde9eeeeabbcb7ab0 SHA256 ed5cc617e4cfe38af64a3ded8542c4e61d045dbeec00d5b93a31afc3337135fd DIST net-snmp-5.3.0.1.tar.gz 4183370 RMD160 86b7e56b512faf73d2a08ac3df2def4560b62945 SHA1 c58ddabe4281c3681a268bd48de6865e812f2ec5 SHA256 dc7786ad2b1464edb5d8331a2687fa72f979ce3984df4e94334e8eec0676e69d DIST net-snmp-5.3.1.tar.gz 4210843 RMD160 7bcdd213fb2517d0927b030deab5146522b58b3d SHA1 8ddb5122769814f04a7d3d352dcc640df7c89d41 SHA256 fb6d5113ccdd8c4661fe5d825160e45a7c5035b145e24ec18f71a509ecb0fe43 +DIST net-snmp-5.4.tar.gz 5031685 RMD160 8ad1f9a3def8022eea48d9b74ae71d8efb59ca61 SHA1 8edb17509eba9f8c9cfb015fe35a1024048129eb SHA256 2f43cd6f3c4066f8c17fdc47931a96c1fce808c9d1dd74bcb5a79d9d29d5f947 EBUILD net-snmp-5.2.1.2-r1.ebuild 5234 RMD160 5c43b15e234cd469a792ec3eeb445635931b038e SHA1 02dc4b293b9192e5a23e5c68030656d466d42a51 SHA256 1dbc840be6083391f8ba6b106ee826b5e99c4e76ed3747b21ce1a55bd41a2391 MD5 5f6da3f097d0faaad9e0e7d41c1447bd net-snmp-5.2.1.2-r1.ebuild 5234 RMD160 5c43b15e234cd469a792ec3eeb445635931b038e net-snmp-5.2.1.2-r1.ebuild 5234 @@ -66,10 +83,14 @@ EBUILD net-snmp-5.3.1.ebuild 5479 RMD160 48669a4b26843761b48b0d7598b87b5d6e200ae MD5 0a6cc3906711c8ace3d5b32dddb479bd net-snmp-5.3.1.ebuild 5479 RMD160 48669a4b26843761b48b0d7598b87b5d6e200ae1 net-snmp-5.3.1.ebuild 5479 SHA256 c53816faeaf5f3ce2499e2fcfa5bb6a1de16cff45d444f94bb462a3888d1b3c3 net-snmp-5.3.1.ebuild 5479 -MISC ChangeLog 22991 RMD160 923e1038c49d6f17450717f55beedcf14bb11483 SHA1 6234a6e16d8a1e094abd74450ff4b4637378988e SHA256 5a935d0399722aac6333b917e17021176be0ce167be94048fb35f3a3fa44d120 -MD5 f137226c58a5061950b49f92af20aaa0 ChangeLog 22991 -RMD160 923e1038c49d6f17450717f55beedcf14bb11483 ChangeLog 22991 -SHA256 5a935d0399722aac6333b917e17021176be0ce167be94048fb35f3a3fa44d120 ChangeLog 22991 +EBUILD net-snmp-5.4.ebuild 5004 RMD160 1732be4cdbd9f2398db33556df6c340ba664e2d3 SHA1 59ac998e19e61d6bc80b8d8084b034936bd9e83e SHA256 557de87800ab6f82a46581f39f8246158e5c6e0176cd0e6686db3b4963f9eb06 +MD5 c32237815f529d13c9a778bacf6059af net-snmp-5.4.ebuild 5004 +RMD160 1732be4cdbd9f2398db33556df6c340ba664e2d3 net-snmp-5.4.ebuild 5004 +SHA256 557de87800ab6f82a46581f39f8246158e5c6e0176cd0e6686db3b4963f9eb06 net-snmp-5.4.ebuild 5004 +MISC ChangeLog 23202 RMD160 f6b926e119d1edab8f65a9a9907a56bc078048ef SHA1 1142cc83698cfb333fdf183775c768e7e4386c66 SHA256 a0d0ecc6bf814bee3101479cf856fed13ced80a09b153b7637d65f06632a334a +MD5 3a6d5050e3edb21e5c85e003abc3e2ff ChangeLog 23202 +RMD160 f6b926e119d1edab8f65a9a9907a56bc078048ef ChangeLog 23202 +SHA256 a0d0ecc6bf814bee3101479cf856fed13ced80a09b153b7637d65f06632a334a ChangeLog 23202 MISC metadata.xml 160 RMD160 2738573ec519cbef4b293bc132f7dd9d02291137 SHA1 29b8b234e0f3a475b50bd4df1ef8b4e5749823ce SHA256 39e232fc7ec88ca0b077cb3950cb39d15cd990842b88d5bfe14f02f34d72f37b MD5 637389da071d8ee0c0292695525bc29f metadata.xml 160 RMD160 2738573ec519cbef4b293bc132f7dd9d02291137 metadata.xml 160 @@ -89,3 +110,6 @@ SHA256 57af851df7613f792fa9dac8cec68746943eb997c4b19589733df8a6a8176709 files/di MD5 d8afb2f50cb9a9cfeaea5135b41541b0 files/digest-net-snmp-5.3.1-r1 247 RMD160 524e66315ff4fab8e6760066d1d88a4aaafe8ba5 files/digest-net-snmp-5.3.1-r1 247 SHA256 57af851df7613f792fa9dac8cec68746943eb997c4b19589733df8a6a8176709 files/digest-net-snmp-5.3.1-r1 247 +MD5 0340885b6d1fa55330e5b6cbce6694d5 files/digest-net-snmp-5.4 241 +RMD160 7a8010ebb09ad5848ffdf5714a0f0ac7e3feaaff files/digest-net-snmp-5.4 241 +SHA256 ab88014a897e9738bad61e22a24d7689c091e04d4510d283fa2163920ef2f1a0 files/digest-net-snmp-5.4 241 diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.4 b/net-analyzer/net-snmp/files/digest-net-snmp-5.4 new file mode 100644 index 000000000000..2141580dd27e --- /dev/null +++ b/net-analyzer/net-snmp/files/digest-net-snmp-5.4 @@ -0,0 +1,3 @@ +MD5 46d893281056ff476e597659cb91574d net-snmp-5.4.tar.gz 5031685 +RMD160 8ad1f9a3def8022eea48d9b74ae71d8efb59ca61 net-snmp-5.4.tar.gz 5031685 +SHA256 2f43cd6f3c4066f8c17fdc47931a96c1fce808c9d1dd74bcb5a79d9d29d5f947 net-snmp-5.4.tar.gz 5031685 diff --git a/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch b/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch new file mode 100644 index 000000000000..7b7ba127c110 --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch @@ -0,0 +1,20 @@ +diff -ru net-snmp-5.4~/agent/mibgroup/Makefile.in net-snmp-5.4/agent/mibgroup/Makefile.in +--- net-snmp-5.4~/agent/mibgroup/Makefile.in 2006-11-26 16:43:18.000000000 +0100 ++++ net-snmp-5.4/agent/mibgroup/Makefile.in 2006-11-26 16:44:49.000000000 +0100 +@@ -22,9 +22,13 @@ + .c.o: + $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< + +-OBJS = @mib_module_list_o@ +-LOBJS = @mib_module_list_lo@ +-SRCS = @mib_module_list_c@ ++@mib_module_list_o@ ++@mib_module_list_lo@ ++@mib_module_list_c@ ++ ++OBJS = $(mib_module_list_o) ++LOBJS = $(mib_module_list_lo) ++SRCS = $(mib_module_list_c) + + all: standardall $(LOBJS) + diff --git a/net-analyzer/net-snmp/files/snmpd.conf b/net-analyzer/net-snmp/files/snmpd.conf new file mode 100644 index 000000000000..97a1d7052661 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmpd.conf @@ -0,0 +1,17 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.conf,v 1.8 2006/11/26 21:37:22 cedk Exp $ + +# Initial (empty) options. +SNMPD_FLAGS="" + +# Enable connection logging. +#SNMPD_FLAGS="${SNMPD_FLAGS} -a" + +# Enable syslog and disable file log. +#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null" + +# Enable agentx socket as /var/agentx/master +# *NOTE* Before uncommenting this, make sure +# the /var/agentx directory exists. +#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master" diff --git a/net-analyzer/net-snmp/files/snmpd.rc7 b/net-analyzer/net-snmp/files/snmpd.rc7 new file mode 100644 index 000000000000..11329bd75185 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmpd.rc7 @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $ + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -e /etc/snmp/snmpd.conf ] ; then + eerror "You need an /etc/snmp/snmpd.conf config file to run snmpd" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting net-snmpd" + start-stop-daemon --start --quiet --exec /usr/sbin/snmpd \ + -- -p /var/run/snmpd.pid ${SNMPD_FLAGS} + eend $? +} + +stop() { + ebegin "Stopping net-snmpd" + start-stop-daemon --stop --quiet --pidfile /var/run/snmpd.pid + eend $? +} diff --git a/net-analyzer/net-snmp/files/snmptrapd.rc7 b/net-analyzer/net-snmp/files/snmptrapd.rc7 new file mode 100644 index 000000000000..585675b4309e --- /dev/null +++ b/net-analyzer/net-snmp/files/snmptrapd.rc7 @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $ + +depend() { + use logger + need net +} + +start() { + ebegin "Starting snmptrapd" + start-stop-daemon --start --quiet --exec /usr/sbin/snmptrapd \ + -- -p /var/run/snmptrapd.pid ${SNMPTRAPD_FLAGS} + eend $? +} + +stop() { + ebegin "Stopping snmptrapd" + start-stop-daemon --stop --quiet --pidfile /var/run/snmptrapd.pid + eend $? +} diff --git a/net-analyzer/net-snmp/net-snmp-5.4.ebuild b/net-analyzer/net-snmp/net-snmp-5.4.ebuild new file mode 100644 index 000000000000..37c4e27f7e8b --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.4.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.ebuild,v 1.1 2006/11/26 21:37:22 cedk Exp $ + +inherit fixheadtails flag-o-matic perl-module + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://net-snmp.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="as-is BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="diskio doc elf ipv6 lm_sensors mfd-rewrites minimal perl rpm selinux smux +ssl tcpd X sendmail" + +DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + rpm? ( app-arch/rpm + dev-libs/popt + app-arch/bzip2 + >=sys-libs/zlib-1.1.4 + ) + elf? ( dev-libs/elfutils ) + lm_sensors? ( sys-apps/lm_sensors )" + +RDEPEND="${DEPEND} + perl? ( + X? ( dev-perl/perl-tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmpd )" + +DEPEND="${DEPEND} + >=sys-apps/sed-4 + doc? ( app-doc/doxygen )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-makefile.patch + +# The lm_sensors patch has a memory leak +# If you can help, please attach a patch to bug 109785 + +# if use lm_sensors; then +# if use x86 || use amd64; then +# epatch "${FILESDIR}"/${PN}-lm_sensors.patch +# else +# eerror "Unfortunatly you are trying to enable lm_sensors support for an unsupported arch." +# eerror "please check the availability of sys-apps/lm_sensors - if it is available on" +# eerror "your arch, please file a bug about this." +# die "lm_sensors patch error: unsupported arch." +# fi +# fi + + # fix access violation in make check + sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \ + die "sed eval_tools.sh failed" + # fix path in fixproc + sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \ + die "sed fixproc failed" + + ht_fix_all +} + +src_compile() { + local mibs + + strip-flags + + # filter for bug #145960 + # as it seems that the option is not enough + filter-ldflags -Wl,--as-needed + + mibs="host ucd-snmp/dlmod" + use smux && mibs="${mibs} smux" + use sendmail && mibs="${mibs} mibII/mta_sendmail" + use lm_sensors && mibs="${mibs} ucd-snmp/lmSensors" + use diskio && mibs="${mibs} ucd-snmp/diskio" + + econf \ + --with-install-prefix="${D}" \ + --with-sys-location="Unknown" \ + --with-sys-contact="root@Unknown" \ + --with-default-snmp-version="3" \ + --with-mib-modules="${mibs}" \ + --with-logfile="${ROOT}/var/log/net-snmpd.log" \ + --with-persistent-directory="${ROOT}/var/lib/net-snmp" \ + --enable-ucd-snmp-compatibility \ + --enable-shared \ + --enable-as-needed \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ipv6) \ + $(use_enable !ssl internal-md5) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with rpm) \ + $(use_with rpm bzip2) \ + $(use_with rpm zlib) \ + $(use_with elf) \ + || die "econf failed" + + emake -j1 || die "emake failed" + + if use perl ; then + emake perlmodules || die "compile perl modules problem" + fi + + if use doc ; then + einfo "Building HTML Documentation" + make docsdox || die "failed to build docs" + fi +} + +src_test() { + cd testing + if ! make test ; then + echo + einfo "Don't be alarmed if a few tests FAIL." + einfo "This could happen for several reasons:" + einfo " - You don't already have a working configuration." + einfo " - Your ethernet interface isn't properly configured." + echo + fi +} + +src_install () { + make DESTDIR="${D}" install || die "make install failed" + + if use perl ; then + make DESTDIR="${D}" perlinstall || die "make perlinstall failed" + fixlocalpod + + use X || rm -f "${D}/usr/bin/tkmib" + else + rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" "${D}/usr/bin/snmpcheck" + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + use doc && dohtml docs/html/* + + keepdir /etc/snmp /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.rc7 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.rc7 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + # Remove everything, keeping only the snmpd, snmptrapd, MIBs, libs, and includes. + if use minimal; then + einfo "USE=minimal is set. Cleaning up excess cruft for a embedded/minimal/server only install." + rm -rf + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}} + rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf + rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf} + find "${D}" -name '*.pl' -exec rm -f '{}' \; + use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6* + fi + + # bug 113788, install example config + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example +} + +pkg_postinst() { + einfo "An example configuration file has been installed in" + einfo "/etc/snmp/snmpd.conf.example." +} + |