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