]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
enable lm_sensors on x32
[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 14
185a8961 15%ifnarch %{ix86} %{x8664} x32
15c329ac
ER
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
85a0d7b3 28Version: 5.7.3
185a8961 29Release: 3
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
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
85a0d7b3 51
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
b0389a15 85Requires: %{name}-libs = %{version}-%{release}
ea774f60 86Requires: /usr/bin/setsid
0ef2b96e 87Requires: mibs-%{name} = %{version}-%{release}
4ea247ad 88Requires: rc-scripts >= 0.4.3.0
ea774f60 89Provides: snmpd
ea774f60
AF
90Obsoletes: cmu-snmp
91Obsoletes: snmpd
e93f5ac2 92Obsoletes: ucd-snmp
1b8f0285 93Conflicts: pciutils < 3.1.7-5
c4627f0b 94Conflicts: rpm < 4.4.9-43.11
fa43c632 95BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
ea774f60 96
37498b4b
AM
97# linking libraries is ugly in this package
98%define no_install_post_check_so 1
99
ea774f60
AF
100%define logfile /var/log/snmpd.log
101
102%description
103SNMP (Simple Network Management Protocol) is a protocol used for
531ca0ff 104network management (hence the name). The net-snmp project includes
ea774f60
AF
105various SNMP tools: an extensible agent, an SNMP library, tools for
106requesting or setting information from SNMP agents, tools for
107generating and handling SNMP traps, a version of the netstat command
108which uses SNMP, and a Tk/Perl mib browser. This package contains the
109snmpd daemon, documentation, etc.
110
b1738c7c
JR
111%description -l es.UTF-8
112Este paquete se deriva de la implementación del Protocolo Simple de
113Gestión de Redes versión 2 (SNMPv2) de la Universidad Carnegie Mellon.
114Útil para administrar redes y hacer contabilidad.
115
116%description -l pl.UTF-8
117SNMP (Simple Network Management Protocol) jest protokołem używanym do
118zarządzania sieciami. Pakiet zawiera narzędzia: rozbudowywalnego
119agenta, bibliotekę SNMP, narzędzia do odpytywania oraz ustawiania
120informacji poprzez agentów SNMP, narzędzia do generowania i obsługi
121pułapek SNMP, wersję komendy netstat używającą SNMP, przeglądarkę mib
122w Tk/Perl, demona, dokumentację itp.
123
124%description -l pt_BR.UTF-8
125Este pacote é derivado da implementação do Protocolo Simples de
126Gerenciamento de Redes versão 2 (SNMPv2) da Universidade Carnegie
127Mellon. Útil para gerenciar redes e fazer contabilidade.
128
129%description -l ru.UTF-8
130SNMP (Simple Network Management Protocol) - это протокол, используемый
131для управления сетью (отсюда и название). Проект net-snmp включает
132разнообразные SNMP-утилиты: расширяемый агент, библиотека SNMP,
133утилиты для запроса или установки информации от SNMP-агентов, утилиты
134для генерации и обработки SNMP-трапов, версия команды netstat,
135использующей SNMP, и mib-браузер на Tk/Perl. Этот пакет содержит
136демоны snmpd и snmptrapd, документацию и т.д.
137
138%description -l uk.UTF-8
139SNMP (Simple Network Management Protocol) - це протокол, який
140використовують для керування мережею (звідси і назва). Проект net-snmp
141містить різноманітні SNMP-утиліти: розширюваний агент, бібліотека
142SNMP, утиліти для запросу та встановлення інформації від NMP-агентів,
143утиліти для генерації та обробки SNMP-трапів, версія команди netstat,
144яка використовує SNMP, та mib-браузер на Tk/Perl. Цей пакет містить
145демони snmpd та snmptrapd, документацію і т.і.
ea774f60
AF
146
147%package libs
e93f5ac2 148Summary: NET SNMP libraries
7d4e48ba 149Summary(pl.UTF-8): Biblioteki SNMP
ea774f60 150Group: Libraries
0ef2b96e 151Suggests: mibs-%{name}
5ae1bff8 152Obsoletes: net-snmp-compat-libs
60e7e283 153Obsoletes: ucd-snmp-libs
ea774f60
AF
154
155%description libs
e93f5ac2 156NET SNMP libraries.
ea774f60 157
b1738c7c 158%description libs -l pl.UTF-8
ea774f60
AF
159Biblioteki SNMP.
160
ea774f60 161%package devel
531ca0ff 162Summary: The development environment for the net-snmp project
7d4e48ba
ER
163Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
164Summary(pl.UTF-8): Pliki dla programistów używających bibliotek net-snmp
165Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
166Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
167Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
ea774f60 168Group: Development/Libraries
9274a72b 169Requires: %{name}-libs = %{version}-%{release}
e43a09d3 170Requires: elfutils-devel
335d4745 171%{?with_kerberos5:Requires: heimdal-devel}
8c6ca89a 172Requires: libnl-devel >= 1:3.2
b0389a15 173Requires: libwrap-devel
0e59b3ea 174%{?with_lm_sensors:Requires: lm_sensors-devel >= 3.0.1}
8d251b9e 175Requires: openssl-devel >= 0.9.7c
34d5bbd3 176Requires: pciutils-devel
60e7e283 177Obsoletes: ucd-snmp-devel
ea774f60
AF
178
179%description devel
180The ucd-snmp-devel package contains the development libraries and
531ca0ff 181header files for use with the net-snmp project's network management
ea774f60
AF
182tools.
183
b1738c7c
JR
184%description devel -l es.UTF-8
185Estas son las bibliotecas y archivos de inclusión para desarrollo con
186el SNMP de la UCD. Con este paquete es posible la creación de
187programas para uso en la gestión de redes.
ea774f60 188
b1738c7c
JR
189%description devel -l pl.UTF-8
190Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju
191aplikacji używających protokołu SNMP.
ea774f60 192
b1738c7c
JR
193%description devel -l pt_BR.UTF-8
194Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
195com o SNMP da UCD. Com este pacote é possível a criação de programas
ea774f60
AF
196para uso no gerenciamento de redes.
197
b1738c7c
JR
198%description devel -l ru.UTF-8
199Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
200использования с утилитами управления сетью проекта net-snmp.
ea774f60 201
b1738c7c
JR
202%description devel -l uk.UTF-8
203Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
204використання з утилітами керування мережею проекту net-snmp.
ea774f60
AF
205
206%package static
531ca0ff 207Summary: Static net-snmp libraries
7d4e48ba
ER
208Summary(pl.UTF-8): Statyczne biblioteki net-snmp
209Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp
210Summary(ru.UTF-8): Статические библиотеки для проекта net-snmp
211Summary(uk.UTF-8): Статичні бібліотеки для проекту net-snmp
ea774f60 212Group: Development/Libraries
9274a72b 213Requires: %{name}-devel = %{version}-%{release}
60e7e283 214Obsoletes: ucd-snmp-static
ea774f60
AF
215
216%description static
531ca0ff 217Static net-snmp libraries.
ea774f60 218
b1738c7c 219%description static -l pl.UTF-8
531ca0ff 220Statyczne biblioteki net-snmp.
ea774f60 221
b1738c7c
JR
222%description static -l pt_BR.UTF-8
223Bibliotecas estáticas para desenvolvimento com net-snmp.
531ca0ff 224
e93f5ac2
AF
225%package compat-devel
226Summary: The development environment for the UCD-SNMP project
7d4e48ba
ER
227Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
228Summary(pl.UTF-8): Pliki dla programistów używających bibliotek UCD-SNMP
229Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
230Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
231Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
e93f5ac2 232Group: Development/Libraries
63f88f63 233Requires: %{name}-devel = %{version}-%{release}
9274a72b 234Requires: openssl-devel >= 0.9.7d
e93f5ac2
AF
235Obsoletes: cmu-snmp-devel
236Obsoletes: ucd-snmp-devel
237
238%description compat-devel
239The ucd-snmp-devel package contains the development libraries and
240header files for use with the UCD-SNMP project's network management
241tools.
242
b1738c7c
JR
243%description compat-devel -l es.UTF-8
244Estas son las bibliotecas y archivos de inclusión para desarrollo con
245el SNMP de la UCD. Con este paquete es posible la creación de
246programas para uso en la gestión de redes.
e93f5ac2 247
b1738c7c
JR
248%description compat-devel -l pl.UTF-8
249Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju
250aplikacji używających protokołu SNMP.
e93f5ac2 251
b1738c7c
JR
252%description compat-devel -l pt_BR.UTF-8
253Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
254com o SNMP da UCD. Com este pacote é possível a criação de programas
e93f5ac2
AF
255para uso no gerenciamento de redes.
256
b1738c7c
JR
257%description compat-devel -l ru.UTF-8
258Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
259использования с утилитами управления сетью проекта UCD-SNMP.
e93f5ac2 260
b1738c7c
JR
261%description compat-devel -l uk.UTF-8
262Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
263використання з утилітами керування мережею проекту UCD-SNMP.
e93f5ac2
AF
264
265%package compat-static
266Summary: Static UCD-SNMP libraries
7d4e48ba
ER
267Summary(pl.UTF-8): Statyczne biblioteki UCD-SNMP
268Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp
269Summary(ru.UTF-8): Статические библиотеки для проекта UCD-SNMP
270Summary(uk.UTF-8): Статичні бібліотеки для проекту UCD-SNMP
e93f5ac2 271Group: Development/Libraries
9274a72b 272Requires: %{name}-compat-devel = %{version}-%{release}
e93f5ac2
AF
273Obsoletes: ucd-snmp-static
274
275%description compat-static
276Static UCD-SNMP libraries.
277
b1738c7c 278%description compat-static -l pl.UTF-8
531ca0ff 279Statyczne biblioteki UCD-SNMP.
e93f5ac2 280
b1738c7c
JR
281%description compat-static -l pt_BR.UTF-8
282Bibliotecas estáticas para desenvolvimento com ucd-snmp.
531ca0ff 283
15c329ac
ER
284%package -n mibs-net-snmp
285Summary: Net-SNMP provided MIBs
7d4e48ba 286Summary(pl.UTF-8): Baza danych MIB
531ca0ff 287Group: Applications/System
15c329ac
ER
288Requires: mibs-dirs
289Obsoletes: net-snmp-mibs
9274a72b 290Conflicts: ucd-snmp-libs
fe3c0449
ER
291%if "%{_rpmversion}" >= "5"
292BuildArch: noarch
293%endif
531ca0ff 294
15c329ac
ER
295%description -n mibs-net-snmp
296Net-SNMP provided MIBs (Management Information Base).
531ca0ff 297
15c329ac 298%description -n mibs-net-snmp -l pl.UTF-8
531ca0ff
JB
299Baza danych MIB.
300
301%package snmptrapd
302Summary: SNMP trap daemon
7d4e48ba 303Summary(pl.UTF-8): Demon obsługujący pułapki SNMP
531ca0ff 304Group: Applications/System
531ca0ff 305Requires(post,preun): /sbin/chkconfig
b0389a15
ER
306Requires: %{name} = %{version}-%{release}
307Requires: rc-scripts >= 0.2.0
531ca0ff
JB
308Obsoletes: cmu-snmp-utils
309Obsoletes: ucd-snmp-snmptrapd
310
311%description snmptrapd
312The ucd-snmp-snmptrapd package contains snmp trap daemon.
313
b1738c7c
JR
314%description snmptrapd -l pl.UTF-8
315Pakiet zawiera demon obsługujący pułapki SNMP.
531ca0ff
JB
316
317%package utils
318Summary: Network management utilities using SNMP, from the NET-SNMP project
7d4e48ba
ER
319Summary(es.UTF-8): Utilitarios del SNMP de la UCD
320Summary(pl.UTF-8): Narzędzia używające protokołu SNMP
321Summary(pt_BR.UTF-8): Utilitários do SNMP da UCD
322Summary(ru.UTF-8): Утилиты управления сетью по SNMP из проекта NET-SNMP
323Summary(uk.UTF-8): Утиліти керування мережею по SNMP з проекту NET-SNMP
531ca0ff 324Group: Applications/System
9274a72b 325Requires: %{name}-libs = %{version}-%{release}
0ef2b96e 326Suggests: mibs-%{name} = %{version}-%{release}
531ca0ff
JB
327Obsoletes: cmu-snmp-utils
328Obsoletes: ucd-snmp-utils
329
330%description utils
331This package contains various utilities for managing your network
332using the SNMP protocol.
333
b1738c7c 334%description utils -l es.UTF-8
531ca0ff
JB
335Varios utilitarios para uso con el SNMP de la UCD. Contiene
336utilitarios como: snmpwalk, snmptest y otros.
337
b1738c7c
JR
338%description utils -l pl.UTF-8
339Różnego rodzaju narzędzia do zarządzania siecią przy użyciu protokołu
531ca0ff
JB
340SNMP.
341
b1738c7c
JR
342%description utils -l pt_BR.UTF-8
343Vários utilitários para uso com o SNMP da UCD. Contém utilitários
531ca0ff
JB
344como: snmpwalk, snmptest e outros.
345
b1738c7c
JR
346%description utils -l ru.UTF-8
347Пакет ucd-snmp-utils содержит разнообразные утилиты для использования
348в проекте управления сетью net-snmp.
531ca0ff 349
b1738c7c
JR
350%description utils -l uk.UTF-8
351Пакет ucd-snmp-utils містить різноманітні утиліти для використання в
352проекті керування мережею net-snmp.
531ca0ff
JB
353
354%package -n perl-SNMP
355Summary: SNMP and NetSNMP::* Perl modules
7d4e48ba 356Summary(pl.UTF-8): Moduły Perla SNMP oraz NetSNMP::*
531ca0ff 357Group: Development/Languages/Perl
9274a72b
JB
358Requires: %{name}-libs = %{version}-%{release}
359Conflicts: ucd-snmp-utils-perl
531ca0ff
JB
360
361%description -n perl-SNMP
362SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp.
363
b1738c7c
JR
364%description -n perl-SNMP -l pl.UTF-8
365Moduły Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp.
531ca0ff
JB
366
367%package utils-perl
368Summary: Perl utilities for network management using SNMP
7d4e48ba 369Summary(pl.UTF-8): Perlowe narzędzia używające protokołu SNMP
531ca0ff 370Group: Applications/System
9274a72b 371Requires: perl-SNMP = %{version}-%{release}
531ca0ff
JB
372Obsoletes: cmu-snmp-utils
373Obsoletes: ucd-snmp-utils-perl
374
375%description utils-perl
376This package contains various Perl utilities for managing your network
377using the SNMP protocol.
378
b1738c7c
JR
379%description utils-perl -l pl.UTF-8
380Perlowe narzędzia do zarządzania siecią przy użyciu protokołu SNMP.
e93f5ac2
AF
381
382%package snmpconf
531ca0ff 383Summary: snmpconf - creating and modifying SNMP configuration files
7d4e48ba 384Summary(pl.UTF-8): snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP
e93f5ac2 385Group: Applications/System
9274a72b
JB
386Requires: %{name} = %{version}-%{release}
387Requires: perl-SNMP = %{version}-%{release}
e93f5ac2
AF
388
389%description snmpconf
531ca0ff
JB
390snmpconf is a simple Perl script that walks you through setting up a
391configuration file step by step. It should be fairly straight forward
392to use.
393
b1738c7c
JR
394%description snmpconf -l pl.UTF-8
395snmpconf to prosty skrypt Perla pozwalający na tworzenie pliku
396konfiguracyjnego krok po kroku. Powinien być w miarę prosty w użyciu.
e93f5ac2
AF
397
398%package tkmib
2ffae1a4 399Summary: MIB browser in Tk
7d4e48ba 400Summary(pl.UTF-8): Przeglądarka MIB-ów w Tk
e93f5ac2 401Group: Applications/System
9274a72b 402Requires: perl-SNMP = %{version}-%{release}
531ca0ff 403Requires: perl-Tk
e93f5ac2
AF
404
405%description tkmib
2ffae1a4 406MIB browser in Tk.
531ca0ff 407
b1738c7c
JR
408%description tkmib -l pl.UTF-8
409Przeglądarka MIB-ów w Tk.
e93f5ac2 410
a5fe3234
JB
411%package -n python-netsnmp
412Summary: Python netsnmp extension module
7d4e48ba 413Summary(pl.UTF-8): Moduł rozszerzenia netsnmp dla Pythona
a5fe3234
JB
414Group: Libraries/Python
415Requires: %{name}-libs = %{version}-%{release}
416
417%description -n python-netsnmp
418The 'netsnmp' Python extension module provides a full featured,
419tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
420
b1738c7c
JR
421%description -n python-netsnmp -l pl.UTF-8
422Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
423SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
a5fe3234 424
ea774f60 425%prep
797d6879 426%setup -q -a7
ea774f60
AF
427%patch1 -p1
428%patch2 -p1
429%patch3 -p1
531ca0ff 430%patch4 -p1
edf6eebd
JB
431%patch5 -p1
432%patch6 -p1
8a2022cc 433%patch7 -p1
85a0d7b3 434
f42492ff 435%patch9 -p1
713ab55c 436%patch10 -p1
9f68faa0 437%patch11 -p1
c4627f0b 438%patch12 -p1
cf3659bc 439%patch13 -p1
b59aa974 440
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 \
8718936e 466 ac_cv_path_DPKG_QUERY_PATH= \
27b5f5a2 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 \
15fed34e 483 --with-mibdirs='$HOME/.snmp/mibs:/usr/share/mibs' \
15c329ac 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
531ca0ff
JB
767%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
768%dir %{perl_vendorarch}/auto/NetSNMP
769%dir %{perl_vendorarch}/auto/NetSNMP/*
770%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
531ca0ff
JB
771%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
772%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
773%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
531ca0ff
JB
774%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
775%{_mandir}/man3/NetSNMP::*.3*
776%{_mandir}/man3/SNMP.3*
777%{_examplesdir}/perl-SNMP-%{version}
778
ea774f60
AF
779%files utils-perl
780%defattr(644,root,root,755)
6789d157 781%attr(755,root,root) %{_bindir}/fixproc
afbe2a1a
JB
782%attr(755,root,root) %{_bindir}/net-snmp-cert
783%attr(755,root,root) %{_bindir}/snmp-bridge-mib
60e7e283 784%attr(755,root,root) %{_bindir}/snmpcheck
6810e918 785%attr(755,root,root) %{_bindir}/traptoemail
a5fe3234 786%{_mandir}/man1/fixproc.1*
afbe2a1a 787%{_mandir}/man1/snmp-bridge-mib.1*
a5fe3234 788%{_mandir}/man1/traptoemail.1*
7470cbdb 789%endif
531ca0ff
JB
790
791%files snmpconf
4ec38672 792%defattr(644,root,root,755)
531ca0ff 793%attr(755,root,root) %{_bindir}/snmpconf
60e7e283
AF
794%{_mandir}/man1/snmpconf.1*
795%{_datadir}/snmp/snmpconf-data
e93f5ac2 796
7470cbdb 797%if %{with perl}
e93f5ac2
AF
798%files tkmib
799%defattr(644,root,root,755)
4ec38672 800%attr(755,root,root) %{_bindir}/tkmib
a5fe3234 801%{_mandir}/man1/tkmib.1*
7470cbdb 802%endif
a5fe3234 803
7470cbdb 804%if %{with python}
a5fe3234
JB
805%files -n python-netsnmp
806%defattr(644,root,root,755)
807%dir %{py_sitedir}/netsnmp
808%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
809%{py_sitedir}/netsnmp/*.py[co]
810%{py_sitedir}/netsnmp_python-*.egg-info
7470cbdb 811%endif
This page took 0.249398 seconds and 4 git commands to generate.