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