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