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