1 |
tove 12/06/02 20:27:14 |
2 |
|
3 |
Modified: ChangeLog net-snmp-5.6.1.ebuild net-snmp-5.5.ebuild |
4 |
Added: net-snmp-5.4.2.1-r5.ebuild net-snmp-5.4.3-r1.ebuild |
5 |
Removed: net-snmp-5.4.3.ebuild |
6 |
Log: |
7 |
Move perl modules to the vendor branch (#342793) |
8 |
|
9 |
(Portage version: 2.2.0_alpha108/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.225 net-analyzer/net-snmp/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/ChangeLog?rev=1.225&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/ChangeLog?rev=1.225&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/ChangeLog?r1=1.224&r2=1.225 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v |
21 |
retrieving revision 1.224 |
22 |
retrieving revision 1.225 |
23 |
diff -u -r1.224 -r1.225 |
24 |
--- ChangeLog 13 May 2012 11:05:55 -0000 1.224 |
25 |
+++ ChangeLog 2 Jun 2012 20:27:14 -0000 1.225 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for net-analyzer/net-snmp |
28 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.224 2012/05/13 11:05:55 swift Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.225 2012/06/02 20:27:14 tove Exp $ |
31 |
+ |
32 |
+*net-snmp-5.4.3-r1 (02 Jun 2012) |
33 |
+*net-snmp-5.4.2.1-r5 (02 Jun 2012) |
34 |
+ |
35 |
+ 02 Jun 2012; Torsten Veller <tove@g.o> +net-snmp-5.4.2.1-r5.ebuild, |
36 |
+ -net-snmp-5.4.3.ebuild, +net-snmp-5.4.3-r1.ebuild, net-snmp-5.5.ebuild, |
37 |
+ net-snmp-5.6.1.ebuild: |
38 |
+ Move perl modules to the vendor branch (#342793) |
39 |
|
40 |
13 May 2012; <swift@g.o> net-snmp-5.4.2.1-r4.ebuild, |
41 |
net-snmp-5.4.3.ebuild, net-snmp-5.5.ebuild, net-snmp-5.6.1.ebuild: |
42 |
|
43 |
|
44 |
|
45 |
1.3 net-analyzer/net-snmp/net-snmp-5.6.1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.6.1.ebuild?rev=1.3&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.6.1.ebuild?rev=1.3&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.6.1.ebuild?r1=1.2&r2=1.3 |
50 |
|
51 |
Index: net-snmp-5.6.1.ebuild |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.6.1.ebuild,v |
54 |
retrieving revision 1.2 |
55 |
retrieving revision 1.3 |
56 |
diff -u -r1.2 -r1.3 |
57 |
--- net-snmp-5.6.1.ebuild 13 May 2012 11:05:55 -0000 1.2 |
58 |
+++ net-snmp-5.6.1.ebuild 2 Jun 2012 20:27:14 -0000 1.3 |
59 |
@@ -1,6 +1,6 @@ |
60 |
# Copyright 1999-2012 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.6.1.ebuild,v 1.2 2012/05/13 11:05:55 swift Exp $ |
63 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.6.1.ebuild,v 1.3 2012/06/02 20:27:14 tove Exp $ |
64 |
|
65 |
EAPI="3" |
66 |
PYTHON_DEPEND="python? 2" |
67 |
@@ -101,7 +101,7 @@ |
68 |
$(use_enable perl embedded-perl) \ |
69 |
$(use_enable !ssl internal-md5) \ |
70 |
$(use_with elf) \ |
71 |
- $(use_with perl perl-modules) \ |
72 |
+ $(use_with perl perl-modules INSTALLDIRS=vendor ) \ |
73 |
$(use_with python python-modules) \ |
74 |
$(use_with ssl openssl) \ |
75 |
$(use_with tcpd libwrap)" |
76 |
|
77 |
|
78 |
|
79 |
1.7 net-analyzer/net-snmp/net-snmp-5.5.ebuild |
80 |
|
81 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.5.ebuild?rev=1.7&view=markup |
82 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.5.ebuild?rev=1.7&content-type=text/plain |
83 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.5.ebuild?r1=1.6&r2=1.7 |
84 |
|
85 |
Index: net-snmp-5.5.ebuild |
86 |
=================================================================== |
87 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.5.ebuild,v |
88 |
retrieving revision 1.6 |
89 |
retrieving revision 1.7 |
90 |
diff -u -r1.6 -r1.7 |
91 |
--- net-snmp-5.5.ebuild 13 May 2012 11:05:55 -0000 1.6 |
92 |
+++ net-snmp-5.5.ebuild 2 Jun 2012 20:27:14 -0000 1.7 |
93 |
@@ -1,6 +1,6 @@ |
94 |
# Copyright 1999-2012 Gentoo Foundation |
95 |
# Distributed under the terms of the GNU General Public License v2 |
96 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.5.ebuild,v 1.6 2012/05/13 11:05:55 swift Exp $ |
97 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.5.ebuild,v 1.7 2012/06/02 20:27:14 tove Exp $ |
98 |
|
99 |
EAPI="3" |
100 |
PYTHON_DEPEND="python? 2" |
101 |
@@ -101,7 +101,7 @@ |
102 |
$(use_enable perl embedded-perl) \ |
103 |
$(use_enable !ssl internal-md5) \ |
104 |
$(use_with elf) \ |
105 |
- $(use_with perl perl-modules) \ |
106 |
+ $(use_with perl perl-modules INSTALLDIRS=vendor ) \ |
107 |
$(use_with python python-modules) \ |
108 |
$(use_with ssl openssl) \ |
109 |
$(use_with tcpd libwrap)" |
110 |
|
111 |
|
112 |
|
113 |
1.1 net-analyzer/net-snmp/net-snmp-5.4.2.1-r5.ebuild |
114 |
|
115 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.2.1-r5.ebuild?rev=1.1&view=markup |
116 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.2.1-r5.ebuild?rev=1.1&content-type=text/plain |
117 |
|
118 |
Index: net-snmp-5.4.2.1-r5.ebuild |
119 |
=================================================================== |
120 |
# Copyright 1999-2012 Gentoo Foundation |
121 |
# Distributed under the terms of the GNU General Public License v2 |
122 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.2.1-r5.ebuild,v 1.1 2012/06/02 20:27:14 tove Exp $ |
123 |
|
124 |
EAPI="3" |
125 |
PYTHON_DEPEND="python? 2" |
126 |
|
127 |
inherit fixheadtails flag-o-matic perl-module python autotools |
128 |
|
129 |
DESCRIPTION="Software for generating and retrieving SNMP data" |
130 |
HOMEPAGE="http://net-snmp.sourceforge.net/" |
131 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
132 |
|
133 |
LICENSE="as-is BSD" |
134 |
SLOT="0" |
135 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
136 |
IUSE="bzip2 diskio doc elf extensible ipv6 kernel_linux lm_sensors mfd-rewrites minimal perl python rpm selinux sendmail smux ssl tcpd X zlib" |
137 |
|
138 |
COMMON="ssl? ( >=dev-libs/openssl-0.9.6d ) |
139 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
140 |
rpm? ( |
141 |
app-arch/rpm |
142 |
dev-libs/popt |
143 |
app-arch/bzip2 |
144 |
>=sys-libs/zlib-1.1.4 |
145 |
) |
146 |
bzip2? ( app-arch/bzip2 ) |
147 |
zlib? ( >=sys-libs/zlib-1.1.4 ) |
148 |
elf? ( dev-libs/elfutils ) |
149 |
lm_sensors? ( |
150 |
kernel_linux? ( sys-apps/lm_sensors ) |
151 |
) |
152 |
python? ( dev-python/setuptools )" |
153 |
|
154 |
RDEPEND="${COMMON} |
155 |
perl? ( |
156 |
X? ( dev-perl/perl-tk ) |
157 |
!minimal? ( dev-perl/TermReadKey ) |
158 |
) |
159 |
selinux? ( sec-policy/selinux-snmp )" |
160 |
|
161 |
# Dependency on autoconf due to bug #225893 |
162 |
DEPEND="${COMMON} |
163 |
>=sys-devel/autoconf-2.61-r2 |
164 |
>=sys-apps/sed-4 |
165 |
doc? ( app-doc/doxygen )" |
166 |
|
167 |
pkg_setup() { |
168 |
if use python; then |
169 |
python_set_active_version 2 |
170 |
python_pkg_setup |
171 |
fi |
172 |
} |
173 |
|
174 |
src_prepare() { |
175 |
# Fix CVE-2008-6123 |
176 |
epatch "${FILESDIR}"/CVE-2008-6123.patch |
177 |
|
178 |
# lm_sensors-3 support |
179 |
if use lm_sensors ; then |
180 |
epatch "${FILESDIR}"/${PN}-5.4.1-sensors3.patch \ |
181 |
"${FILESDIR}"/${PN}-5.4.1-sensors3-version_detect.patch |
182 |
fi |
183 |
|
184 |
# fix access violation in make check |
185 |
sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \ |
186 |
die "sed eval_tools.sh failed" |
187 |
# fix path in fixproc |
188 |
sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \ |
189 |
die "sed fixproc failed" |
190 |
|
191 |
if use python ; then |
192 |
PYTHON_DIR="$(python_get_sitedir)" |
193 |
sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || \ |
194 |
die "sed python failed" |
195 |
fi |
196 |
|
197 |
# snmpconf generates config files with proper selinux context |
198 |
use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch |
199 |
|
200 |
# remove CFLAGS from net-snmp-config script (bug #257622): |
201 |
sed -i -e 's|@CFLAGS@||g' -e 's|@LDFLAGS@||g' \ |
202 |
net-snmp-config.in || die "sedding CFLAGS/LDFLAGS failed" |
203 |
|
204 |
# Fix version number: |
205 |
sed -i -e "s:NetSnmpVersionInfo = \".*\":NetSnmpVersionInfo = \"${PV}\":" \ |
206 |
snmplib/snmp_version.c || die "sedding version failed" |
207 |
|
208 |
# Fix toolchain quadruplet detection, bug #330353 |
209 |
epatch "${FILESDIR}/${P}-perlcc-hppa.patch" |
210 |
|
211 |
eautoreconf |
212 |
|
213 |
ht_fix_all |
214 |
} |
215 |
|
216 |
src_configure() { |
217 |
strip-flags |
218 |
|
219 |
local mibs="host ucd-snmp/dlmod" |
220 |
use diskio && mibs="${mibs} ucd-snmp/diskio" |
221 |
use extensible && mibs="${mibs} ucd-snmp/extensible" |
222 |
use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" |
223 |
use sendmail && mibs="${mibs} mibII/mta_sendmail" |
224 |
use smux && mibs="${mibs} smux" |
225 |
|
226 |
local myconf="$(use_enable ipv6) \ |
227 |
$(use_enable mfd-rewrites) \ |
228 |
$(use_enable perl embedded-perl) \ |
229 |
$(use_enable !ssl internal-md5) \ |
230 |
$(use_with elf) \ |
231 |
$(use_with perl perl-modules INSTALLDIRS=vendor ) \ |
232 |
$(use_with python python-modules) \ |
233 |
$(use_with ssl openssl) \ |
234 |
$(use_with tcpd libwrap)" |
235 |
if use rpm ; then |
236 |
myconf="${myconf} \ |
237 |
--with-rpm \ |
238 |
--with-bzip2 \ |
239 |
--with-zlib" |
240 |
else |
241 |
myconf="${myconf} \ |
242 |
--without-rpm \ |
243 |
$(use_with bzip2) \ |
244 |
$(use_with zlib)" |
245 |
fi |
246 |
|
247 |
econf \ |
248 |
--with-install-prefix="${D}" \ |
249 |
--with-sys-location="Unknown" \ |
250 |
--with-sys-contact="root@Unknown" \ |
251 |
--with-default-snmp-version="3" \ |
252 |
--with-mib-modules="${mibs}" \ |
253 |
--with-logfile="/var/log/net-snmpd.log" \ |
254 |
--with-persistent-directory="/var/lib/net-snmp" \ |
255 |
--enable-ucd-snmp-compatibility \ |
256 |
--enable-shared \ |
257 |
--enable-as-needed \ |
258 |
${myconf} |
259 |
} |
260 |
|
261 |
src_compile() { |
262 |
emake -j1 || die "emake failed" |
263 |
|
264 |
if use doc ; then |
265 |
einfo "Building HTML Documentation" |
266 |
make docsdox || die "failed to build docs" |
267 |
fi |
268 |
} |
269 |
|
270 |
src_test() { |
271 |
cd testing |
272 |
if ! make test ; then |
273 |
echo |
274 |
einfo "Don't be alarmed if a few tests FAIL." |
275 |
einfo "This could happen for several reasons:" |
276 |
einfo " - You don't already have a working configuration." |
277 |
einfo " - Your ethernet interface isn't properly configured." |
278 |
echo |
279 |
fi |
280 |
} |
281 |
|
282 |
src_install () { |
283 |
# bug #317965 |
284 |
emake -j1 DESTDIR="${D}" install || die "make install failed" |
285 |
|
286 |
if use perl ; then |
287 |
fixlocalpod |
288 |
use X || rm -f "${D}"/usr/bin/tkmib |
289 |
else |
290 |
rm -f "${D}"/usr/bin/mib2c "${D}"/usr/bin/snmpcheck "${D}"/usr/bin/tkmib |
291 |
fi |
292 |
|
293 |
dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO || die |
294 |
newdoc EXAMPLE.conf.def EXAMPLE.conf || die |
295 |
|
296 |
use doc && { dohtml docs/html/* || die ; } |
297 |
|
298 |
keepdir /etc/snmp /var/lib/net-snmp |
299 |
|
300 |
newinitd "${FILESDIR}"/snmpd.init snmpd || die |
301 |
newconfd "${FILESDIR}"/snmpd.conf snmpd || die |
302 |
|
303 |
newinitd "${FILESDIR}"/snmptrapd.init snmptrapd || die |
304 |
newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd || die |
305 |
|
306 |
# Remove everything not required for an agent. |
307 |
# Keep only the snmpd, snmptrapd, MIBs, headers and libraries. |
308 |
if use minimal; then |
309 |
elog "USE='minimal' is set. Removing excess/non-minimal components." |
310 |
rm -rf |
311 |
"${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}} |
312 |
rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf |
313 |
rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf} |
314 |
find "${D}" -name '*.pl' -exec rm -f '{}' \; |
315 |
use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6* |
316 |
fi |
317 |
|
318 |
# bug 113788, install example config |
319 |
insinto /etc/snmp |
320 |
newins "${S}"/EXAMPLE.conf snmpd.conf.example || die |
321 |
} |
322 |
|
323 |
pkg_postinst() { |
324 |
if use python; then |
325 |
python_mod_optimize netsnmp |
326 |
fi |
327 |
|
328 |
elog "An example configuration file has been installed in" |
329 |
elog "/etc/snmp/snmpd.conf.example." |
330 |
} |
331 |
|
332 |
pkg_postrm() { |
333 |
if use python; then |
334 |
python_mod_cleanup netsnmp |
335 |
fi |
336 |
} |
337 |
|
338 |
|
339 |
|
340 |
1.1 net-analyzer/net-snmp/net-snmp-5.4.3-r1.ebuild |
341 |
|
342 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.3-r1.ebuild?rev=1.1&view=markup |
343 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.3-r1.ebuild?rev=1.1&content-type=text/plain |
344 |
|
345 |
Index: net-snmp-5.4.3-r1.ebuild |
346 |
=================================================================== |
347 |
# Copyright 1999-2012 Gentoo Foundation |
348 |
# Distributed under the terms of the GNU General Public License v2 |
349 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.3-r1.ebuild,v 1.1 2012/06/02 20:27:14 tove Exp $ |
350 |
|
351 |
EAPI="3" |
352 |
PYTHON_DEPEND="python? 2" |
353 |
|
354 |
inherit fixheadtails flag-o-matic perl-module python autotools |
355 |
|
356 |
DESCRIPTION="Software for generating and retrieving SNMP data" |
357 |
HOMEPAGE="http://net-snmp.sourceforge.net/" |
358 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
359 |
|
360 |
LICENSE="as-is BSD" |
361 |
SLOT="0" |
362 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
363 |
IUSE="bzip2 diskio doc elf extensible ipv6 kernel_linux lm_sensors mfd-rewrites minimal perl python rpm selinux sendmail smux ssl tcpd X zlib" |
364 |
|
365 |
COMMON="ssl? ( >=dev-libs/openssl-0.9.6d ) |
366 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
367 |
rpm? ( |
368 |
app-arch/rpm |
369 |
dev-libs/popt |
370 |
app-arch/bzip2 |
371 |
>=sys-libs/zlib-1.1.4 |
372 |
) |
373 |
bzip2? ( app-arch/bzip2 ) |
374 |
zlib? ( >=sys-libs/zlib-1.1.4 ) |
375 |
elf? ( dev-libs/elfutils ) |
376 |
lm_sensors? ( |
377 |
kernel_linux? ( sys-apps/lm_sensors ) |
378 |
) |
379 |
python? ( dev-python/setuptools )" |
380 |
|
381 |
RDEPEND="${COMMON} |
382 |
perl? ( |
383 |
X? ( dev-perl/perl-tk ) |
384 |
!minimal? ( dev-perl/TermReadKey ) |
385 |
) |
386 |
selinux? ( sec-policy/selinux-snmp )" |
387 |
|
388 |
# Dependency on autoconf due to bug #225893 |
389 |
DEPEND="${COMMON} |
390 |
>=sys-devel/autoconf-2.61-r2 |
391 |
>=sys-apps/sed-4 |
392 |
doc? ( app-doc/doxygen )" |
393 |
|
394 |
pkg_setup() { |
395 |
if use python; then |
396 |
python_set_active_version 2 |
397 |
python_pkg_setup |
398 |
fi |
399 |
} |
400 |
|
401 |
src_prepare() { |
402 |
# lm_sensors-3 support |
403 |
if use lm_sensors ; then |
404 |
epatch "${FILESDIR}"/${PN}-5.4.1-sensors3.patch \ |
405 |
"${FILESDIR}"/${PN}-5.4.1-sensors3-version_detect.patch |
406 |
fi |
407 |
|
408 |
# fix access violation in make check |
409 |
sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \ |
410 |
die "sed eval_tools.sh failed" |
411 |
# fix path in fixproc |
412 |
sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \ |
413 |
die "sed fixproc failed" |
414 |
|
415 |
if use python ; then |
416 |
PYTHON_DIR="$(python_get_sitedir)" |
417 |
sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || \ |
418 |
die "sed python failed" |
419 |
fi |
420 |
|
421 |
# snmpconf generates config files with proper selinux context |
422 |
use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch |
423 |
|
424 |
# remove CFLAGS from net-snmp-config script (bug #257622): |
425 |
sed -i -e 's|@CFLAGS@||g' -e 's|@LDFLAGS@||g' \ |
426 |
net-snmp-config.in || die "sedding CFLAGS/LDFLAGS failed" |
427 |
|
428 |
# Respect LDFLAGS |
429 |
sed -i Makefile.top \ |
430 |
-e '/^LIB_LD_CMD/{s|$(CFLAGS)|& $(LDFLAGS)|g}' \ |
431 |
|| die "sed LDFLAGS failed" |
432 |
|
433 |
# Fix version number: |
434 |
sed -i -e "s:NetSnmpVersionInfo = \".*\":NetSnmpVersionInfo = \"${PV}\":" \ |
435 |
snmplib/snmp_version.c || die "sedding version failed" |
436 |
|
437 |
eautoreconf |
438 |
|
439 |
ht_fix_all |
440 |
} |
441 |
|
442 |
src_configure() { |
443 |
strip-flags |
444 |
|
445 |
local mibs="host ucd-snmp/dlmod" |
446 |
use diskio && mibs="${mibs} ucd-snmp/diskio" |
447 |
use extensible && mibs="${mibs} ucd-snmp/extensible" |
448 |
use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" |
449 |
use sendmail && mibs="${mibs} mibII/mta_sendmail" |
450 |
use smux && mibs="${mibs} smux" |
451 |
|
452 |
local myconf="$(use_enable ipv6) \ |
453 |
$(use_enable mfd-rewrites) \ |
454 |
$(use_enable perl embedded-perl) \ |
455 |
$(use_enable !ssl internal-md5) \ |
456 |
$(use_with elf) \ |
457 |
$(use_with perl perl-modules INSTALLDIRS=vendor ) \ |
458 |
$(use_with python python-modules) \ |
459 |
$(use_with ssl openssl) \ |
460 |
$(use_with tcpd libwrap)" |
461 |
if use rpm ; then |
462 |
myconf="${myconf} \ |
463 |
--with-rpm \ |
464 |
--with-bzip2 \ |
465 |
--with-zlib" |
466 |
else |
467 |
myconf="${myconf} \ |
468 |
--without-rpm \ |
469 |
$(use_with bzip2) \ |
470 |
$(use_with zlib)" |
471 |
fi |
472 |
|
473 |
econf \ |
474 |
--with-install-prefix="${D}" \ |
475 |
--with-sys-location="Unknown" \ |
476 |
--with-sys-contact="root@Unknown" \ |
477 |
--with-default-snmp-version="3" \ |
478 |
--with-mib-modules="${mibs}" \ |
479 |
--with-logfile="/var/log/net-snmpd.log" \ |
480 |
--with-persistent-directory="/var/lib/net-snmp" \ |
481 |
--enable-ucd-snmp-compatibility \ |
482 |
--enable-shared \ |
483 |
--with-ldflags="${LDFLAGS}" \ |
484 |
--enable-as-needed \ |
485 |
${myconf} |
486 |
} |
487 |
|
488 |
src_compile() { |
489 |
emake -j1 OTHERLDFLAGS="${LDFLAGS}" || die "emake failed" |
490 |
|
491 |
if use doc ; then |
492 |
einfo "Building HTML Documentation" |
493 |
make docsdox || die "failed to build docs" |
494 |
fi |
495 |
} |
496 |
|
497 |
src_test() { |
498 |
cd testing |
499 |
if ! make test ; then |
500 |
echo |
501 |
einfo "Don't be alarmed if a few tests FAIL." |
502 |
einfo "This could happen for several reasons:" |
503 |
einfo " - You don't already have a working configuration." |
504 |
einfo " - Your ethernet interface isn't properly configured." |
505 |
echo |
506 |
fi |
507 |
} |
508 |
|
509 |
src_install () { |
510 |
# bug #317965 |
511 |
emake -j1 DESTDIR="${D}" install || die "make install failed" |
512 |
|
513 |
if use perl ; then |
514 |
fixlocalpod |
515 |
use X || rm -f "${D}"/usr/bin/tkmib |
516 |
else |
517 |
rm -f "${D}"/usr/bin/mib2c "${D}"/usr/bin/snmpcheck "${D}"/usr/bin/tkmib |
518 |
fi |
519 |
|
520 |
dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO || die |
521 |
newdoc EXAMPLE.conf.def EXAMPLE.conf || die |
522 |
|
523 |
use doc && { dohtml docs/html/* || die ; } |
524 |
|
525 |
keepdir /etc/snmp /var/lib/net-snmp |
526 |
|
527 |
newinitd "${FILESDIR}"/snmpd.init snmpd || die |
528 |
newconfd "${FILESDIR}"/snmpd.conf snmpd || die |
529 |
|
530 |
newinitd "${FILESDIR}"/snmptrapd.init snmptrapd || die |
531 |
newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd || die |
532 |
|
533 |
# Remove everything not required for an agent. |
534 |
# Keep only the snmpd, snmptrapd, MIBs, headers and libraries. |
535 |
if use minimal; then |
536 |
elog "USE='minimal' is set. Removing excess/non-minimal components." |
537 |
rm -rf |
538 |
"${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}} |
539 |
rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf |
540 |
rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf} |
541 |
find "${D}" -name '*.pl' -exec rm -f '{}' \; |
542 |
use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6* |
543 |
fi |
544 |
|
545 |
# bug 113788, install example config |
546 |
insinto /etc/snmp |
547 |
newins "${S}"/EXAMPLE.conf snmpd.conf.example || die |
548 |
} |
549 |
|
550 |
pkg_postinst() { |
551 |
if use python; then |
552 |
python_mod_optimize netsnmp |
553 |
fi |
554 |
|
555 |
elog "An example configuration file has been installed in" |
556 |
elog "/etc/snmp/snmpd.conf.example." |
557 |
} |
558 |
|
559 |
pkg_postrm() { |
560 |
if use python; then |
561 |
python_mod_cleanup netsnmp |
562 |
fi |
563 |
} |