net-analyzer/net-snmp: Bump

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@574 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2008-11-22 21:48:54 +00:00
parent 116045aa21
commit 5bd7065cbe
4 changed files with 447 additions and 1 deletions

View File

@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
22 Nov 2008; Mario Fetka <mario.fetka@gmail.com>
+files/rpm514-netsnmp-5.4.1.1.patch, +net-snmp-5.4.2.1-r1.ebuild:
Bump
04 Nov 2008; Mario Fetka <mario.fetka@gmail.com> ChangeLog:
add rpm 5 patch

View File

@ -10,11 +10,14 @@ AUX net-snmp-5.4.1-process-count-race.patch 1489 RMD160 221f218270b83afec95d1efd
AUX net-snmp-5.4.1-suppresssuppress-annoying.patch 800 RMD160 aa23a30241ae64aeed6a08a630326fd7c2e0f9fe SHA1 2b99c56d1f659f324c5676d48ab257ea3b55467f SHA256 f5249b782079be96256ab6e7a0d398c04dfbcabffa7f4c716fe1abd39897aabe
AUX net-snmp-5.4.1.1-rpm5-1.patch 2258 RMD160 e29716d03c86874579c1fb2f3edafd5867991286 SHA1 3a403ef15bb2edf151531b5fd291df6937ef216e SHA256 ad958fcf18565930e428027e6ea60546865947b149255b2e166e9fe2a8726ee5
AUX net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 SHA1 3e795339fc93306a4d662feeaa16faca2509a058 SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86
AUX rpm514-netsnmp-5.4.1.1.patch 11813 RMD160 de2ed34c72280d2da308a0f1e0b293d51f2c391c SHA1 5856bc7531c40e7b9be267b5cd117d6ddf7dc043 SHA256 801039ba6a484fe83c7e1940e4227fccafe4c7cf1962f9fcda01e70869abaa28
AUX snmpd.conf 598 RMD160 c72a20fe6d4682ceea533587762782d62906b630 SHA1 51ebdca93c68ca04b7f402fad4f504422ec2c6cf SHA256 1f4f07b831c3227588fd546423137ed5c60a602fbee13b0d66edd801e4e7d598
AUX snmpd.rc7 706 RMD160 137d85e5f2b7cae62e214141aabcec495777007e SHA1 8d94d3bb2d3b43e20604030dc585c735685cf99b SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe
AUX snmptrapd.conf 635 RMD160 aba7b7196835bd359174156a527e13188f76e248 SHA1 0d296caa01c789455c3cd4c67cd81aca5547681d SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3
AUX snmptrapd.rc7 557 RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 SHA1 dcaac6c0f9e086e49f653f100e0c3f9a7f65db1d SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c
DIST net-snmp-5.4.1.1.tar.gz 5123861 RMD160 870b6a3e4eb28df3cbdf0df34d23f46bd7de8961 SHA1 cfeef748f242a7b25ad8eea95977ff277984e368 SHA256 b22ecb5e7f0907c20cc7fc9f1e1f31b1b4b2dd81abdc3e2e0bfddf8d060008a2
DIST net-snmp-5.4.2.1.tar.gz 5185390 RMD160 2148c42d486ed88f9cfc3ca1d50c68abcd7e3d63 SHA1 4f2df9ea62344fe840f493d0e08abe5de3697862 SHA256 11a8baf167f7bfff60d2590e050991400a3a082923dbcdbf85e0e0ce46eb247c
EBUILD net-snmp-5.4.1.1-r1.ebuild 6268 RMD160 25fec5abaf38e6e75d14e4f939f4357b0c69303f SHA1 37fdffe833d285f3ea7aaddecfe65b02df58c831 SHA256 90f3bbdfce52ded6cae0435f7b7a703765740110562838f5be94dfdf72be8f0b
MISC ChangeLog 203 RMD160 0321d5d9850e150ee9e1e46091b9a47eeaf3e638 SHA1 3f537cfca88274f75c5e0e0cab53572db675fb72 SHA256 89ce7a73f0354ddce6c709dab405f8073ee3f318b01e65c7957a4ffa8c013504
EBUILD net-snmp-5.4.2.1-r1.ebuild 5507 RMD160 cbd1e959c886c16b2f6b10b0630d9962d851feec SHA1 cc2e52453d6bef2348f4bc61389d1214a10cefe3 SHA256 458fd9137cb1f72e616e164aac6d36264c774edd845ffdf1e67f7a323253b3cd
MISC ChangeLog 330 RMD160 f08e45d855cbc97dc85d92d8b0b623d0af5fa7dc SHA1 3bcbbb0443295101f405c034bbe35981589743a0 SHA256 00f865659c797c793f6a316b93c821f819f5ff3c36c982d23280ade6d95a5e9c
MISC metadata.xml 674 RMD160 102cd7df943ef25f0f462f2520fa77ceac3b5680 SHA1 90b51daab27e161a48feed336a348a8ecf0865c2 SHA256 233feade72f1b013bb5b0739478ab7200727db25a1d06977d0d122862565de24

View File

@ -0,0 +1,246 @@
--- net-snmp-5.4.1.1/agent/mibgroup/host/hr_swinst.c.jbj 2008-09-06 09:11:42.000000000 -0400
+++ net-snmp-5.4.1.1/agent/mibgroup/host/hr_swinst.c 2008-09-06 09:12:11.000000000 -0400
@@ -41,8 +41,10 @@
#endif
#ifdef HAVE_LIBRPM
+#include <stdio.h>
+#include <stdint.h>
#include <rpm/rpmlib.h>
-#include <rpm/header.h>
+#include <rpm/rpm4compat.h>
#include <fcntl.h>
#ifdef HAVE_RPMGETPATH
@@ -465,6 +467,7 @@ var_hrswinst(struct variable * vp,
if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
time_t installTime = *rpm_data;
ret = date_n_time(&installTime, var_len);
+ free((void *)rpm_data);
} else {
ret = date_n_time(0, var_len);
}
@@ -661,6 +664,9 @@ Save_HR_SW_info(int ix)
NULL);
snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
+ free((void *)n);
+ free((void *)v);
+ free((void *)r);
}
#else
snprintf(swi->swi_name, sizeof(swi->swi_name), swi->swi_dep->d_name);
--- net-snmp-5.4.1.1/configure.jbj 2008-09-06 09:10:46.000000000 -0400
+++ net-snmp-5.4.1.1/configure 2008-09-06 09:14:56.000000000 -0400
@@ -25823,7 +25823,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include NETSNMP_SYSTEM_INCLUDE_FILE
#include "$srcdir/$mibdir/$i.h"
_ACEOF
- mv conftest.$ac_ext module_tmp_header.h
+ mv conftest.$ac_ext module_tmp_rpmtag.h
#---------------------
# macro: config_belongs_in(ARG)
@@ -25834,7 +25834,7 @@ _ACEOF
module_type=mib_module
if test -f $srcdir/$mibdir/$i.h; then
- module_type=`$MODULECPP module_tmp_header.h | grep config_belongs_in | sed 's@.*config_belongs_in(\([^)]*\)).*@\1@'`
+ module_type=`$MODULECPP module_tmp_rpmtag.h | grep config_belongs_in | sed 's@.*config_belongs_in(\([^)]*\)).*@\1@'`
fi
if test "x$module_type" = "x" ; then
@@ -25934,7 +25934,7 @@ _ACEOF
#
# check if $i has any conflicts
#
- new_list_excl=`$MODULECPP module_tmp_header.h | grep config_exclude | sed 's/.*config_exclude(\(.*\)).*/\1/'`
+ new_list_excl=`$MODULECPP module_tmp_rpmtag.h | grep config_exclude | sed 's/.*config_exclude(\(.*\)).*/\1/'`
if test "x$new_list_excl" != "x"; then
if test $module_debug = 1; then
@@ -25980,7 +25980,7 @@ EOF
# check if $i has any architecture specific requirements
#
- new_list_arch=`$MODULECPP module_tmp_header.h | grep config_arch_require | sed 's/.*config_arch_require( *\([^ ]*\) *, *\([^ ]*\) *).*/\1-xarchx-\2/'`
+ new_list_arch=`$MODULECPP module_tmp_rpmtag.h | grep config_arch_require | sed 's/.*config_arch_require( *\([^ ]*\) *, *\([^ ]*\) *).*/\1-xarchx-\2/'`
if test "x$new_list_arch" != "x"; then
for j in $new_list_arch
@@ -26011,7 +26011,7 @@ EOF
#
# check if $i has any other required modules
#
- new_list="$new_list `$MODULECPP module_tmp_header.h | grep config_require | sed 's/.*config_require(\(.*\)).*/\1/'`"
+ new_list="$new_list `$MODULECPP module_tmp_rpmtag.h | grep config_require | sed 's/.*config_require(\(.*\)).*/\1/'`"
if test $module_debug = 1; then
echo " $i will test: $new_list"
@@ -26072,7 +26072,7 @@ EOF
#
# check if $i has any mibs to add
#
- new_mibs=`$MODULECPP module_tmp_header.h | grep config_add_mib | sed 's/.*config_add_mib(\(.*\)).*/\1/'`
+ new_mibs=`$MODULECPP module_tmp_rpmtag.h | grep config_add_mib | sed 's/.*config_add_mib(\(.*\)).*/\1/'`
if test "x$new_mibs" != "x"; then
for j in $new_mibs
do
@@ -26113,7 +26113,7 @@ EOF
#-------------------
# check for unsupported config_load_mib
#
- if $MODULECPP module_tmp_header.h | grep config_load_mib > /dev/null 2>&1; then
+ if $MODULECPP module_tmp_rpmtag.h | grep config_load_mib > /dev/null 2>&1; then
{ echo "$as_me:$LINENO: WARNING: mib module error" >&5
echo "$as_me: WARNING: mib module error" >&2;}
{ echo "$as_me:$LINENO: WARNING: mib module \"$i\" uses the \"config_load_mib\" directive, which is no longer supported. It probably won't work." >&5
@@ -26125,7 +26125,7 @@ echo "$as_me: WARNING: mib module \"$i\"
# (generally not used any longer; old auto-load a .conf token)
#
- $MODULECPP module_tmp_header.h | grep config_parse_dot_conf | sed 's@.*config_parse_dot_conf(\([^)]*\), *\([^),]*\), *\([^),]*\), *\([^),]*\)).*@register_config_handler("snmpd",\1, \2, \3, \4);@' >> $mibdir/mib_module_dot_conf.h
+ $MODULECPP module_tmp_rpmtag.h | grep config_parse_dot_conf | sed 's@.*config_parse_dot_conf(\([^)]*\), *\([^),]*\), *\([^),]*\), *\([^),]*\)).*@register_config_handler("snmpd",\1, \2, \3, \4);@' >> $mibdir/mib_module_dot_conf.h
#---------------------
@@ -26134,7 +26134,7 @@ echo "$as_me: WARNING: mib module \"$i\"
#
# check if $i has any errors, or warnings
#
- error=`$MODULECPP module_tmp_header.h | grep config_error | sed 's/.*config_error(\(.*\)).*/\1/'`
+ error=`$MODULECPP module_tmp_rpmtag.h | grep config_error | sed 's/.*config_error(\(.*\)).*/\1/'`
if test "x$error" != "x"; then
echo
echo
@@ -26147,7 +26147,7 @@ echo "$as_me: error: $i: *** $error ***"
# macro: config_warning(warning text)
# - used to signal a configuration "warning" to be printed to the user
#
- warning=`$MODULECPP module_tmp_header.h | grep config_warning | sed 's/.*config_warning(\(.*\)).*/\1/'`
+ warning=`$MODULECPP module_tmp_rpmtag.h | grep config_warning | sed 's/.*config_warning(\(.*\)).*/\1/'`
if test "x$warning" != "x"; then
all_warnings="$all_warnings $warning
"
@@ -26384,7 +26384,7 @@ EOFOCFIN
done
# cleanup
-rm -f module_tmp_header.h
+rm -f module_tmp_rpmtag.h
#-------------------
# build module lists for Makefiles
@@ -28388,8 +28388,7 @@ rm -f conftest.err conftest.$ac_objext \
fi;
-
-for ac_header in rpm/rpmlib.h rpm/header.h
+for ac_header in rpm/rpmlib.h rpm/rpmtag.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -28684,8 +28683,8 @@ fi
if test "${ac_cv_header_rpm_header_h+set}" = set; then
- echo "$as_me:$LINENO: checking for rpm/header.h" >&5
-echo $ECHO_N "checking for rpm/header.h... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for rpm/rpmtag.h" >&5
+echo $ECHO_N "checking for rpm/rpmtag.h... $ECHO_C" >&6
if test "${ac_cv_header_rpm_header_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
@@ -28693,8 +28692,8 @@ echo "$as_me:$LINENO: result: $ac_cv_hea
echo "${ECHO_T}$ac_cv_header_rpm_header_h" >&6
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking rpm/header.h usability" >&5
-echo $ECHO_N "checking rpm/header.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking rpm/rpmtag.h usability" >&5
+echo $ECHO_N "checking rpm/rpmtag.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -28702,7 +28701,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <rpm/header.h>
+#include <rpm/rpmtag.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -28738,15 +28737,15 @@ echo "$as_me:$LINENO: result: $ac_header
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
-echo "$as_me:$LINENO: checking rpm/header.h presence" >&5
-echo $ECHO_N "checking rpm/header.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking rpm/rpmtag.h presence" >&5
+echo $ECHO_N "checking rpm/rpmtag.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <rpm/header.h>
+#include <rpm/rpmtag.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -28780,25 +28779,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: rpm/header.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: rpm/header.h: proceeding with the compiler's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: rpm/header.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: rpm/header.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: rpm/header.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: rpm/header.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: rpm/header.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: rpm/header.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: rpm/header.h: in the future, the compiler will take precedence" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rpm/rpmtag.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: rpm/rpmtag.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ---------------------------------------------------- ##
@@ -28809,8 +28808,8 @@ _ASBOX
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for rpm/header.h" >&5
-echo $ECHO_N "checking for rpm/header.h... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for rpm/rpmtag.h" >&5
+echo $ECHO_N "checking for rpm/rpmtag.h... $ECHO_C" >&6
if test "${ac_cv_header_rpm_header_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else

View File

@ -0,0 +1,193 @@
# Copyright 1999-2008 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.2.1.ebuild,v 1.7 2008/11/15 15:00:05 armin76 Exp $
inherit fixheadtails flag-o-matic perl-module python autotools
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 python rpm selinux smux ssl tcpd X sendmail extensible"
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-2* )
python? ( dev-python/setuptools )"
RDEPEND="${DEPEND}
perl? (
X? ( dev-perl/perl-tk )
!minimal? ( dev-perl/TermReadKey )
)
selinux? ( sec-policy/selinux-snmpd )"
# Dependency on autoconf due to bug #225893
DEPEND="${DEPEND}
>=sys-devel/autoconf-2.61-r2
>=sys-apps/sed-4
doc? ( app-doc/doxygen )"
src_unpack() {
unpack ${A}
cd "${S}"
# 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"
if use python ; then
python_version
PYTHON_MODNAME="netsnmp"
PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}/site-packages
sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || die "sed python failed"
fi
# snmpconf generates config files with proper selinux context
use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
use rpm && epatch "${FILESDIR}"/${PN}-5.4.1.1-rpm5-1.patch #202399
# Fix version number:
sed -i -e "s:NetSnmpVersionInfo = \".*\":NetSnmpVersionInfo = \"${PV}\":" snmplib/snmp_version.c
eautoreconf
ht_fix_all
}
src_compile() {
local mibs
strip-flags
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"
use extensible && mibs="${mibs} ucd-snmp/extensible"
use rpm && export CPPFLAGS="-I /usr/include/rpm ${CPPFLAGS}"
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="/var/log/net-snmpd.log" \
--with-persistent-directory="/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) \
$(use_with python python-modules) \
|| die "econf failed"
emake -j1 || die "emake failed"
if use perl ; then
emake perlmodules || die "compile perl modules problem"
fi
if use python ; then
emake pythonmodules || die "compile python 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
if use python ; then
mkdir -p "${D}/${PYTHON_DIR}" || die "Couldn't make $PYTHON_DIR"
make pythoninstall || die "make pythoninstall failed"
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
elog "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_postrm() {
if use python ; then
python_mod_cleanup
fi
}
pkg_postinst() {
elog "An example configuration file has been installed in"
elog "/etc/snmp/snmpd.conf.example."
}