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