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