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