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