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