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