]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
- update autofoo not to link with rpm at all if using hrmib export from rpm
[packages/net-snmp.git] / net-snmp.spec
CommitLineData
6139ec4c 1# TODO
2# - package or remove:
3# %{py_sitedir}/netsnmp/__init__.py
4# %{py_sitedir}/netsnmp/client.py
5# %{py_sitedir}/netsnmp/tests/__init__.py
6# %{py_sitedir}/netsnmp/tests/__init__.pyc
7# %{py_sitedir}/netsnmp/tests/__init__.pyo
8# %{py_sitedir}/netsnmp/tests/test.py
9# %{py_sitedir}/netsnmp/tests/test.pyc
10# %{py_sitedir}/netsnmp/tests/test.pyo
11# %{_datadir}/snmp/snmp_perl.pl
12#
13# Conditional build:
14%bcond_without autodeps # don't BR packages only for deps resolving
15%bcond_without rpm # don't include RPM support
16%bcond_without kerberos5 # don't include kerberos support
17%bcond_without lm_sensors # don't include sensors support
18%bcond_without perl # don't include Perl modules and utils
19%bcond_without python # don't include Python modules
1807fdee 20%bcond_without static_libs # don't build static library
6139ec4c 21#
22%include /usr/lib/rpm/macros.perl
23Summary: A collection of SNMP protocol tools
24Summary(es.UTF-8): Agente SNMP de la UCD
25Summary(pl.UTF-8): Kolekcja narzędzi do obsługi protokołu SNMP
26Summary(pt_BR.UTF-8): Agente SNMP da UCD
27Summary(ru.UTF-8): Набор утилит для протокола SNMP от UC-Davis
28Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis
29Name: net-snmp
30Version: 5.4.1
c90fcf09 31Release: 11
6139ec4c 32License: BSD-like
33Group: Networking/Daemons
34Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
35# Source0-md5: 6c974df7a5a5b1579f72115e6b045bda
36Source1: %{name}d.init
37Source2: %{name}d.conf
38Source3: %{name}d.sysconfig
39Source4: %{name}trapd.init
40Source5: %{name}trapd.conf
41Source6: %{name}trapd.sysconfig
42Source7: ucd-ipchains.tar.gz
43# Source7-md5: 29949f1008f1a04d6efefd5b3ea607da
44Patch0: %{name}-acfix.patch
45Patch1: %{name}-rpm-implicit-libs.patch
46Patch2: %{name}-config-noflags.patch
47Patch3: %{name}-manpage.patch
48Patch4: %{name}-link.patch
49Patch5: %{name}-llinterfaces.patch
50Patch6: %{name}-kernel_headers.patch
51Patch7: %{name}-rpmpath.patch
52Patch8: %{name}-snmpksm.patch
53Patch9: %{name}-python.patch
54Patch10: %{name}-lvalue.patch
ab44d410 55Patch11: %{name}-defaultconfig.patch
c90fcf09
ER
56Patch12: %{name}-duplicate-ip.patch
57Patch13: %{name}-use-rpm-hrmib.patch
6139ec4c 58URL: http://www.net-snmp.org/
59BuildRequires: autoconf >= 2.61-3
60BuildRequires: automake
61BuildRequires: elfutils-devel
917dbec5 62%{?with_kerberos5:BuildRequires: heimdal-devel}
6139ec4c 63BuildRequires: libtool >= 1.4
64BuildRequires: libwrap-devel
65%{?with_lm_sensors:BuildRequires: lm_sensors-devel}
66BuildRequires: openssl-devel >= 0.9.7d
67%{?with_autodeps:BuildRequires: perl-Term-ReadKey}
68BuildRequires: perl-devel >= 1:5.8.0
69%if %{with python}
917dbec5 70BuildRequires: python-devel
6139ec4c 71BuildRequires: python-setuptools
72%endif
73%if %{with rpm}
c90fcf09 74BuildRequires: rpm
6139ec4c 75BuildRequires: rpm-perlprov >= 3.0.3-16
76%endif
6139ec4c 77BuildRequires: rpmbuild(macros) >= 1.268
78Requires(post,preun): /sbin/chkconfig
79Requires: %{name}-libs = %{version}-%{release}
ab44d410 80Requires: %{name}-mibs = %{version}-%{release}
6139ec4c 81Requires: /usr/bin/setsid
82Requires: rc-scripts >= 0.2.0
83Provides: snmpd
84Obsoletes: cmu-snmp
85Obsoletes: snmpd
86Obsoletes: ucd-snmp
4f7bc2fc 87Conflicts: rpm < 4.4.9-43.11
6139ec4c 88BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89
90%define logfile /var/log/snmpd.log
6139ec4c 91
92%description
93SNMP (Simple Network Management Protocol) is a protocol used for
94network management (hence the name). The net-snmp project includes
95various SNMP tools: an extensible agent, an SNMP library, tools for
96requesting or setting information from SNMP agents, tools for
97generating and handling SNMP traps, a version of the netstat command
98which uses SNMP, and a Tk/Perl mib browser. This package contains the
99snmpd daemon, documentation, etc.
100
101%description -l es.UTF-8
102Este paquete se deriva de la implementación del Protocolo Simple de
103Gestión de Redes versión 2 (SNMPv2) de la Universidad Carnegie Mellon.
104Útil para administrar redes y hacer contabilidad.
105
106%description -l pl.UTF-8
107SNMP (Simple Network Management Protocol) jest protokołem używanym do
108zarządzania sieciami. Pakiet zawiera narzędzia: rozbudowywalnego
109agenta, bibliotekę SNMP, narzędzia do odpytywania oraz ustawiania
110informacji poprzez agentów SNMP, narzędzia do generowania i obsługi
111pułapek SNMP, wersję komendy netstat używającą SNMP, przeglądarkę mib
112w Tk/Perl, demona, dokumentację itp.
113
114%description -l pt_BR.UTF-8
115Este pacote é derivado da implementação do Protocolo Simples de
116Gerenciamento de Redes versão 2 (SNMPv2) da Universidade Carnegie
117Mellon. Útil para gerenciar redes e fazer contabilidade.
118
119%description -l ru.UTF-8
120SNMP (Simple Network Management Protocol) - это протокол, используемый
121для управления сетью (отсюда и название). Проект net-snmp включает
122разнообразные SNMP-утилиты: расширяемый агент, библиотека SNMP,
123утилиты для запроса или установки информации от SNMP-агентов, утилиты
124для генерации и обработки SNMP-трапов, версия команды netstat,
125использующей SNMP, и mib-браузер на Tk/Perl. Этот пакет содержит
126демоны snmpd и snmptrapd, документацию и т.д.
127
128%description -l uk.UTF-8
129SNMP (Simple Network Management Protocol) - це протокол, який
130використовують для керування мережею (звідси і назва). Проект net-snmp
131містить різноманітні SNMP-утиліти: розширюваний агент, бібліотека
132SNMP, утиліти для запросу та встановлення інформації від NMP-агентів,
133утиліти для генерації та обробки SNMP-трапів, версія команди netstat,
134яка використовує SNMP, та mib-браузер на Tk/Perl. Цей пакет містить
135демони snmpd та snmptrapd, документацію і т.і.
136
137%package libs
138Summary: NET SNMP libraries
139Summary(pl.UTF-8): Biblioteki SNMP
140Group: Libraries
ab44d410 141Requires: %{name}-mibs
6139ec4c 142Obsoletes: net-snmp-compat-libs
143Obsoletes: ucd-snmp-libs
144
145%description libs
146NET SNMP libraries.
147
148%description libs -l pl.UTF-8
149Biblioteki SNMP.
150
151%package devel
152Summary: The development environment for the net-snmp project
153Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
154Summary(pl.UTF-8): Pliki dla programistów używających bibliotek net-snmp
155Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
156Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
157Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
158Group: Development/Libraries
159Requires: %{name}-libs = %{version}-%{release}
160Requires: elfutils-devel
7b49308b 161%{?with_kerberos5:Requires: heimdal-devel}
6139ec4c 162Requires: libwrap-devel
163%{?with_lm_sensors:Requires: lm_sensors-devel}
164Requires: openssl-devel >= 0.9.7c
6139ec4c 165Obsoletes: ucd-snmp-devel
166
167%description devel
168The ucd-snmp-devel package contains the development libraries and
169header files for use with the net-snmp project's network management
170tools.
171
172%description devel -l es.UTF-8
173Estas son las bibliotecas y archivos de inclusión para desarrollo con
174el SNMP de la UCD. Con este paquete es posible la creación de
175programas para uso en la gestión de redes.
176
177%description devel -l pl.UTF-8
178Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju
179aplikacji używających protokołu SNMP.
180
181%description devel -l pt_BR.UTF-8
182Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
183com o SNMP da UCD. Com este pacote é possível a criação de programas
184para uso no gerenciamento de redes.
185
186%description devel -l ru.UTF-8
187Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
188использования с утилитами управления сетью проекта net-snmp.
189
190%description devel -l uk.UTF-8
191Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
192використання з утилітами керування мережею проекту net-snmp.
193
194%package static
195Summary: Static net-snmp libraries
196Summary(pl.UTF-8): Statyczne biblioteki net-snmp
197Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp
198Summary(ru.UTF-8): Статические библиотеки для проекта net-snmp
199Summary(uk.UTF-8): Статичні бібліотеки для проекту net-snmp
200Group: Development/Libraries
201Requires: %{name}-devel = %{version}-%{release}
202Obsoletes: ucd-snmp-static
203
204%description static
205Static net-snmp libraries.
206
207%description static -l pl.UTF-8
208Statyczne biblioteki net-snmp.
209
210%description static -l pt_BR.UTF-8
211Bibliotecas estáticas para desenvolvimento com net-snmp.
212
213%package compat-devel
214Summary: The development environment for the UCD-SNMP project
215Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
216Summary(pl.UTF-8): Pliki dla programistów używających bibliotek UCD-SNMP
217Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
218Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
219Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
220Group: Development/Libraries
221Requires: %{name}-libs = %{version}-%{release}
222Requires: openssl-devel >= 0.9.7d
223Obsoletes: cmu-snmp-devel
224Obsoletes: ucd-snmp-devel
225
226%description compat-devel
227The ucd-snmp-devel package contains the development libraries and
228header files for use with the UCD-SNMP project's network management
229tools.
230
231%description compat-devel -l es.UTF-8
232Estas son las bibliotecas y archivos de inclusión para desarrollo con
233el SNMP de la UCD. Con este paquete es posible la creación de
234programas para uso en la gestión de redes.
235
236%description compat-devel -l pl.UTF-8
237Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju
238aplikacji używających protokołu SNMP.
239
240%description compat-devel -l pt_BR.UTF-8
241Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
242com o SNMP da UCD. Com este pacote é possível a criação de programas
243para uso no gerenciamento de redes.
244
245%description compat-devel -l ru.UTF-8
246Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
247использования с утилитами управления сетью проекта UCD-SNMP.
248
249%description compat-devel -l uk.UTF-8
250Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
251використання з утилітами керування мережею проекту UCD-SNMP.
252
253%package compat-static
254Summary: Static UCD-SNMP libraries
255Summary(pl.UTF-8): Statyczne biblioteki UCD-SNMP
256Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp
257Summary(ru.UTF-8): Статические библиотеки для проекта UCD-SNMP
258Summary(uk.UTF-8): Статичні бібліотеки для проекту UCD-SNMP
259Group: Development/Libraries
260Requires: %{name}-compat-devel = %{version}-%{release}
261Obsoletes: ucd-snmp-static
262
263%description compat-static
264Static UCD-SNMP libraries.
265
266%description compat-static -l pl.UTF-8
267Statyczne biblioteki UCD-SNMP.
268
269%description compat-static -l pt_BR.UTF-8
270Bibliotecas estáticas para desenvolvimento com ucd-snmp.
271
272%package mibs
273Summary: MIB database
274Summary(pl.UTF-8): Baza danych MIB
275Group: Applications/System
276Conflicts: ucd-snmp-libs
277
278%description mibs
279MIB database.
280
281%description mibs -l pl.UTF-8
282Baza danych MIB.
283
284%package snmptrapd
285Summary: SNMP trap daemon
286Summary(pl.UTF-8): Demon obsługujący pułapki SNMP
287Group: Applications/System
288Requires(post,preun): /sbin/chkconfig
289Requires: %{name} = %{version}-%{release}
290Requires: rc-scripts >= 0.2.0
291Obsoletes: cmu-snmp-utils
292Obsoletes: ucd-snmp-snmptrapd
293
294%description snmptrapd
295The ucd-snmp-snmptrapd package contains snmp trap daemon.
296
297%description snmptrapd -l pl.UTF-8
298Pakiet zawiera demon obsługujący pułapki SNMP.
299
300%package utils
301Summary: Network management utilities using SNMP, from the NET-SNMP project
302Summary(es.UTF-8): Utilitarios del SNMP de la UCD
303Summary(pl.UTF-8): Narzędzia używające protokołu SNMP
304Summary(pt_BR.UTF-8): Utilitários do SNMP da UCD
305Summary(ru.UTF-8): Утилиты управления сетью по SNMP из проекта NET-SNMP
306Summary(uk.UTF-8): Утиліти керування мережею по SNMP з проекту NET-SNMP
307Group: Applications/System
308Requires: %{name}-libs = %{version}-%{release}
ab44d410 309Requires: %{name}-mibs = %{version}-%{release}
6139ec4c 310Obsoletes: cmu-snmp-utils
311Obsoletes: ucd-snmp-utils
312
313%description utils
314This package contains various utilities for managing your network
315using the SNMP protocol.
316
317%description utils -l es.UTF-8
318Varios utilitarios para uso con el SNMP de la UCD. Contiene
319utilitarios como: snmpwalk, snmptest y otros.
320
321%description utils -l pl.UTF-8
322Różnego rodzaju narzędzia do zarządzania siecią przy użyciu protokołu
323SNMP.
324
325%description utils -l pt_BR.UTF-8
326Vários utilitários para uso com o SNMP da UCD. Contém utilitários
327como: snmpwalk, snmptest e outros.
328
329%description utils -l ru.UTF-8
330Пакет ucd-snmp-utils содержит разнообразные утилиты для использования
331в проекте управления сетью net-snmp.
332
333%description utils -l uk.UTF-8
334Пакет ucd-snmp-utils містить різноманітні утиліти для використання в
335проекті керування мережею net-snmp.
336
337%package -n perl-SNMP
338Summary: SNMP and NetSNMP::* Perl modules
339Summary(pl.UTF-8): Moduły Perla SNMP oraz NetSNMP::*
340Group: Development/Languages/Perl
341Requires: %{name}-libs = %{version}-%{release}
342Conflicts: ucd-snmp-utils-perl
343
344%description -n perl-SNMP
345SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp.
346
347%description -n perl-SNMP -l pl.UTF-8
348Moduły Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp.
349
350%package utils-perl
351Summary: Perl utilities for network management using SNMP
352Summary(pl.UTF-8): Perlowe narzędzia używające protokołu SNMP
353Group: Applications/System
354Requires: perl-SNMP = %{version}-%{release}
355Obsoletes: cmu-snmp-utils
356Obsoletes: ucd-snmp-utils-perl
357
358%description utils-perl
359This package contains various Perl utilities for managing your network
360using the SNMP protocol.
361
362%description utils-perl -l pl.UTF-8
363Perlowe narzędzia do zarządzania siecią przy użyciu protokołu SNMP.
364
365%package snmpconf
366Summary: snmpconf - creating and modifying SNMP configuration files
367Summary(pl.UTF-8): snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP
368Group: Applications/System
369Requires: %{name} = %{version}-%{release}
370Requires: perl-SNMP = %{version}-%{release}
371
372%description snmpconf
373snmpconf is a simple Perl script that walks you through setting up a
374configuration file step by step. It should be fairly straight forward
375to use.
376
377%description snmpconf -l pl.UTF-8
378snmpconf to prosty skrypt Perla pozwalający na tworzenie pliku
379konfiguracyjnego krok po kroku. Powinien być w miarę prosty w użyciu.
380
381%package tkmib
382Summary: MIB browser in Tk
383Summary(pl.UTF-8): Przeglądarka MIB-ów w Tk
384Group: Applications/System
385Requires: perl-SNMP = %{version}-%{release}
386Requires: perl-Tk
387
388%description tkmib
389MIB browser in Tk.
390
391%description tkmib -l pl.UTF-8
392Przeglądarka MIB-ów w Tk.
393
394%package -n python-netsnmp
395Summary: Python netsnmp extension module
396Summary(pl.UTF-8): Moduł rozszerzenia netsnmp dla Pythona
397Group: Libraries/Python
398Requires: %{name}-libs = %{version}-%{release}
399
400%description -n python-netsnmp
401The 'netsnmp' Python extension module provides a full featured,
402tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
403
404%description -n python-netsnmp -l pl.UTF-8
405Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
406SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
407
408%prep
409%setup -q -a7
410%patch0 -p1
411%patch1 -p1
412%patch2 -p1
413%patch3 -p1
414%patch4 -p1
415%patch5 -p1
416%patch6 -p1
417%patch7 -p1
418%patch8 -p1
419%patch9 -p1
420%patch10 -p1
ab44d410 421%patch11 -p1
c90fcf09
ER
422%patch12 -p3
423%patch13 -p1
6139ec4c 424
425%build
426%{__libtoolize}
427%{__aclocal}
428%{__autoconf}
429%{__autoheader}
430%configure \
431 --disable-debugging \
432 --enable-as-needed \
1807fdee 433 %{!?with_static_libs:--disable-static} \
6139ec4c 434 --with-cflags="%{rpmcflags} -I/usr/include/et" \
435 --with-ldflags="%{rpmldflags}" \
436 --with-defaults \
437 --with-default-snmp-version=3 \
438 %{?with_kerberos5:--with-krb5=%{_prefix}} \
439 %{!?with_kerberos5:--without-krb5} \
440 --with-openssl=%{_prefix} \
441 --with-libwrap=%{_prefix} \
442 --with-logfile="%{logfile}" \
443 --with-zlib=%{_prefix} \
444 --with-bzip2=%{_prefix} \
c90fcf09
ER
445 --with%{!?with_perl:out}-perl-modules \
446 --with%{!?with_python:out}-python-modules \
6139ec4c 447 --with-mib-modules="host agentx smux mibII/mta_sendmail \
448%ifarch %{ix86} %{x8664}
449%if %{with lm_sensors}
450 ucd-snmp/lmSensors \
451%endif
452%endif
453 disman/event disman/schedule ucd-snmp/diskio \
454 target misc/ipfwacc" \
455 %{?with_kerberos5:--with-security-modules="ksm"} \
456 --with-sys-contact="root@localhost" \
457 --with-sys-location="Unknown" \
458 --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback " \
459 --with-persistent-directory="/var/lib/net-snmp" \
460 --enable-ucd-snmp-compatibility \
461 --enable-ipv6 \
462 --with%{!?with_rpm:out}-rpm
463
464%{__make} -j1
465
466cd perl
467
468%{__perl} Makefile.PL \
469 -NET-SNMP-IN-SOURCE=true \
470 INSTALLDIRS=vendor \
471 OPTIMIZE="%{rpmcflags}" \
472 </dev/null
473
474# avoid rpaths generated by MakeMaker
475perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
476
477%{__make} \
478 LDFLAGS="%{rpmldflags}"
479
480%install
481rm -rf $RPM_BUILD_ROOT
482install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log}
483
484%{__make} install \
485 DESTDIR=$RPM_BUILD_ROOT
486
487install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
488:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf
489:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf
490:> $RPM_BUILD_ROOT%{logfile}
491
492install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
493install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
494install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd
495
496install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
497install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
498install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
499
500#install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \
501# $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
502
503cd perl
504%{__make} install \
505 DESTDIR=$RPM_BUILD_ROOT
506
507install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
508install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
509cd ..
510
511# IP-Filter (non-Linux)
512rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
513
514rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
515rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl
516rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
517
c459e35c 518%if %{with static_libs}
10765a43
ER
519# hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument
520for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do
521 rm -f *.o *.a
522 ar x $a DynaLoader.a
523 if [ -f DynaLoader.a ]; then
524 ar x DynaLoader.a
525 ar cr $a DynaLoader.o
526 ar d $a DynaLoader.a
527 # remove second file too
528 ar d $a DynaLoader.a
529 fi
530done
c90fcf09
ER
531%else
532rm -f $RPM_BUILD_ROOT%{_libdir}/libsnmp.a
c459e35c 533%endif
10765a43 534
6139ec4c 535%clean
536rm -rf $RPM_BUILD_ROOT
537
538%post
539touch %{logfile}
540chmod 640 %{logfile}
541/sbin/chkconfig --add snmpd
542%service snmpd restart "snmpd daemon"
543
544%preun
545if [ "$1" = "0" ]; then
546 %service snmpd stop
547 /sbin/chkconfig --del snmpd
548fi
549
550%post libs -p /sbin/ldconfig
551%postun libs -p /sbin/ldconfig
552
553%triggerpostun -- ucd-snmp
554/sbin/chkconfig --add snmpd
555
556%post snmptrapd
557touch %{logfile}
558chmod 640 %{logfile}
559/sbin/chkconfig --add snmptrapd
560%service snmptrapd restart "snmp trap daemon"
561
562%preun snmptrapd
563if [ "$1" = "0" ]; then
564 %service snmptrapd stop
565 /sbin/chkconfig --del snmptrapd
566fi
567
568%triggerpostun snmptrapd -- ucd-snmp-snmptrapd
569/sbin/chkconfig --add snmptrapd
570
571%files
572%defattr(644,root,root,755)
573%doc README local
574%doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
575%doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
576
577%attr(754,root,root) /etc/rc.d/init.d/snmpd
578%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
579
580%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
581%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
582
583%attr(755,root,root) %{_sbindir}/snmpd
584
585%{_mandir}/man5/snmpd.conf.5*
586%{_mandir}/man5/snmpd.examples.5*
587%{_mandir}/man5/snmpd.internal.5*
588%{_mandir}/man5/variables.5*
589%{_mandir}/man8/snmpd.8*
590
591%attr(640,root,root) %ghost %{logfile}
592
593%files libs
594%defattr(644,root,root,755)
595%dir %{_sysconfdir}/snmp
c90fcf09
ER
596%attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*
597%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*
598%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*
599%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*
600%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*
601%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.15
602%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.15
603%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.15
604%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.15
605%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.15
6139ec4c 606
607%files devel
608%defattr(644,root,root,755)
609%attr(755,root,root) %{_bindir}/mib2c
610%attr(755,root,root) %{_bindir}/mib2c-update
611%attr(755,root,root) %{_bindir}/net-snmp-config
c90fcf09
ER
612%attr(755,root,root) %{_libdir}/libnetsnmp.so
613%attr(755,root,root) %{_libdir}/libnetsnmpagent.so
614%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so
615%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so
616%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so
617%{_libdir}/libnetsnmp.la
618%{_libdir}/libnetsnmpagent.la
619%{_libdir}/libnetsnmphelpers.la
620%{_libdir}/libnetsnmpmibs.la
621%{_libdir}/libnetsnmptrapd.la
6139ec4c 622%{_includedir}/net-snmp
623%{_datadir}/snmp/mib2c*
624%{_mandir}/man1/mib2c.1*
625%{_mandir}/man1/mib2c-update.1*
626%{_mandir}/man1/net-snmp-config.1*
627%{_mandir}/man3/[!NS]*
628%{_mandir}/man5/mib2c.conf.5*
629
1807fdee 630%if %{with static_libs}
6139ec4c 631%files static
632%defattr(644,root,root,755)
633%{_libdir}/libnet*.a
1807fdee 634%endif
6139ec4c 635
636%files compat-devel
637%defattr(644,root,root,755)
638%attr(755,root,root) %{_libdir}/libsnmp.so
639%{_libdir}/libsnmp.la
640%{_includedir}/ucd-snmp
641
1807fdee 642%if %{with static_libs}
6139ec4c 643%files compat-static
644%defattr(644,root,root,755)
645%{_libdir}/libsnmp.a
1807fdee 646%endif
6139ec4c 647
648%files mibs
649%defattr(644,root,root,755)
650%dir %{_datadir}/snmp
651%{_datadir}/snmp/mibs
652
653%files snmptrapd
654%defattr(644,root,root,755)
655%attr(755,root,root) %{_sbindir}/snmptrapd
656%attr(754,root,root) /etc/rc.d/init.d/snmptrapd
657%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
658%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
659%if %{with perl}
660%attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
661%endif
662%{_mandir}/man5/snmptrapd.conf.5*
663%{_mandir}/man8/snmptrapd.8*
664
665%files utils
666%defattr(644,root,root,755)
667%attr(755,root,root) %{_bindir}/encode_keychange
668%attr(755,root,root) %{_bindir}/snmpbulkget
669%attr(755,root,root) %{_bindir}/snmpbulkwalk
670%attr(755,root,root) %{_bindir}/snmpdelta
671%attr(755,root,root) %{_bindir}/snmpdf
672%attr(755,root,root) %{_bindir}/snmpget
673%attr(755,root,root) %{_bindir}/snmpgetnext
674%attr(755,root,root) %{_bindir}/snmpinform
675%attr(755,root,root) %{_bindir}/snmpnetstat
676%attr(755,root,root) %{_bindir}/snmpset
677%attr(755,root,root) %{_bindir}/snmpstatus
678%attr(755,root,root) %{_bindir}/snmptable
679%attr(755,root,root) %{_bindir}/snmptest
680%attr(755,root,root) %{_bindir}/snmptranslate
681%attr(755,root,root) %{_bindir}/snmptrap
682%attr(755,root,root) %{_bindir}/snmpusm
683%attr(755,root,root) %{_bindir}/snmpvacm
684%attr(755,root,root) %{_bindir}/snmpwalk
685%{_mandir}/man1/encode_keychange.1*
686%{_mandir}/man1/snmpbulkget.1*
687%{_mandir}/man1/snmpbulkwalk.1*
688%{_mandir}/man1/snmpcmd.1*
689%{_mandir}/man1/snmpdelta.1*
690%{_mandir}/man1/snmpdf.1*
691%{_mandir}/man1/snmpget.1*
692%{_mandir}/man1/snmpgetnext.1*
693%{_mandir}/man1/snmpinform.1*
694%{_mandir}/man1/snmpnetstat.1*
695%{_mandir}/man1/snmpset.1*
696%{_mandir}/man1/snmpstatus.1*
697%{_mandir}/man1/snmptable.1*
698%{_mandir}/man1/snmptest.1*
699%{_mandir}/man1/snmptranslate.1*
700%{_mandir}/man1/snmptrap.1*
701%{_mandir}/man1/snmpusm.1*
702%{_mandir}/man1/snmpvacm.1*
703%{_mandir}/man1/snmpwalk.1*
704%{_mandir}/man5/snmp.conf.5*
705%{_mandir}/man5/snmp_config.5*
706
707%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf
708
709%if %{with perl}
710%files -n perl-SNMP
711%defattr(644,root,root,755)
712%doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
713%{perl_vendorarch}/SNMP.pm
714%{perl_vendorarch}/NetSNMP
715%dir %{perl_vendorarch}/auto/SNMP
716%{perl_vendorarch}/auto/SNMP/autosplit.ix
717%{perl_vendorarch}/auto/SNMP/SNMP.bs
718%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
719%dir %{perl_vendorarch}/auto/NetSNMP
720%dir %{perl_vendorarch}/auto/NetSNMP/*
721%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
722%{perl_vendorarch}/auto/NetSNMP/*/*.bs
723%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
724%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
725%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
726%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
727%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
728%{_mandir}/man3/NetSNMP::*.3*
729%{_mandir}/man3/SNMP.3*
730%{_examplesdir}/perl-SNMP-%{version}
731
732%files utils-perl
733%defattr(644,root,root,755)
734%attr(755,root,root) %{_bindir}/fixproc
735%attr(755,root,root) %{_bindir}/snmpcheck
736%attr(755,root,root) %{_bindir}/traptoemail
737%{_mandir}/man1/fixproc.1*
738%{_mandir}/man1/traptoemail.1*
739%endif
740
741%files snmpconf
742%defattr(644,root,root,755)
743%attr(755,root,root) %{_bindir}/snmpconf
744%{_mandir}/man1/snmpconf.1*
745%{_datadir}/snmp/snmpconf-data
746
747%if %{with perl}
748%files tkmib
749%defattr(644,root,root,755)
750%attr(755,root,root) %{_bindir}/tkmib
751%{_mandir}/man1/tkmib.1*
752%endif
753
754%if %{with python}
755%files -n python-netsnmp
756%defattr(644,root,root,755)
757%dir %{py_sitedir}/netsnmp
758%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
759%{py_sitedir}/netsnmp/*.py[co]
6139ec4c 760%endif
This page took 0.140289 seconds and 4 git commands to generate.