]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
- release 3
[packages/net-snmp.git] / net-snmp.spec
CommitLineData
ff3b83c0 1# TODO
8795945f
ER
2# - package or remove:
3# %{_datadir}/snmp/snmp_perl.pl
0ef2b96e 4# - make noarch -n mibs-net-snmp package (need separate .spec then)
15c329ac 5# - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
990f7362 6# - php-snmp (and likely other bindings) use only %{_libdir}/libnetsnmp.so.*, move other libs back to main (daemon) package?
ad841d97
JB
7#
8# Conditional build:
9%bcond_without autodeps # don't BR packages only for deps resolving
7470cbdb
JK
10%bcond_without rpm # don't include RPM support
11%bcond_without kerberos5 # don't include kerberos support
12%bcond_without lm_sensors # don't include sensors support
13%bcond_without perl # don't include Perl modules and utils
14%bcond_without python # don't include Python modules
c4627f0b 15%bcond_without static_libs # don't build static library
15c329ac
ER
16
17%ifnarch %{ix86} %{x8664}
18%undefine with_lm_sensors
19%endif
20
cf3659bc
AM
21%define so_version 20
22
ea774f60
AF
23%include /usr/lib/rpm/macros.perl
24Summary: A collection of SNMP protocol tools
7d4e48ba
ER
25Summary(es.UTF-8): Agente SNMP de la UCD
26Summary(pl.UTF-8): Kolekcja narzędzi do obsługi protokołu SNMP
27Summary(pt_BR.UTF-8): Agente SNMP da UCD
28Summary(ru.UTF-8): Набор утилит для протокола SNMP от UC-Davis
29Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis
ea774f60 30Name: net-snmp
849c236b 31Version: 5.5
5dc35ac1 32Release: 3
ea774f60
AF
33License: BSD-like
34Group: Networking/Daemons
35Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
849c236b 36# Source0-md5: 5b2551e7bd024fbbee84dca22a5f13a1
ea774f60 37Source1: %{name}d.init
6810e918 38Source2: %{name}d.conf
ea774f60
AF
39Source3: %{name}d.sysconfig
40Source4: %{name}trapd.init
6810e918 41Source5: %{name}trapd.conf
ea774f60 42Source6: %{name}trapd.sysconfig
ee18f99a 43Source7: ucd-ipchains.tar.gz
6789d157 44# Source7-md5: 29949f1008f1a04d6efefd5b3ea607da
ee18f99a
AM
45Patch0: %{name}-acfix.patch
46Patch1: %{name}-rpm-implicit-libs.patch
47Patch2: %{name}-config-noflags.patch
82f38c90
JB
48Patch3: %{name}-manpage.patch
49Patch4: %{name}-link.patch
50Patch5: %{name}-llinterfaces.patch
51Patch6: %{name}-kernel_headers.patch
52Patch7: %{name}-rpmpath.patch
53Patch8: %{name}-snmpksm.patch
54Patch9: %{name}-python.patch
713ab55c 55Patch10: %{name}-lvalue.patch
9f68faa0 56Patch11: %{name}-defaultconfig.patch
c4627f0b 57Patch12: %{name}-use-rpm-hrmib.patch
cf3659bc 58Patch13: net-snmp-5.5-missing-bcast.patch
0e59b3ea 59Patch14: %{name}-lm_sensors_3.patch
cf3659bc 60Patch15: net-snmp-5.5-tcp-pid.patch
5d80d411 61Patch17: %{name}-TCP_STATS_CACHE_TIMEOUT.patch
ff3b83c0 62Patch19: %{name}-loadave-writable.patch
ea774f60 63URL: http://www.net-snmp.org/
82f38c90 64BuildRequires: autoconf >= 2.61-3
ea774f60 65BuildRequires: automake
e43a09d3 66BuildRequires: elfutils-devel
335d4745 67%{?with_kerberos5:BuildRequires: heimdal-devel}
24482372 68BuildRequires: libnl-devel >= 1:1.1
ea774f60
AF
69BuildRequires: libtool >= 1.4
70BuildRequires: libwrap-devel
0e59b3ea 71%{?with_lm_sensors:BuildRequires: lm_sensors-devel >= 3.0.1}
2e25f11c 72BuildRequires: openssl-devel >= 0.9.7d
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
fa43c632 85BuildRequires: rpmbuild(macros) >= 1.268
ea774f60 86Requires(post,preun): /sbin/chkconfig
b0389a15 87Requires: %{name}-libs = %{version}-%{release}
ea774f60 88Requires: /usr/bin/setsid
0ef2b96e 89Requires: mibs-%{name} = %{version}-%{release}
b0389a15 90Requires: rc-scripts >= 0.2.0
ea774f60 91Provides: snmpd
ea774f60
AF
92Obsoletes: cmu-snmp
93Obsoletes: snmpd
e93f5ac2 94Obsoletes: ucd-snmp
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
ea774f60 162%package devel
531ca0ff 163Summary: The development environment for the net-snmp project
7d4e48ba
ER
164Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
165Summary(pl.UTF-8): Pliki dla programistów używających bibliotek net-snmp
166Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
167Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
168Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
ea774f60 169Group: Development/Libraries
9274a72b 170Requires: %{name}-libs = %{version}-%{release}
e43a09d3 171Requires: elfutils-devel
335d4745 172%{?with_kerberos5:Requires: heimdal-devel}
ba3da9c3 173Requires: libnl-devel >= 1:1.1
b0389a15 174Requires: libwrap-devel
0e59b3ea 175%{?with_lm_sensors:Requires: lm_sensors-devel >= 3.0.1}
8d251b9e 176Requires: openssl-devel >= 0.9.7c
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
9274a72b
JB
233Requires: %{name}-libs = %{version}-%{release}
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
531ca0ff 291
15c329ac
ER
292%description -n mibs-net-snmp
293Net-SNMP provided MIBs (Management Information Base).
531ca0ff 294
15c329ac 295%description -n mibs-net-snmp -l pl.UTF-8
531ca0ff
JB
296Baza danych MIB.
297
298%package snmptrapd
299Summary: SNMP trap daemon
7d4e48ba 300Summary(pl.UTF-8): Demon obsługujący pułapki SNMP
531ca0ff 301Group: Applications/System
531ca0ff 302Requires(post,preun): /sbin/chkconfig
b0389a15
ER
303Requires: %{name} = %{version}-%{release}
304Requires: rc-scripts >= 0.2.0
531ca0ff
JB
305Obsoletes: cmu-snmp-utils
306Obsoletes: ucd-snmp-snmptrapd
307
308%description snmptrapd
309The ucd-snmp-snmptrapd package contains snmp trap daemon.
310
b1738c7c
JR
311%description snmptrapd -l pl.UTF-8
312Pakiet zawiera demon obsługujący pułapki SNMP.
531ca0ff
JB
313
314%package utils
315Summary: Network management utilities using SNMP, from the NET-SNMP project
7d4e48ba
ER
316Summary(es.UTF-8): Utilitarios del SNMP de la UCD
317Summary(pl.UTF-8): Narzędzia używające protokołu SNMP
318Summary(pt_BR.UTF-8): Utilitários do SNMP da UCD
319Summary(ru.UTF-8): Утилиты управления сетью по SNMP из проекта NET-SNMP
320Summary(uk.UTF-8): Утиліти керування мережею по SNMP з проекту NET-SNMP
531ca0ff 321Group: Applications/System
9274a72b 322Requires: %{name}-libs = %{version}-%{release}
0ef2b96e 323Suggests: mibs-%{name} = %{version}-%{release}
531ca0ff
JB
324Obsoletes: cmu-snmp-utils
325Obsoletes: ucd-snmp-utils
326
327%description utils
328This package contains various utilities for managing your network
329using the SNMP protocol.
330
b1738c7c 331%description utils -l es.UTF-8
531ca0ff
JB
332Varios utilitarios para uso con el SNMP de la UCD. Contiene
333utilitarios como: snmpwalk, snmptest y otros.
334
b1738c7c
JR
335%description utils -l pl.UTF-8
336Różnego rodzaju narzędzia do zarządzania siecią przy użyciu protokołu
531ca0ff
JB
337SNMP.
338
b1738c7c
JR
339%description utils -l pt_BR.UTF-8
340Vários utilitários para uso com o SNMP da UCD. Contém utilitários
531ca0ff
JB
341como: snmpwalk, snmptest e outros.
342
b1738c7c
JR
343%description utils -l ru.UTF-8
344Пакет ucd-snmp-utils содержит разнообразные утилиты для использования
345в проекте управления сетью net-snmp.
531ca0ff 346
b1738c7c
JR
347%description utils -l uk.UTF-8
348Пакет ucd-snmp-utils містить різноманітні утиліти для використання в
349проекті керування мережею net-snmp.
531ca0ff
JB
350
351%package -n perl-SNMP
352Summary: SNMP and NetSNMP::* Perl modules
7d4e48ba 353Summary(pl.UTF-8): Moduły Perla SNMP oraz NetSNMP::*
531ca0ff 354Group: Development/Languages/Perl
9274a72b
JB
355Requires: %{name}-libs = %{version}-%{release}
356Conflicts: ucd-snmp-utils-perl
531ca0ff
JB
357
358%description -n perl-SNMP
359SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp.
360
b1738c7c
JR
361%description -n perl-SNMP -l pl.UTF-8
362Moduły Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp.
531ca0ff
JB
363
364%package utils-perl
365Summary: Perl utilities for network management using SNMP
7d4e48ba 366Summary(pl.UTF-8): Perlowe narzędzia używające protokołu SNMP
531ca0ff 367Group: Applications/System
9274a72b 368Requires: perl-SNMP = %{version}-%{release}
531ca0ff
JB
369Obsoletes: cmu-snmp-utils
370Obsoletes: ucd-snmp-utils-perl
371
372%description utils-perl
373This package contains various Perl utilities for managing your network
374using the SNMP protocol.
375
b1738c7c
JR
376%description utils-perl -l pl.UTF-8
377Perlowe narzędzia do zarządzania siecią przy użyciu protokołu SNMP.
e93f5ac2
AF
378
379%package snmpconf
531ca0ff 380Summary: snmpconf - creating and modifying SNMP configuration files
7d4e48ba 381Summary(pl.UTF-8): snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP
e93f5ac2 382Group: Applications/System
9274a72b
JB
383Requires: %{name} = %{version}-%{release}
384Requires: perl-SNMP = %{version}-%{release}
e93f5ac2
AF
385
386%description snmpconf
531ca0ff
JB
387snmpconf is a simple Perl script that walks you through setting up a
388configuration file step by step. It should be fairly straight forward
389to use.
390
b1738c7c
JR
391%description snmpconf -l pl.UTF-8
392snmpconf to prosty skrypt Perla pozwalający na tworzenie pliku
393konfiguracyjnego krok po kroku. Powinien być w miarę prosty w użyciu.
e93f5ac2
AF
394
395%package tkmib
2ffae1a4 396Summary: MIB browser in Tk
7d4e48ba 397Summary(pl.UTF-8): Przeglądarka MIB-ów w Tk
e93f5ac2 398Group: Applications/System
9274a72b 399Requires: perl-SNMP = %{version}-%{release}
531ca0ff 400Requires: perl-Tk
e93f5ac2
AF
401
402%description tkmib
2ffae1a4 403MIB browser in Tk.
531ca0ff 404
b1738c7c
JR
405%description tkmib -l pl.UTF-8
406Przeglądarka MIB-ów w Tk.
e93f5ac2 407
a5fe3234
JB
408%package -n python-netsnmp
409Summary: Python netsnmp extension module
7d4e48ba 410Summary(pl.UTF-8): Moduł rozszerzenia netsnmp dla Pythona
a5fe3234
JB
411Group: Libraries/Python
412Requires: %{name}-libs = %{version}-%{release}
413
414%description -n python-netsnmp
415The 'netsnmp' Python extension module provides a full featured,
416tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
417
b1738c7c
JR
418%description -n python-netsnmp -l pl.UTF-8
419Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
420SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
a5fe3234 421
ea774f60 422%prep
797d6879 423%setup -q -a7
ea774f60
AF
424%patch1 -p1
425%patch2 -p1
426%patch3 -p1
531ca0ff 427%patch4 -p1
edf6eebd
JB
428%patch5 -p1
429%patch6 -p1
8a2022cc 430%patch7 -p1
9274a72b 431%patch8 -p1
f42492ff 432%patch9 -p1
713ab55c 433%patch10 -p1
9f68faa0 434%patch11 -p1
c4627f0b 435%patch12 -p1
cf3659bc
AM
436%patch13 -p1
437%patch14 -p1
438%patch15 -p1
5d80d411 439%patch17 -p1
ff3b83c0 440%patch19 -p1
ea774f60
AF
441
442%build
443%{__libtoolize}
849c236b 444%{__aclocal} -I m4
ea774f60 445%{__autoconf}
564bc1fe 446%{__autoheader}
eca4ed56 447cp -f /usr/share/automake/config.sub .
15c329ac
ER
448
449MIBS="\
450host agentx smux \
451mibII/mta_sendmail \
452disman/event disman/schedule \
453ucd-snmp/diskio \
454target \
455misc/ipfwacc \
456"
457
458%if %{with lm_sensors}
459MIBS="$MIBS ucd-snmp/lmsensorsMib"
460%endif
461
ea774f60 462%configure \
27b5f5a2
JR
463 --disable-debugging \
464 --enable-as-needed \
c4627f0b 465 %{!?with_static_libs:--disable-static} \
c05d0e2e 466 --with-cflags="%{rpmcflags} %{rpmcppflags} -I/usr/include/et" \
ea774f60 467 --with-ldflags="%{rpmldflags}" \
c74e79f9
JB
468 --with-defaults \
469 --with-default-snmp-version=3 \
7470cbdb 470 %{?with_kerberos5:--with-krb5=%{_prefix}} \
1c79f0b7 471 %{!?with_kerberos5:--without-krb5} \
27b5f5a2
JR
472 --with-openssl=%{_prefix} \
473 --with-libwrap=%{_prefix} \
c74e79f9 474 --with-logfile="%{logfile}" \
27b5f5a2
JR
475 --with-zlib=%{_prefix} \
476 --with-bzip2=%{_prefix} \
ff4ab342 477 --with%{!?with_perl:out}-perl-modules \
478 --with%{!?with_python:out}-python-modules \
2d9facbb 479 --enable-local-smux \
15c329ac
ER
480 --with-mibdirs='$HOME/.snmp/mibs:/usr/share/mibs:%{_datadir}/snmp/mibs' \
481 --with-mib-modules="$MIBS" \
7470cbdb 482 %{?with_kerberos5:--with-security-modules="ksm"} \
ea774f60 483 --with-sys-contact="root@localhost" \
c74e79f9 484 --with-sys-location="Unknown" \
2d9facbb 485 --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback" \
27b5f5a2
JR
486 --with-persistent-directory="/var/lib/net-snmp" \
487 --enable-ucd-snmp-compatibility \
7470cbdb
JK
488 --enable-ipv6 \
489 --with%{!?with_rpm:out}-rpm
2d4ec541 490
cb52cd5b 491%{__make} -j1
ea774f60 492
531ca0ff 493cd perl
531ca0ff 494
531ca0ff 495%{__perl} Makefile.PL \
2b15ac96 496 -NET-SNMP-IN-SOURCE=true \
531ca0ff 497 INSTALLDIRS=vendor \
c05d0e2e 498 OPTIMIZE="%{rpmcflags} %{rpmcppflags}" \
531ca0ff 499 </dev/null
2b15ac96 500
531ca0ff
JB
501# avoid rpaths generated by MakeMaker
502perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
503
d59f5301
JK
504%{__make} \
505 LDFLAGS="%{rpmldflags}"
ea774f60
AF
506
507%install
508rm -rf $RPM_BUILD_ROOT
d85a4807 509install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log,/var/lib/net-snmp,%{_libdir}/snmp/dlmod}
ea774f60 510
3793442d 511%{__make} -j1 install \
15c329ac 512 mibdir=%{_datadir}/mibs \
543e900e 513 DESTDIR=$RPM_BUILD_ROOT
ea774f60 514
6810e918
AF
515install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
516:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf
6e818aed 517:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf
e93f5ac2 518:> $RPM_BUILD_ROOT%{logfile}
ea774f60 519
60e7e283 520install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
6810e918 521install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
60e7e283 522install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd
ea774f60 523
60e7e283 524install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
6810e918 525install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
60e7e283 526install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
ea774f60 527
531ca0ff 528cd perl
3793442d 529%{__make} -j1 install \
531ca0ff 530 DESTDIR=$RPM_BUILD_ROOT
9274a72b 531
531ca0ff
JB
532install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
533install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
b572d007 534cd ..
ea774f60 535
9274a72b
JB
536# IP-Filter (non-Linux)
537rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
538
7f35dfac 539rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
3a0b5f9c
ER
540rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl
541rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
7f35dfac 542
c4627f0b
ER
543%if %{with static_libs}
544# hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument
545for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do
546 rm -f *.o *.a
547 ar x $a DynaLoader.a
548 if [ -f DynaLoader.a ]; then
549 ar x DynaLoader.a
550 ar cr $a DynaLoader.o
551 ar d $a DynaLoader.a
552 # remove second file too
553 ar d $a DynaLoader.a
554 fi
555done
2bacb8e1
ER
556%else
557rm -f $RPM_BUILD_ROOT%{_libdir}/libsnmp.a
c4627f0b
ER
558%endif
559
8aa6620b 560%if %{with python}
ae60ec22
JB
561%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/tests
562%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py
8aa6620b 563%endif
ae60ec22 564
ea774f60
AF
565%clean
566rm -rf $RPM_BUILD_ROOT
567
e93f5ac2 568%post
ea774f60
AF
569touch %{logfile}
570chmod 640 %{logfile}
fa43c632
ER
571/sbin/chkconfig --add snmpd
572%service snmpd restart "snmpd daemon"
ea774f60 573
60e7e283
AF
574%preun
575if [ "$1" = "0" ]; then
fa43c632 576 %service snmpd stop
60e7e283
AF
577 /sbin/chkconfig --del snmpd
578fi
ea774f60
AF
579
580%post libs -p /sbin/ldconfig
581%postun libs -p /sbin/ldconfig
582
5b201584
JB
583%triggerpostun -- ucd-snmp
584/sbin/chkconfig --add snmpd
585
e93f5ac2 586%post snmptrapd
ea774f60
AF
587touch %{logfile}
588chmod 640 %{logfile}
fa43c632
ER
589/sbin/chkconfig --add snmptrapd
590%service snmptrapd restart "snmp trap daemon"
ea774f60 591
60e7e283
AF
592%preun snmptrapd
593if [ "$1" = "0" ]; then
fa43c632 594 %service snmptrapd stop
60e7e283
AF
595 /sbin/chkconfig --del snmptrapd
596fi
ea774f60 597
605b587c 598%triggerpostun snmptrapd -- ucd-snmp-snmptrapd
5b201584
JB
599/sbin/chkconfig --add snmptrapd
600
ea774f60
AF
601%files
602%defattr(644,root,root,755)
603%doc README local
604%doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
605%doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
606
60e7e283 607%attr(754,root,root) /etc/rc.d/init.d/snmpd
9e8f34e2 608%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
ea774f60 609
9e8f34e2
JB
610%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
611%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
ea774f60
AF
612
613%attr(755,root,root) %{_sbindir}/snmpd
cf3659bc 614%attr(755,root,root) %{_bindir}/net-snmp-create-v3-user
ea774f60 615
230d3f00
ER
616%dir %{_libdir}/snmp
617%dir %{_libdir}/snmp/dlmod
618
cf3659bc 619%{_mandir}/man1/net-snmp-create-v3-user.1*
ea774f60 620%{_mandir}/man5/snmpd.conf.5*
a23e7817
JB
621%{_mandir}/man5/snmpd.examples.5*
622%{_mandir}/man5/snmpd.internal.5*
ea774f60 623%{_mandir}/man5/variables.5*
531ca0ff 624%{_mandir}/man8/snmpd.8*
ea774f60 625
96249811
ER
626%dir %attr(700,root,root) /var/lib/net-snmp
627
e93f5ac2 628%attr(640,root,root) %ghost %{logfile}
ea774f60
AF
629
630%files libs
631%defattr(644,root,root,755)
e043d0db 632%dir %{_sysconfdir}/snmp
0e10a309 633%dir %{_datadir}/snmp
2bacb8e1
ER
634%attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*
635%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*
636%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*
07ee8549 637%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*
638%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*
cf3659bc
AM
639%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.%{so_version}
640%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.%{so_version}
641%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.%{so_version}
642%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.%{so_version}
643%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.%{so_version}
ea774f60 644
531ca0ff
JB
645%files devel
646%defattr(644,root,root,755)
647%attr(755,root,root) %{_bindir}/mib2c
f2ba5e16 648%attr(755,root,root) %{_bindir}/mib2c-update
531ca0ff 649%attr(755,root,root) %{_bindir}/net-snmp-config
2bacb8e1
ER
650%attr(755,root,root) %{_libdir}/libnetsnmp.so
651%attr(755,root,root) %{_libdir}/libnetsnmpagent.so
652%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so
07ee8549 653%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so
654%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so
2bacb8e1
ER
655%{_libdir}/libnetsnmp.la
656%{_libdir}/libnetsnmpagent.la
657%{_libdir}/libnetsnmphelpers.la
07ee8549 658%{_libdir}/libnetsnmpmibs.la
659%{_libdir}/libnetsnmptrapd.la
531ca0ff
JB
660%{_includedir}/net-snmp
661%{_datadir}/snmp/mib2c*
662%{_mandir}/man1/mib2c.1*
a5fe3234
JB
663%{_mandir}/man1/mib2c-update.1*
664%{_mandir}/man1/net-snmp-config.1*
bdee8ff5 665%{_mandir}/man3/[!NS]*
f2ba5e16 666%{_mandir}/man5/mib2c.conf.5*
531ca0ff 667
c4627f0b 668%if %{with static_libs}
531ca0ff
JB
669%files static
670%defattr(644,root,root,755)
671%{_libdir}/libnet*.a
c4627f0b 672%endif
531ca0ff 673
531ca0ff
JB
674%files compat-devel
675%defattr(644,root,root,755)
676%attr(755,root,root) %{_libdir}/libsnmp.so
677%{_libdir}/libsnmp.la
678%{_includedir}/ucd-snmp
679
c4627f0b 680%if %{with static_libs}
531ca0ff
JB
681%files compat-static
682%defattr(644,root,root,755)
683%{_libdir}/libsnmp.a
c4627f0b 684%endif
531ca0ff 685
15c329ac 686%files -n mibs-net-snmp
60e7e283 687%defattr(644,root,root,755)
15c329ac 688%{_datadir}/mibs/*.txt
ea774f60 689
531ca0ff 690%files snmptrapd
60e7e283 691%defattr(644,root,root,755)
531ca0ff
JB
692%attr(755,root,root) %{_sbindir}/snmptrapd
693%attr(754,root,root) /etc/rc.d/init.d/snmptrapd
9e8f34e2
JB
694%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
695%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
7470cbdb 696%if %{with perl}
f2ba5e16 697%attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
7470cbdb 698%endif
531ca0ff
JB
699%{_mandir}/man5/snmptrapd.conf.5*
700%{_mandir}/man8/snmptrapd.8*
60e7e283 701
ea774f60
AF
702%files utils
703%defattr(644,root,root,755)
704%attr(755,root,root) %{_bindir}/encode_keychange
705%attr(755,root,root) %{_bindir}/snmpbulkget
706%attr(755,root,root) %{_bindir}/snmpbulkwalk
707%attr(755,root,root) %{_bindir}/snmpdelta
6789d157 708%attr(755,root,root) %{_bindir}/snmpdf
ea774f60
AF
709%attr(755,root,root) %{_bindir}/snmpget
710%attr(755,root,root) %{_bindir}/snmpgetnext
6789d157 711%attr(755,root,root) %{_bindir}/snmpinform
ea774f60
AF
712%attr(755,root,root) %{_bindir}/snmpnetstat
713%attr(755,root,root) %{_bindir}/snmpset
714%attr(755,root,root) %{_bindir}/snmpstatus
715%attr(755,root,root) %{_bindir}/snmptable
716%attr(755,root,root) %{_bindir}/snmptest
717%attr(755,root,root) %{_bindir}/snmptranslate
718%attr(755,root,root) %{_bindir}/snmptrap
719%attr(755,root,root) %{_bindir}/snmpusm
ea774f60 720%attr(755,root,root) %{_bindir}/snmpvacm
6789d157 721%attr(755,root,root) %{_bindir}/snmpwalk
a5fe3234 722%{_mandir}/man1/encode_keychange.1*
ea774f60
AF
723%{_mandir}/man1/snmpbulkget.1*
724%{_mandir}/man1/snmpbulkwalk.1*
725%{_mandir}/man1/snmpcmd.1*
726%{_mandir}/man1/snmpdelta.1*
6789d157 727%{_mandir}/man1/snmpdf.1*
ea774f60
AF
728%{_mandir}/man1/snmpget.1*
729%{_mandir}/man1/snmpgetnext.1*
6789d157 730%{_mandir}/man1/snmpinform.1*
ea774f60
AF
731%{_mandir}/man1/snmpnetstat.1*
732%{_mandir}/man1/snmpset.1*
733%{_mandir}/man1/snmpstatus.1*
734%{_mandir}/man1/snmptable.1*
735%{_mandir}/man1/snmptest.1*
736%{_mandir}/man1/snmptranslate.1*
737%{_mandir}/man1/snmptrap.1*
738%{_mandir}/man1/snmpusm.1*
6789d157 739%{_mandir}/man1/snmpvacm.1*
ea774f60 740%{_mandir}/man1/snmpwalk.1*
ea774f60
AF
741%{_mandir}/man5/snmp.conf.5*
742%{_mandir}/man5/snmp_config.5*
743
7bb0c439 744%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf
6e818aed 745
7470cbdb 746%if %{with perl}
531ca0ff 747%files -n perl-SNMP
c4deead5 748%defattr(644,root,root,755)
531ca0ff
JB
749%doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
750%{perl_vendorarch}/SNMP.pm
751%{perl_vendorarch}/NetSNMP
752%dir %{perl_vendorarch}/auto/SNMP
753%{perl_vendorarch}/auto/SNMP/autosplit.ix
754%{perl_vendorarch}/auto/SNMP/SNMP.bs
755%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
756%dir %{perl_vendorarch}/auto/NetSNMP
757%dir %{perl_vendorarch}/auto/NetSNMP/*
758%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
759%{perl_vendorarch}/auto/NetSNMP/*/*.bs
760%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
761%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
762%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
763%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
764%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
765%{_mandir}/man3/NetSNMP::*.3*
766%{_mandir}/man3/SNMP.3*
767%{_examplesdir}/perl-SNMP-%{version}
768
ea774f60
AF
769%files utils-perl
770%defattr(644,root,root,755)
6789d157 771%attr(755,root,root) %{_bindir}/fixproc
60e7e283 772%attr(755,root,root) %{_bindir}/snmpcheck
6810e918 773%attr(755,root,root) %{_bindir}/traptoemail
a5fe3234
JB
774%{_mandir}/man1/fixproc.1*
775%{_mandir}/man1/traptoemail.1*
7470cbdb 776%endif
531ca0ff
JB
777
778%files snmpconf
4ec38672 779%defattr(644,root,root,755)
531ca0ff 780%attr(755,root,root) %{_bindir}/snmpconf
60e7e283
AF
781%{_mandir}/man1/snmpconf.1*
782%{_datadir}/snmp/snmpconf-data
e93f5ac2 783
7470cbdb 784%if %{with perl}
e93f5ac2
AF
785%files tkmib
786%defattr(644,root,root,755)
4ec38672 787%attr(755,root,root) %{_bindir}/tkmib
a5fe3234 788%{_mandir}/man1/tkmib.1*
7470cbdb 789%endif
a5fe3234 790
7470cbdb 791%if %{with python}
a5fe3234
JB
792%files -n python-netsnmp
793%defattr(644,root,root,755)
794%dir %{py_sitedir}/netsnmp
795%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
796%{py_sitedir}/netsnmp/*.py[co]
797%{py_sitedir}/netsnmp_python-*.egg-info
7470cbdb 798%endif
This page took 0.248565 seconds and 4 git commands to generate.