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