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