From c5f91d0e65e36eea99158cb4c6bd527b46d5f460 Mon Sep 17 00:00:00 2001 From: Aaron Walker Date: Fri, 28 Jan 2005 11:19:25 +0000 Subject: Revision bump; added conf script (w/ a few sed's we can reuse snmpd's init) for snmptrapd (bug 61705). Also added selinux support (via sec-policy/selinux-snmpd) for bug 79749. Marked 5.2 stable on x86 and tidy'd old ebuilds. Package-Manager: portage-2.0.51-r15 --- net-analyzer/net-snmp/ChangeLog | 12 +- net-analyzer/net-snmp/Manifest | 21 ++-- net-analyzer/net-snmp/files/digest-net-snmp-5.1.2 | 1 - net-analyzer/net-snmp/files/digest-net-snmp-5.2-r1 | 1 - net-analyzer/net-snmp/files/digest-net-snmp-5.2-r2 | 1 + net-analyzer/net-snmp/files/snmptrapd.conf | 16 +++ net-analyzer/net-snmp/net-snmp-5.1.1-r1.ebuild | 5 +- net-analyzer/net-snmp/net-snmp-5.1.1.ebuild | 5 +- net-analyzer/net-snmp/net-snmp-5.1.2.ebuild | 116 ------------------ net-analyzer/net-snmp/net-snmp-5.2-r1.ebuild | 123 ------------------- net-analyzer/net-snmp/net-snmp-5.2-r2.ebuild | 131 +++++++++++++++++++++ net-analyzer/net-snmp/net-snmp-5.2.ebuild | 7 +- 12 files changed, 179 insertions(+), 260 deletions(-) delete mode 100644 net-analyzer/net-snmp/files/digest-net-snmp-5.1.2 delete mode 100644 net-analyzer/net-snmp/files/digest-net-snmp-5.2-r1 create mode 100644 net-analyzer/net-snmp/files/digest-net-snmp-5.2-r2 create mode 100644 net-analyzer/net-snmp/files/snmptrapd.conf delete mode 100644 net-analyzer/net-snmp/net-snmp-5.1.2.ebuild delete mode 100644 net-analyzer/net-snmp/net-snmp-5.2-r1.ebuild create mode 100644 net-analyzer/net-snmp/net-snmp-5.2-r2.ebuild (limited to 'net-analyzer/net-snmp') diff --git a/net-analyzer/net-snmp/ChangeLog b/net-analyzer/net-snmp/ChangeLog index c049d02e1892..962cc4817bf8 100644 --- a/net-analyzer/net-snmp/ChangeLog +++ b/net-analyzer/net-snmp/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-analyzer/net-snmp # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.75 2005/01/26 10:44:04 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.76 2005/01/28 11:19:25 ka0ttic Exp $ + +*net-snmp-5.2-r2 (28 Jan 2005) + + 28 Jan 2005; Aaron Walker +files/snmptrapd.conf, + net-snmp-5.1.1-r1.ebuild, net-snmp-5.1.1.ebuild, -net-snmp-5.1.2.ebuild, + -net-snmp-5.2-r1.ebuild, +net-snmp-5.2-r2.ebuild, net-snmp-5.2.ebuild: + Revision bump; added conf script (w/ a few sed's we can reuse snmpd's init) + for snmptrapd (bug 61705). Also added selinux support (via + sec-policy/selinux-snmpd) for bug 79749. Marked 5.2 stable on x86 and tidy'd + old ebuilds. *net-snmp-5.2-r1 (26 Jan 2005) diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest index b7963b0c1915..54fe92710351 100644 --- a/net-analyzer/net-snmp/Manifest +++ b/net-analyzer/net-snmp/Manifest @@ -1,18 +1,17 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 73bf480a8242080b62b404f58f5aad08 net-snmp-5.1.1.ebuild 2419 -MD5 52eb026d6ae2a93fa9c68a78d503ca07 net-snmp-5.2-r1.ebuild 3741 -MD5 0e119c9b21dd832cee5cf5d038c3f405 net-snmp-5.1.1-r1.ebuild 3590 -MD5 86deeb458a73a3d0336440e34323129e net-snmp-5.1.2.ebuild 3624 -MD5 83f15e22faf0447b33a1112760bca8a5 ChangeLog 11179 -MD5 26c9697b92a17c3638878df783ee9086 net-snmp-5.2.ebuild 3691 +MD5 bab3e3dd0004bf7dbaa6a58e445b2215 net-snmp-5.2-r2.ebuild 4052 +MD5 cf98050307e99312360c4f255b220b5a net-snmp-5.1.1.ebuild 2462 +MD5 56aa4865d199dbefee49d35668bde53a net-snmp-5.1.1-r1.ebuild 3633 +MD5 d8dcb562e895494d74a001ae0467b5f8 ChangeLog 11665 +MD5 a8880d00fcb63692f13db0c6f1a312ec net-snmp-5.2.ebuild 3733 MD5 feec9ceb3ba9f6a8b860a4a130998500 metadata.xml 214 MD5 b492aa2a6ad459eb41a26932d4c0740b files/digest-net-snmp-5.1.1-r1 67 MD5 b492aa2a6ad459eb41a26932d4c0740b files/digest-net-snmp-5.1.1 67 -MD5 4b5b02692d3398dcdb69a3188136dc25 files/digest-net-snmp-5.1.2 67 +MD5 791cd8d81154f2c1d01e3f87b86faa44 files/snmptrapd.conf 635 MD5 93ce82e69e9c66badd05144fd498530c files/digest-net-snmp-5.2 65 -MD5 93ce82e69e9c66badd05144fd498530c files/digest-net-snmp-5.2-r1 65 +MD5 93ce82e69e9c66badd05144fd498530c files/digest-net-snmp-5.2-r2 65 MD5 00ce9b4fa6d597e08af7ce82d3a5c246 files/snmpd.conf 599 MD5 1cc5b20de8fc9e7c807195c320ab2f4b files/net-snmp-proc.patch 2448 MD5 ed2e953a9a923caec45eeca95bec2efc files/snmpd-5.1.conf 606 @@ -22,7 +21,7 @@ MD5 0dbde7b1bdd9c9dc988039e676800337 files/snmpd-5.1.rc6 714 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) -iD8DBQFB93R+EZCkKN40op4RArKFAJ9heoEByQsSLo01qAzVgV8e3Fmh7ACgxJWg -q1JC5fCC6jJEUZ8UpZ7J7vY= -=IqoB +iD8DBQFB+iAnEZCkKN40op4RAq0lAKCkLjEtw4brB9FIwBEqdvffItx+DgCfWINM +hki+kTIXte6O1Eicr1Lt6r8= +=56RV -----END PGP SIGNATURE----- diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.1.2 b/net-analyzer/net-snmp/files/digest-net-snmp-5.1.2 deleted file mode 100644 index c3304db947c2..000000000000 --- a/net-analyzer/net-snmp/files/digest-net-snmp-5.1.2 +++ /dev/null @@ -1 +0,0 @@ -MD5 8080555ab3f90011f25d5122042d9a8d net-snmp-5.1.2.tar.gz 3253579 diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.2-r1 b/net-analyzer/net-snmp/files/digest-net-snmp-5.2-r1 deleted file mode 100644 index 947c6aadbcc3..000000000000 --- a/net-analyzer/net-snmp/files/digest-net-snmp-5.2-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 af1c18209474ec4851b06504aae2a7c1 net-snmp-5.2.tar.gz 3853153 diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.2-r2 b/net-analyzer/net-snmp/files/digest-net-snmp-5.2-r2 new file mode 100644 index 000000000000..947c6aadbcc3 --- /dev/null +++ b/net-analyzer/net-snmp/files/digest-net-snmp-5.2-r2 @@ -0,0 +1 @@ +MD5 af1c18209474ec4851b06504aae2a7c1 net-snmp-5.2.tar.gz 3853153 diff --git a/net-analyzer/net-snmp/files/snmptrapd.conf b/net-analyzer/net-snmp/files/snmptrapd.conf new file mode 100644 index 000000000000..b6259fcf1080 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmptrapd.conf @@ -0,0 +1,16 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.conf,v 1.1 2005/01/28 11:19:25 ka0ttic Exp $ + +# extra flags to pass to snmptrapd +SNMPTRAPD_FLAGS="" + +# ignore authentication failure traps +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -a" + +# log messages to specified file +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Lf /var/log/snmptrapd.log" + +# log messages to syslog with the specified facility +# where facility is: 'd' = LOG_DAEMON, 'u' = LOG_USER, [0-7] = LOG_LOCAL[0-7] +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Ls d" diff --git a/net-analyzer/net-snmp/net-snmp-5.1.1-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.1.1-r1.ebuild index cd7fe0fcea93..8133f0b5bf93 100644 --- a/net-analyzer/net-snmp/net-snmp-5.1.1-r1.ebuild +++ b/net-analyzer/net-snmp/net-snmp-5.1.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 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.1.1-r1.ebuild,v 1.15 2005/01/08 10:46:09 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.1.1-r1.ebuild,v 1.16 2005/01/28 11:19:25 ka0ttic Exp $ inherit eutils @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="x86 ppc sparc alpha ~arm hppa amd64 ~ia64 ~s390 ~ppc64 ~mips" -IUSE="perl ipv6 ssl tcpd X lm_sensors minimal" +IUSE="perl ipv6 ssl tcpd X lm_sensors minimal selinux" PROVIDE="virtual/snmp" DEPEND="virtual/libc @@ -29,6 +29,7 @@ DEPEND="virtual/libc )" RDEPEND="${DEPEND} perl? ( X? ( dev-perl/perl-tk ) ) + selinux? ( sec-policy/selinux-snmpd ) !virtual/snmp" DEPEND="${DEPEND} >=sys-apps/sed-4" diff --git a/net-analyzer/net-snmp/net-snmp-5.1.1.ebuild b/net-analyzer/net-snmp/net-snmp-5.1.1.ebuild index 82acf68c0837..9fd3cd98ccb1 100644 --- a/net-analyzer/net-snmp/net-snmp-5.1.1.ebuild +++ b/net-analyzer/net-snmp/net-snmp-5.1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 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.1.1.ebuild,v 1.19 2005/01/08 10:46:09 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.1.1.ebuild,v 1.20 2005/01/28 11:19:25 ka0ttic Exp $ inherit eutils @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="x86 ppc sparc alpha arm hppa amd64 ia64 s390 ppc64" -IUSE="perl ipv6 ssl tcpd X" +IUSE="perl ipv6 ssl tcpd X selinux" PROVIDE="virtual/snmp" DEPEND="virtual/libc @@ -26,6 +26,7 @@ DEPEND="virtual/libc )" RDEPEND="${DEPEND} perl? ( X? ( dev-perl/perl-tk ) ) + selinux? ( sec-policy/selinux-snmpd ) !virtual/snmp" src_unpack() { diff --git a/net-analyzer/net-snmp/net-snmp-5.1.2.ebuild b/net-analyzer/net-snmp/net-snmp-5.1.2.ebuild deleted file mode 100644 index 4844cb86918f..000000000000 --- a/net-analyzer/net-snmp/net-snmp-5.1.2.ebuild +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2005 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.1.2.ebuild,v 1.2 2005/01/08 10:46:09 dragonheart Exp $ - -inherit eutils - -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" -SLOT="0" -KEYWORDS="~x86 ~ppc ~sparc ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64 ~mips" -IUSE="perl ipv6 ssl tcpd X lm_sensors minimal" - -PROVIDE="virtual/snmp" -DEPEND="virtual/libc - !minimal? ( =sys-libs/zlib-1.1.4 - ssl? ( >=dev-libs/openssl-0.9.6d ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - perl? ( - >=sys-devel/libperl-5.8.0 - >=dev-perl/ExtUtils-MakeMaker-6.11-r1 - ) - lm_sensors? ( - x86? ( sys-apps/lm-sensors ) - amd64? ( sys-apps/lm-sensors ) - )" -RDEPEND="${DEPEND} - perl? ( X? ( dev-perl/perl-tk ) ) - !virtual/snmp" - -DEPEND="${DEPEND} >=sys-apps/sed-4" - -src_unpack() { - unpack ${A} - cd ${S} - - 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 - - #wrt to bugs 68467, 68254 - sed -i -e 's/^NSC_AGENTLIBS="@AGENTLIBS@"/NSC_AGENTLIBS="@AGENTLIBS@ @WRAPLIBS@"/' net-snmp-config.in - - sed -i -e '551s;embed_perl="yes",;embed_perl=$enableval,;' configure.in - autoconf || die "autoconf failed" -} - -src_compile() { - local myconf - myconf="${myconf} `use_enable perl embedded-perl`" - myconf="${myconf} `use_with ssl openssl` `use_enable !ssl internal-md5`" - myconf="${myconf} `use_with tcpd libwrap`" - myconf="${myconf} `use_enable ipv6`" - - econf \ - --with-sys-location="Unknown" \ - --with-sys-contact="root@Unknown" \ - --with-default-snmp-version="3" \ - --with-mib-modules="host smux ucd-snmp/dlmod" \ - --with-logfile=${ROOT}/var/log/net-snmpd.log \ - --with-persistent-directory=${ROOT}/var/lib/net-snmp \ - --enable-ucd-snmp-compatibility \ - --enable-shared \ - --with-zlib \ - --with-install-prefix=${D} \ - ${myconf} || die "econf failed" - - emake -j1 || die "compile problem" - - if use perl ; then - emake perlmodules || die "compile perl modules problem" - fi -} - -src_install () { - make DESTDIR="${D}" install || die "make install failed" - - if use perl ; then - make DESTDIR="${D}" perlinstall || die "make perlinstall failed" - if ! use X ; then - rm -f "${D}/usr/bin/tkmib" - fi - else - rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" - fi - - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO - newdoc EXAMPLE.conf.def EXAMPLE.conf - - exeinto /etc/init.d - newexe "${FILESDIR}/snmpd-5.1.rc6" snmpd - insinto /etc/conf.d - newins "${FILESDIR}/snmpd-5.1.conf" snmpd - - keepdir /etc/snmp /var/lib/net-snmp - - # 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}} - rm -rf ${D}/usr/share/snmp/snmpconf-data ${D}/usr/share/snmp/*.conf - rm -rf ${D}/usr/bin/{net-snmp-config,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 -} diff --git a/net-analyzer/net-snmp/net-snmp-5.2-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.2-r1.ebuild deleted file mode 100644 index c535abe0adfc..000000000000 --- a/net-analyzer/net-snmp/net-snmp-5.2-r1.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2005 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.2-r1.ebuild,v 1.1 2005/01/26 10:44:04 ka0ttic Exp $ - -inherit eutils fixheadtails - -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" -SLOT="0" -KEYWORDS="~x86 ~ppc ~sparc ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64 ~mips" -IUSE="perl ipv6 ssl tcpd X lm_sensors minimal smux" - -PROVIDE="virtual/snmp" -DEPEND="virtual/libc - !minimal? ( =sys-libs/zlib-1.1.4 - ssl? ( >=dev-libs/openssl-0.9.6d ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - perl? ( - >=sys-devel/libperl-5.8.0 - >=dev-perl/ExtUtils-MakeMaker-6.11-r1 - ) - lm_sensors? ( - x86? ( sys-apps/lm-sensors ) - amd64? ( sys-apps/lm-sensors ) - )" -RDEPEND="${DEPEND} - perl? ( X? ( dev-perl/perl-tk ) ) - !virtual/snmp" - -DEPEND="${DEPEND} >=sys-apps/sed-4" - -src_unpack() { - unpack ${A} - cd ${S} - - 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 - - #wrt to bugs 68467, 68254 - sed -i -e \ - 's/^NSC_AGENTLIBS="@AGENTLIBS@"/NSC_AGENTLIBS="@AGENTLIBS@ @WRAPLIBS@"/' \ - net-snmp-config.in || die "sed net-snmp-config.in" - sed -i -e 's;embed_perl="yes",;embed_perl=$enableval,;' configure.in \ - || die "sed configure.in failed" - - ht_fix_all -} - -src_compile() { - local myconf mibs - - autoconf || die "autoconf failed" - - myconf="${myconf} `use_enable perl embedded-perl`" - myconf="${myconf} `use_with ssl openssl` `use_enable !ssl internal-md5`" - myconf="${myconf} `use_with tcpd libwrap`" - myconf="${myconf} `use_enable ipv6`" - - mibs="host ucd-snmp/dlmod" - use smux && mibs="${mibs} smux" - - econf \ - --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 \ - --with-zlib \ - --with-install-prefix="${D}" \ - ${myconf} || die "econf failed" - - emake -j1 || die "compile problem" - - if use perl ; then - emake perlmodules || die "compile perl modules problem" - fi -} - -src_install () { - make DESTDIR="${D}" install || die "make install failed" - - if use perl ; then - make DESTDIR="${D}" perlinstall || die "make perlinstall failed" - if ! use X ; then - rm -f "${D}/usr/bin/tkmib" - fi - else - rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" - fi - - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO - newdoc EXAMPLE.conf.def EXAMPLE.conf - - newinitd ${FILESDIR}/snmpd-5.1.rc6 snmpd - newconfd ${FILESDIR}/snmpd-5.1.conf snmpd - - keepdir /etc/snmp /var/lib/net-snmp - - # 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}} - rm -rf ${D}/usr/share/snmp/snmpconf-data ${D}/usr/share/snmp/*.conf - rm -rf ${D}/usr/bin/{net-snmp-config,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 -} diff --git a/net-analyzer/net-snmp/net-snmp-5.2-r2.ebuild b/net-analyzer/net-snmp/net-snmp-5.2-r2.ebuild new file mode 100644 index 000000000000..445af77bd30b --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.2-r2.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2005 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.2-r2.ebuild,v 1.1 2005/01/28 11:19:25 ka0ttic Exp $ + +inherit eutils fixheadtails + +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" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64 ~mips" +IUSE="perl ipv6 ssl tcpd X lm_sensors minimal smux selinux" + +PROVIDE="virtual/snmp" +DEPEND="virtual/libc + !minimal? ( =sys-libs/zlib-1.1.4 + ssl? ( >=dev-libs/openssl-0.9.6d ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + perl? ( + >=sys-devel/libperl-5.8.0 + >=dev-perl/ExtUtils-MakeMaker-6.11-r1 + ) + lm_sensors? ( + x86? ( sys-apps/lm-sensors ) + amd64? ( sys-apps/lm-sensors ) + )" +RDEPEND="${DEPEND} + perl? ( X? ( dev-perl/perl-tk ) ) + selinux? ( sec-policy/selinux-snmpd ) + !virtual/snmp" + +DEPEND="${DEPEND} >=sys-apps/sed-4" + +src_unpack() { + unpack ${A} + cd ${S} + + 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 + + #wrt to bugs 68467, 68254 + sed -i -e \ + 's/^NSC_AGENTLIBS="@AGENTLIBS@"/NSC_AGENTLIBS="@AGENTLIBS@ @WRAPLIBS@"/' \ + net-snmp-config.in || die "sed net-snmp-config.in" + sed -i -e 's;embed_perl="yes",;embed_perl=$enableval,;' configure.in \ + || die "sed configure.in failed" + + ht_fix_all +} + +src_compile() { + local myconf mibs + + autoconf || die "autoconf failed" + + myconf="${myconf} `use_enable perl embedded-perl`" + myconf="${myconf} `use_with ssl openssl` `use_enable !ssl internal-md5`" + myconf="${myconf} `use_with tcpd libwrap`" + myconf="${myconf} `use_enable ipv6`" + + mibs="host ucd-snmp/dlmod" + use smux && mibs="${mibs} smux" + + econf \ + --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 \ + --with-zlib \ + --with-install-prefix="${D}" \ + ${myconf} || die "econf failed" + + emake -j1 || die "compile problem" + + if use perl ; then + emake perlmodules || die "compile perl modules problem" + fi +} + +src_install () { + make DESTDIR="${D}" install || die "make install failed" + + if use perl ; then + make DESTDIR="${D}" perlinstall || die "make perlinstall failed" + if ! use X ; then + rm -f "${D}/usr/bin/tkmib" + fi + else + rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + keepdir /etc/snmp /var/lib/net-snmp + + newinitd ${FILESDIR}/snmpd-5.1.rc6 snmpd + newconfd ${FILESDIR}/snmpd-5.1.conf snmpd + + # snmptrapd can use the same rc script just slightly modified + sed -e 's/net-snmpd/snmptrapd/g' \ + -e 's/snmpd/snmptrapd/g' \ + -e 's/SNMPD/SNMPTRAPD/g' \ + ${D}/etc/init.d/snmpd > ${D}/etc/init.d/snmptrapd || die + 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}} + rm -rf ${D}/usr/share/snmp/snmpconf-data ${D}/usr/share/snmp/*.conf + rm -rf ${D}/usr/bin/{net-snmp-config,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 +} diff --git a/net-analyzer/net-snmp/net-snmp-5.2.ebuild b/net-analyzer/net-snmp/net-snmp-5.2.ebuild index 7e0c292c0f4b..873cec2085a9 100644 --- a/net-analyzer/net-snmp/net-snmp-5.2.ebuild +++ b/net-analyzer/net-snmp/net-snmp-5.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 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.2.ebuild,v 1.3 2005/01/08 10:46:09 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.2.ebuild,v 1.4 2005/01/28 11:19:25 ka0ttic Exp $ inherit eutils @@ -10,8 +10,8 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="as-is" SLOT="0" -KEYWORDS="~x86 ~ppc ~sparc ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64 ~mips" -IUSE="perl ipv6 ssl tcpd X lm_sensors minimal" +KEYWORDS="x86 ~ppc ~sparc ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64 ~mips" +IUSE="perl ipv6 ssl tcpd X lm_sensors minimal selinux" PROVIDE="virtual/snmp" DEPEND="virtual/libc @@ -29,6 +29,7 @@ DEPEND="virtual/libc )" RDEPEND="${DEPEND} perl? ( X? ( dev-perl/perl-tk ) ) + selinux? ( sec-policy/selinux-snmpd ) !virtual/snmp" DEPEND="${DEPEND} >=sys-apps/sed-4" -- cgit v1.2.3-65-gdbad