]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
- release 17
[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
c704c8de 31Release: 17
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}
eca4ed56 432cp -f /usr/share/automake/config.sub .
ea774f60 433%configure \
27b5f5a2
JR
434 --disable-debugging \
435 --enable-as-needed \
c4627f0b 436 %{!?with_static_libs:--disable-static} \
f42492ff 437 --with-cflags="%{rpmcflags} -I/usr/include/et" \
ea774f60 438 --with-ldflags="%{rpmldflags}" \
c74e79f9
JB
439 --with-defaults \
440 --with-default-snmp-version=3 \
7470cbdb 441 %{?with_kerberos5:--with-krb5=%{_prefix}} \
1c79f0b7 442 %{!?with_kerberos5:--without-krb5} \
27b5f5a2
JR
443 --with-openssl=%{_prefix} \
444 --with-libwrap=%{_prefix} \
c74e79f9 445 --with-logfile="%{logfile}" \
27b5f5a2
JR
446 --with-zlib=%{_prefix} \
447 --with-bzip2=%{_prefix} \
ff4ab342 448 --with%{!?with_perl:out}-perl-modules \
449 --with%{!?with_python:out}-python-modules \
27b5f5a2
JR
450 --with-mib-modules="host agentx smux mibII/mta_sendmail \
451%ifarch %{ix86} %{x8664}
1b8b7a85 452%if %{with lm_sensors}
0e59b3ea 453 ucd-snmp/lmsensorsMib \
7470cbdb 454%endif
27b5f5a2
JR
455%endif
456 disman/event disman/schedule ucd-snmp/diskio \
457 target misc/ipfwacc" \
7470cbdb 458 %{?with_kerberos5:--with-security-modules="ksm"} \
ea774f60 459 --with-sys-contact="root@localhost" \
c74e79f9
JB
460 --with-sys-location="Unknown" \
461 --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback " \
27b5f5a2
JR
462 --with-persistent-directory="/var/lib/net-snmp" \
463 --enable-ucd-snmp-compatibility \
7470cbdb
JK
464 --enable-ipv6 \
465 --with%{!?with_rpm:out}-rpm
2d4ec541 466
cb52cd5b 467%{__make} -j1
ea774f60 468
531ca0ff 469cd perl
531ca0ff 470
531ca0ff 471%{__perl} Makefile.PL \
2b15ac96 472 -NET-SNMP-IN-SOURCE=true \
531ca0ff 473 INSTALLDIRS=vendor \
2b15ac96 474 OPTIMIZE="%{rpmcflags}" \
531ca0ff 475 </dev/null
2b15ac96 476
531ca0ff
JB
477# avoid rpaths generated by MakeMaker
478perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
479
d59f5301
JK
480%{__make} \
481 LDFLAGS="%{rpmldflags}"
ea774f60
AF
482
483%install
484rm -rf $RPM_BUILD_ROOT
fa43c632 485install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log}
ea774f60 486
6789d157 487%{__make} install \
543e900e 488 DESTDIR=$RPM_BUILD_ROOT
ea774f60 489
6810e918
AF
490install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
491:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf
6e818aed 492:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf
e93f5ac2 493:> $RPM_BUILD_ROOT%{logfile}
ea774f60 494
60e7e283 495install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
6810e918 496install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
60e7e283 497install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd
ea774f60 498
60e7e283 499install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
6810e918 500install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
60e7e283 501install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
ea774f60
AF
502
503#install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \
504# $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
505
531ca0ff
JB
506cd perl
507%{__make} install \
508 DESTDIR=$RPM_BUILD_ROOT
9274a72b 509
531ca0ff
JB
510install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
511install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
b572d007 512cd ..
ea774f60 513
9274a72b
JB
514# IP-Filter (non-Linux)
515rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
516
7f35dfac 517rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
3a0b5f9c
ER
518rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl
519rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
7f35dfac 520
c4627f0b
ER
521%if %{with static_libs}
522# hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument
523for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do
524 rm -f *.o *.a
525 ar x $a DynaLoader.a
526 if [ -f DynaLoader.a ]; then
527 ar x DynaLoader.a
528 ar cr $a DynaLoader.o
529 ar d $a DynaLoader.a
530 # remove second file too
531 ar d $a DynaLoader.a
532 fi
533done
2bacb8e1
ER
534%else
535rm -f $RPM_BUILD_ROOT%{_libdir}/libsnmp.a
c4627f0b
ER
536%endif
537
ea774f60
AF
538%clean
539rm -rf $RPM_BUILD_ROOT
540
e93f5ac2 541%post
ea774f60
AF
542touch %{logfile}
543chmod 640 %{logfile}
fa43c632
ER
544/sbin/chkconfig --add snmpd
545%service snmpd restart "snmpd daemon"
ea774f60 546
60e7e283
AF
547%preun
548if [ "$1" = "0" ]; then
fa43c632 549 %service snmpd stop
60e7e283
AF
550 /sbin/chkconfig --del snmpd
551fi
ea774f60
AF
552
553%post libs -p /sbin/ldconfig
554%postun libs -p /sbin/ldconfig
555
5b201584
JB
556%triggerpostun -- ucd-snmp
557/sbin/chkconfig --add snmpd
558
e93f5ac2 559%post snmptrapd
ea774f60
AF
560touch %{logfile}
561chmod 640 %{logfile}
fa43c632
ER
562/sbin/chkconfig --add snmptrapd
563%service snmptrapd restart "snmp trap daemon"
ea774f60 564
60e7e283
AF
565%preun snmptrapd
566if [ "$1" = "0" ]; then
fa43c632 567 %service snmptrapd stop
60e7e283
AF
568 /sbin/chkconfig --del snmptrapd
569fi
ea774f60 570
605b587c 571%triggerpostun snmptrapd -- ucd-snmp-snmptrapd
5b201584
JB
572/sbin/chkconfig --add snmptrapd
573
ea774f60
AF
574%files
575%defattr(644,root,root,755)
576%doc README local
577%doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
578%doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
579
60e7e283 580%attr(754,root,root) /etc/rc.d/init.d/snmpd
9e8f34e2 581%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
ea774f60 582
9e8f34e2
JB
583%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
584%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
ea774f60
AF
585
586%attr(755,root,root) %{_sbindir}/snmpd
587
ea774f60 588%{_mandir}/man5/snmpd.conf.5*
a23e7817
JB
589%{_mandir}/man5/snmpd.examples.5*
590%{_mandir}/man5/snmpd.internal.5*
ea774f60 591%{_mandir}/man5/variables.5*
531ca0ff 592%{_mandir}/man8/snmpd.8*
ea774f60 593
e93f5ac2 594%attr(640,root,root) %ghost %{logfile}
ea774f60
AF
595
596%files libs
597%defattr(644,root,root,755)
e043d0db 598%dir %{_sysconfdir}/snmp
2bacb8e1
ER
599%attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*
600%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*
601%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*
602%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*
603%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*
604%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.15
605%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.15
606%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.15
607%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.15
608%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.15
ea774f60 609
531ca0ff
JB
610%files devel
611%defattr(644,root,root,755)
612%attr(755,root,root) %{_bindir}/mib2c
f2ba5e16 613%attr(755,root,root) %{_bindir}/mib2c-update
531ca0ff 614%attr(755,root,root) %{_bindir}/net-snmp-config
2bacb8e1
ER
615%attr(755,root,root) %{_libdir}/libnetsnmp.so
616%attr(755,root,root) %{_libdir}/libnetsnmpagent.so
617%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so
618%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so
619%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so
620%{_libdir}/libnetsnmp.la
621%{_libdir}/libnetsnmpagent.la
622%{_libdir}/libnetsnmphelpers.la
623%{_libdir}/libnetsnmpmibs.la
624%{_libdir}/libnetsnmptrapd.la
531ca0ff
JB
625%{_includedir}/net-snmp
626%{_datadir}/snmp/mib2c*
627%{_mandir}/man1/mib2c.1*
a5fe3234
JB
628%{_mandir}/man1/mib2c-update.1*
629%{_mandir}/man1/net-snmp-config.1*
bdee8ff5 630%{_mandir}/man3/[!NS]*
f2ba5e16 631%{_mandir}/man5/mib2c.conf.5*
531ca0ff 632
c4627f0b 633%if %{with static_libs}
531ca0ff
JB
634%files static
635%defattr(644,root,root,755)
636%{_libdir}/libnet*.a
c4627f0b 637%endif
531ca0ff 638
531ca0ff
JB
639%files compat-devel
640%defattr(644,root,root,755)
641%attr(755,root,root) %{_libdir}/libsnmp.so
642%{_libdir}/libsnmp.la
643%{_includedir}/ucd-snmp
644
c4627f0b 645%if %{with static_libs}
531ca0ff
JB
646%files compat-static
647%defattr(644,root,root,755)
648%{_libdir}/libsnmp.a
c4627f0b 649%endif
531ca0ff 650
60e7e283
AF
651%files mibs
652%defattr(644,root,root,755)
ee807caf 653%dir %{_datadir}/snmp
ea774f60
AF
654%{_datadir}/snmp/mibs
655
531ca0ff 656%files snmptrapd
60e7e283 657%defattr(644,root,root,755)
531ca0ff
JB
658%attr(755,root,root) %{_sbindir}/snmptrapd
659%attr(754,root,root) /etc/rc.d/init.d/snmptrapd
9e8f34e2
JB
660%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
661%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
7470cbdb 662%if %{with perl}
f2ba5e16 663%attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
7470cbdb 664%endif
531ca0ff
JB
665%{_mandir}/man5/snmptrapd.conf.5*
666%{_mandir}/man8/snmptrapd.8*
60e7e283 667
ea774f60
AF
668%files utils
669%defattr(644,root,root,755)
670%attr(755,root,root) %{_bindir}/encode_keychange
671%attr(755,root,root) %{_bindir}/snmpbulkget
672%attr(755,root,root) %{_bindir}/snmpbulkwalk
673%attr(755,root,root) %{_bindir}/snmpdelta
6789d157 674%attr(755,root,root) %{_bindir}/snmpdf
ea774f60
AF
675%attr(755,root,root) %{_bindir}/snmpget
676%attr(755,root,root) %{_bindir}/snmpgetnext
6789d157 677%attr(755,root,root) %{_bindir}/snmpinform
ea774f60
AF
678%attr(755,root,root) %{_bindir}/snmpnetstat
679%attr(755,root,root) %{_bindir}/snmpset
680%attr(755,root,root) %{_bindir}/snmpstatus
681%attr(755,root,root) %{_bindir}/snmptable
682%attr(755,root,root) %{_bindir}/snmptest
683%attr(755,root,root) %{_bindir}/snmptranslate
684%attr(755,root,root) %{_bindir}/snmptrap
685%attr(755,root,root) %{_bindir}/snmpusm
ea774f60 686%attr(755,root,root) %{_bindir}/snmpvacm
6789d157 687%attr(755,root,root) %{_bindir}/snmpwalk
a5fe3234 688%{_mandir}/man1/encode_keychange.1*
ea774f60
AF
689%{_mandir}/man1/snmpbulkget.1*
690%{_mandir}/man1/snmpbulkwalk.1*
691%{_mandir}/man1/snmpcmd.1*
692%{_mandir}/man1/snmpdelta.1*
6789d157 693%{_mandir}/man1/snmpdf.1*
ea774f60
AF
694%{_mandir}/man1/snmpget.1*
695%{_mandir}/man1/snmpgetnext.1*
6789d157 696%{_mandir}/man1/snmpinform.1*
ea774f60
AF
697%{_mandir}/man1/snmpnetstat.1*
698%{_mandir}/man1/snmpset.1*
699%{_mandir}/man1/snmpstatus.1*
700%{_mandir}/man1/snmptable.1*
701%{_mandir}/man1/snmptest.1*
702%{_mandir}/man1/snmptranslate.1*
703%{_mandir}/man1/snmptrap.1*
704%{_mandir}/man1/snmpusm.1*
6789d157 705%{_mandir}/man1/snmpvacm.1*
ea774f60 706%{_mandir}/man1/snmpwalk.1*
ea774f60
AF
707%{_mandir}/man5/snmp.conf.5*
708%{_mandir}/man5/snmp_config.5*
709
7bb0c439 710%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf
6e818aed 711
7470cbdb 712%if %{with perl}
531ca0ff 713%files -n perl-SNMP
c4deead5 714%defattr(644,root,root,755)
531ca0ff
JB
715%doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
716%{perl_vendorarch}/SNMP.pm
717%{perl_vendorarch}/NetSNMP
718%dir %{perl_vendorarch}/auto/SNMP
719%{perl_vendorarch}/auto/SNMP/autosplit.ix
720%{perl_vendorarch}/auto/SNMP/SNMP.bs
721%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
722%dir %{perl_vendorarch}/auto/NetSNMP
723%dir %{perl_vendorarch}/auto/NetSNMP/*
724%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
725%{perl_vendorarch}/auto/NetSNMP/*/*.bs
726%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
727%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
728%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
729%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
730%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
731%{_mandir}/man3/NetSNMP::*.3*
732%{_mandir}/man3/SNMP.3*
733%{_examplesdir}/perl-SNMP-%{version}
734
ea774f60
AF
735%files utils-perl
736%defattr(644,root,root,755)
6789d157 737%attr(755,root,root) %{_bindir}/fixproc
60e7e283 738%attr(755,root,root) %{_bindir}/snmpcheck
6810e918 739%attr(755,root,root) %{_bindir}/traptoemail
a5fe3234
JB
740%{_mandir}/man1/fixproc.1*
741%{_mandir}/man1/traptoemail.1*
7470cbdb 742%endif
531ca0ff
JB
743
744%files snmpconf
4ec38672 745%defattr(644,root,root,755)
531ca0ff 746%attr(755,root,root) %{_bindir}/snmpconf
60e7e283
AF
747%{_mandir}/man1/snmpconf.1*
748%{_datadir}/snmp/snmpconf-data
e93f5ac2 749
7470cbdb 750%if %{with perl}
e93f5ac2
AF
751%files tkmib
752%defattr(644,root,root,755)
4ec38672 753%attr(755,root,root) %{_bindir}/tkmib
a5fe3234 754%{_mandir}/man1/tkmib.1*
7470cbdb 755%endif
a5fe3234 756
7470cbdb 757%if %{with python}
a5fe3234
JB
758%files -n python-netsnmp
759%defattr(644,root,root,755)
760%dir %{py_sitedir}/netsnmp
761%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
762%{py_sitedir}/netsnmp/*.py[co]
763%{py_sitedir}/netsnmp_python-*.egg-info
7470cbdb 764%endif
This page took 0.17541 seconds and 4 git commands to generate.