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