]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
- update autofoo not to link with rpm at all if using hrmib export from rpm
[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
0e59b3ea 31Release: 12
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}
ea774f60
AF
75BuildRequires: rpm-devel >= 4.0
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
7470cbdb 166%{?with_rpm:Requires: rpm-devel}
60e7e283 167Obsoletes: ucd-snmp-devel
ea774f60
AF
168
169%description devel
170The ucd-snmp-devel package contains the development libraries and
531ca0ff 171header files for use with the net-snmp project's network management
ea774f60
AF
172tools.
173
b1738c7c
JR
174%description devel -l es.UTF-8
175Estas son las bibliotecas y archivos de inclusión para desarrollo con
176el SNMP de la UCD. Con este paquete es posible la creación de
177programas para uso en la gestión de redes.
ea774f60 178
b1738c7c
JR
179%description devel -l pl.UTF-8
180Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju
181aplikacji używających protokołu SNMP.
ea774f60 182
b1738c7c
JR
183%description devel -l pt_BR.UTF-8
184Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
185com o SNMP da UCD. Com este pacote é possível a criação de programas
ea774f60
AF
186para uso no gerenciamento de redes.
187
b1738c7c
JR
188%description devel -l ru.UTF-8
189Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
190использования с утилитами управления сетью проекта net-snmp.
ea774f60 191
b1738c7c
JR
192%description devel -l uk.UTF-8
193Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
194використання з утилітами керування мережею проекту net-snmp.
ea774f60
AF
195
196%package static
531ca0ff 197Summary: Static net-snmp libraries
7d4e48ba
ER
198Summary(pl.UTF-8): Statyczne biblioteki net-snmp
199Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp
200Summary(ru.UTF-8): Статические библиотеки для проекта net-snmp
201Summary(uk.UTF-8): Статичні бібліотеки для проекту net-snmp
ea774f60 202Group: Development/Libraries
9274a72b 203Requires: %{name}-devel = %{version}-%{release}
60e7e283 204Obsoletes: ucd-snmp-static
ea774f60
AF
205
206%description static
531ca0ff 207Static net-snmp libraries.
ea774f60 208
b1738c7c 209%description static -l pl.UTF-8
531ca0ff 210Statyczne biblioteki net-snmp.
ea774f60 211
b1738c7c
JR
212%description static -l pt_BR.UTF-8
213Bibliotecas estáticas para desenvolvimento com net-snmp.
531ca0ff 214
e93f5ac2
AF
215%package compat-devel
216Summary: The development environment for the UCD-SNMP project
7d4e48ba
ER
217Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
218Summary(pl.UTF-8): Pliki dla programistów używających bibliotek UCD-SNMP
219Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
220Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
221Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
e93f5ac2 222Group: Development/Libraries
9274a72b
JB
223Requires: %{name}-libs = %{version}-%{release}
224Requires: openssl-devel >= 0.9.7d
e93f5ac2
AF
225Obsoletes: cmu-snmp-devel
226Obsoletes: ucd-snmp-devel
227
228%description compat-devel
229The ucd-snmp-devel package contains the development libraries and
230header files for use with the UCD-SNMP project's network management
231tools.
232
b1738c7c
JR
233%description compat-devel -l es.UTF-8
234Estas son las bibliotecas y archivos de inclusión para desarrollo con
235el SNMP de la UCD. Con este paquete es posible la creación de
236programas para uso en la gestión de redes.
e93f5ac2 237
b1738c7c
JR
238%description compat-devel -l pl.UTF-8
239Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju
240aplikacji używających protokołu SNMP.
e93f5ac2 241
b1738c7c
JR
242%description compat-devel -l pt_BR.UTF-8
243Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
244com o SNMP da UCD. Com este pacote é possível a criação de programas
e93f5ac2
AF
245para uso no gerenciamento de redes.
246
b1738c7c
JR
247%description compat-devel -l ru.UTF-8
248Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
249использования с утилитами управления сетью проекта UCD-SNMP.
e93f5ac2 250
b1738c7c
JR
251%description compat-devel -l uk.UTF-8
252Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
253використання з утилітами керування мережею проекту UCD-SNMP.
e93f5ac2
AF
254
255%package compat-static
256Summary: Static UCD-SNMP libraries
7d4e48ba
ER
257Summary(pl.UTF-8): Statyczne biblioteki UCD-SNMP
258Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp
259Summary(ru.UTF-8): Статические библиотеки для проекта UCD-SNMP
260Summary(uk.UTF-8): Статичні бібліотеки для проекту UCD-SNMP
e93f5ac2 261Group: Development/Libraries
9274a72b 262Requires: %{name}-compat-devel = %{version}-%{release}
e93f5ac2
AF
263Obsoletes: ucd-snmp-static
264
265%description compat-static
266Static UCD-SNMP libraries.
267
b1738c7c 268%description compat-static -l pl.UTF-8
531ca0ff 269Statyczne biblioteki UCD-SNMP.
e93f5ac2 270
b1738c7c
JR
271%description compat-static -l pt_BR.UTF-8
272Bibliotecas estáticas para desenvolvimento com ucd-snmp.
531ca0ff
JB
273
274%package mibs
275Summary: MIB database
7d4e48ba 276Summary(pl.UTF-8): Baza danych MIB
531ca0ff 277Group: Applications/System
9274a72b 278Conflicts: ucd-snmp-libs
531ca0ff
JB
279
280%description mibs
281MIB database.
282
b1738c7c 283%description mibs -l pl.UTF-8
531ca0ff
JB
284Baza danych MIB.
285
286%package snmptrapd
287Summary: SNMP trap daemon
7d4e48ba 288Summary(pl.UTF-8): Demon obsługujący pułapki SNMP
531ca0ff 289Group: Applications/System
531ca0ff 290Requires(post,preun): /sbin/chkconfig
b0389a15
ER
291Requires: %{name} = %{version}-%{release}
292Requires: rc-scripts >= 0.2.0
531ca0ff
JB
293Obsoletes: cmu-snmp-utils
294Obsoletes: ucd-snmp-snmptrapd
295
296%description snmptrapd
297The ucd-snmp-snmptrapd package contains snmp trap daemon.
298
b1738c7c
JR
299%description snmptrapd -l pl.UTF-8
300Pakiet zawiera demon obsługujący pułapki SNMP.
531ca0ff
JB
301
302%package utils
303Summary: Network management utilities using SNMP, from the NET-SNMP project
7d4e48ba
ER
304Summary(es.UTF-8): Utilitarios del SNMP de la UCD
305Summary(pl.UTF-8): Narzędzia używające protokołu SNMP
306Summary(pt_BR.UTF-8): Utilitários do SNMP da UCD
307Summary(ru.UTF-8): Утилиты управления сетью по SNMP из проекта NET-SNMP
308Summary(uk.UTF-8): Утиліти керування мережею по SNMP з проекту NET-SNMP
531ca0ff 309Group: Applications/System
9274a72b 310Requires: %{name}-libs = %{version}-%{release}
4feada3c 311Requires: %{name}-mibs = %{version}-%{release}
531ca0ff
JB
312Obsoletes: cmu-snmp-utils
313Obsoletes: ucd-snmp-utils
314
315%description utils
316This package contains various utilities for managing your network
317using the SNMP protocol.
318
b1738c7c 319%description utils -l es.UTF-8
531ca0ff
JB
320Varios utilitarios para uso con el SNMP de la UCD. Contiene
321utilitarios como: snmpwalk, snmptest y otros.
322
b1738c7c
JR
323%description utils -l pl.UTF-8
324Różnego rodzaju narzędzia do zarządzania siecią przy użyciu protokołu
531ca0ff
JB
325SNMP.
326
b1738c7c
JR
327%description utils -l pt_BR.UTF-8
328Vários utilitários para uso com o SNMP da UCD. Contém utilitários
531ca0ff
JB
329como: snmpwalk, snmptest e outros.
330
b1738c7c
JR
331%description utils -l ru.UTF-8
332Пакет ucd-snmp-utils содержит разнообразные утилиты для использования
333в проекте управления сетью net-snmp.
531ca0ff 334
b1738c7c
JR
335%description utils -l uk.UTF-8
336Пакет ucd-snmp-utils містить різноманітні утиліти для використання в
337проекті керування мережею net-snmp.
531ca0ff
JB
338
339%package -n perl-SNMP
340Summary: SNMP and NetSNMP::* Perl modules
7d4e48ba 341Summary(pl.UTF-8): Moduły Perla SNMP oraz NetSNMP::*
531ca0ff 342Group: Development/Languages/Perl
9274a72b
JB
343Requires: %{name}-libs = %{version}-%{release}
344Conflicts: ucd-snmp-utils-perl
531ca0ff
JB
345
346%description -n perl-SNMP
347SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp.
348
b1738c7c
JR
349%description -n perl-SNMP -l pl.UTF-8
350Moduły Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp.
531ca0ff
JB
351
352%package utils-perl
353Summary: Perl utilities for network management using SNMP
7d4e48ba 354Summary(pl.UTF-8): Perlowe narzędzia używające protokołu SNMP
531ca0ff 355Group: Applications/System
9274a72b 356Requires: perl-SNMP = %{version}-%{release}
531ca0ff
JB
357Obsoletes: cmu-snmp-utils
358Obsoletes: ucd-snmp-utils-perl
359
360%description utils-perl
361This package contains various Perl utilities for managing your network
362using the SNMP protocol.
363
b1738c7c
JR
364%description utils-perl -l pl.UTF-8
365Perlowe narzędzia do zarządzania siecią przy użyciu protokołu SNMP.
e93f5ac2
AF
366
367%package snmpconf
531ca0ff 368Summary: snmpconf - creating and modifying SNMP configuration files
7d4e48ba 369Summary(pl.UTF-8): snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP
e93f5ac2 370Group: Applications/System
9274a72b
JB
371Requires: %{name} = %{version}-%{release}
372Requires: perl-SNMP = %{version}-%{release}
e93f5ac2
AF
373
374%description snmpconf
531ca0ff
JB
375snmpconf is a simple Perl script that walks you through setting up a
376configuration file step by step. It should be fairly straight forward
377to use.
378
b1738c7c
JR
379%description snmpconf -l pl.UTF-8
380snmpconf to prosty skrypt Perla pozwalający na tworzenie pliku
381konfiguracyjnego krok po kroku. Powinien być w miarę prosty w użyciu.
e93f5ac2
AF
382
383%package tkmib
2ffae1a4 384Summary: MIB browser in Tk
7d4e48ba 385Summary(pl.UTF-8): Przeglądarka MIB-ów w Tk
e93f5ac2 386Group: Applications/System
9274a72b 387Requires: perl-SNMP = %{version}-%{release}
531ca0ff 388Requires: perl-Tk
e93f5ac2
AF
389
390%description tkmib
2ffae1a4 391MIB browser in Tk.
531ca0ff 392
b1738c7c
JR
393%description tkmib -l pl.UTF-8
394Przeglądarka MIB-ów w Tk.
e93f5ac2 395
a5fe3234
JB
396%package -n python-netsnmp
397Summary: Python netsnmp extension module
7d4e48ba 398Summary(pl.UTF-8): Moduł rozszerzenia netsnmp dla Pythona
a5fe3234
JB
399Group: Libraries/Python
400Requires: %{name}-libs = %{version}-%{release}
401
402%description -n python-netsnmp
403The 'netsnmp' Python extension module provides a full featured,
404tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
405
b1738c7c
JR
406%description -n python-netsnmp -l pl.UTF-8
407Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
408SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
a5fe3234 409
ea774f60 410%prep
797d6879 411%setup -q -a7
ea774f60
AF
412%patch0 -p1
413%patch1 -p1
414%patch2 -p1
415%patch3 -p1
531ca0ff 416%patch4 -p1
edf6eebd
JB
417%patch5 -p1
418%patch6 -p1
8a2022cc 419%patch7 -p1
9274a72b 420%patch8 -p1
f42492ff 421%patch9 -p1
713ab55c 422%patch10 -p1
9f68faa0 423%patch11 -p1
c4627f0b 424%patch12 -p1
273fb569 425%patch13 -p0
0e59b3ea 426%patch14 -p0
ea774f60
AF
427
428%build
429%{__libtoolize}
430%{__aclocal}
ea774f60 431%{__autoconf}
564bc1fe 432%{__autoheader}
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
534%endif
535
ea774f60
AF
536%clean
537rm -rf $RPM_BUILD_ROOT
538
e93f5ac2 539%post
ea774f60
AF
540touch %{logfile}
541chmod 640 %{logfile}
fa43c632
ER
542/sbin/chkconfig --add snmpd
543%service snmpd restart "snmpd daemon"
ea774f60 544
60e7e283
AF
545%preun
546if [ "$1" = "0" ]; then
fa43c632 547 %service snmpd stop
60e7e283
AF
548 /sbin/chkconfig --del snmpd
549fi
ea774f60
AF
550
551%post libs -p /sbin/ldconfig
552%postun libs -p /sbin/ldconfig
553
5b201584
JB
554%triggerpostun -- ucd-snmp
555/sbin/chkconfig --add snmpd
556
e93f5ac2 557%post snmptrapd
ea774f60
AF
558touch %{logfile}
559chmod 640 %{logfile}
fa43c632
ER
560/sbin/chkconfig --add snmptrapd
561%service snmptrapd restart "snmp trap daemon"
ea774f60 562
60e7e283
AF
563%preun snmptrapd
564if [ "$1" = "0" ]; then
fa43c632 565 %service snmptrapd stop
60e7e283
AF
566 /sbin/chkconfig --del snmptrapd
567fi
ea774f60 568
605b587c 569%triggerpostun snmptrapd -- ucd-snmp-snmptrapd
5b201584
JB
570/sbin/chkconfig --add snmptrapd
571
ea774f60
AF
572%files
573%defattr(644,root,root,755)
574%doc README local
575%doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
576%doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
577
60e7e283 578%attr(754,root,root) /etc/rc.d/init.d/snmpd
9e8f34e2 579%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
ea774f60 580
9e8f34e2
JB
581%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
582%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
ea774f60
AF
583
584%attr(755,root,root) %{_sbindir}/snmpd
585
ea774f60 586%{_mandir}/man5/snmpd.conf.5*
a23e7817
JB
587%{_mandir}/man5/snmpd.examples.5*
588%{_mandir}/man5/snmpd.internal.5*
ea774f60 589%{_mandir}/man5/variables.5*
531ca0ff 590%{_mandir}/man8/snmpd.8*
ea774f60 591
e93f5ac2 592%attr(640,root,root) %ghost %{logfile}
ea774f60
AF
593
594%files libs
595%defattr(644,root,root,755)
e043d0db 596%dir %{_sysconfdir}/snmp
60e7e283 597%attr(755,root,root) %{_libdir}/libnet*.so.*.*
ea774f60 598
531ca0ff
JB
599%files devel
600%defattr(644,root,root,755)
601%attr(755,root,root) %{_bindir}/mib2c
f2ba5e16 602%attr(755,root,root) %{_bindir}/mib2c-update
531ca0ff
JB
603%attr(755,root,root) %{_bindir}/net-snmp-config
604%attr(755,root,root) %{_libdir}/libnet*[a-z].so
605%{_libdir}/libnet*.la
606%{_includedir}/net-snmp
607%{_datadir}/snmp/mib2c*
608%{_mandir}/man1/mib2c.1*
a5fe3234
JB
609%{_mandir}/man1/mib2c-update.1*
610%{_mandir}/man1/net-snmp-config.1*
bdee8ff5 611%{_mandir}/man3/[!NS]*
f2ba5e16 612%{_mandir}/man5/mib2c.conf.5*
531ca0ff 613
c4627f0b 614%if %{with static_libs}
531ca0ff
JB
615%files static
616%defattr(644,root,root,755)
617%{_libdir}/libnet*.a
c4627f0b 618%endif
531ca0ff 619
531ca0ff
JB
620%files compat-devel
621%defattr(644,root,root,755)
622%attr(755,root,root) %{_libdir}/libsnmp.so
623%{_libdir}/libsnmp.la
624%{_includedir}/ucd-snmp
625
c4627f0b 626%if %{with static_libs}
531ca0ff
JB
627%files compat-static
628%defattr(644,root,root,755)
629%{_libdir}/libsnmp.a
c4627f0b 630%endif
531ca0ff 631
60e7e283
AF
632%files mibs
633%defattr(644,root,root,755)
ee807caf 634%dir %{_datadir}/snmp
ea774f60
AF
635%{_datadir}/snmp/mibs
636
531ca0ff 637%files snmptrapd
60e7e283 638%defattr(644,root,root,755)
531ca0ff
JB
639%attr(755,root,root) %{_sbindir}/snmptrapd
640%attr(754,root,root) /etc/rc.d/init.d/snmptrapd
9e8f34e2
JB
641%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
642%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
7470cbdb 643%if %{with perl}
f2ba5e16 644%attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
7470cbdb 645%endif
531ca0ff
JB
646%{_mandir}/man5/snmptrapd.conf.5*
647%{_mandir}/man8/snmptrapd.8*
60e7e283 648
ea774f60
AF
649%files utils
650%defattr(644,root,root,755)
651%attr(755,root,root) %{_bindir}/encode_keychange
652%attr(755,root,root) %{_bindir}/snmpbulkget
653%attr(755,root,root) %{_bindir}/snmpbulkwalk
654%attr(755,root,root) %{_bindir}/snmpdelta
6789d157 655%attr(755,root,root) %{_bindir}/snmpdf
ea774f60
AF
656%attr(755,root,root) %{_bindir}/snmpget
657%attr(755,root,root) %{_bindir}/snmpgetnext
6789d157 658%attr(755,root,root) %{_bindir}/snmpinform
ea774f60
AF
659%attr(755,root,root) %{_bindir}/snmpnetstat
660%attr(755,root,root) %{_bindir}/snmpset
661%attr(755,root,root) %{_bindir}/snmpstatus
662%attr(755,root,root) %{_bindir}/snmptable
663%attr(755,root,root) %{_bindir}/snmptest
664%attr(755,root,root) %{_bindir}/snmptranslate
665%attr(755,root,root) %{_bindir}/snmptrap
666%attr(755,root,root) %{_bindir}/snmpusm
ea774f60 667%attr(755,root,root) %{_bindir}/snmpvacm
6789d157 668%attr(755,root,root) %{_bindir}/snmpwalk
a5fe3234 669%{_mandir}/man1/encode_keychange.1*
ea774f60
AF
670%{_mandir}/man1/snmpbulkget.1*
671%{_mandir}/man1/snmpbulkwalk.1*
672%{_mandir}/man1/snmpcmd.1*
673%{_mandir}/man1/snmpdelta.1*
6789d157 674%{_mandir}/man1/snmpdf.1*
ea774f60
AF
675%{_mandir}/man1/snmpget.1*
676%{_mandir}/man1/snmpgetnext.1*
6789d157 677%{_mandir}/man1/snmpinform.1*
ea774f60
AF
678%{_mandir}/man1/snmpnetstat.1*
679%{_mandir}/man1/snmpset.1*
680%{_mandir}/man1/snmpstatus.1*
681%{_mandir}/man1/snmptable.1*
682%{_mandir}/man1/snmptest.1*
683%{_mandir}/man1/snmptranslate.1*
684%{_mandir}/man1/snmptrap.1*
685%{_mandir}/man1/snmpusm.1*
6789d157 686%{_mandir}/man1/snmpvacm.1*
ea774f60 687%{_mandir}/man1/snmpwalk.1*
ea774f60
AF
688%{_mandir}/man5/snmp.conf.5*
689%{_mandir}/man5/snmp_config.5*
690
7bb0c439 691%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf
6e818aed 692
7470cbdb 693%if %{with perl}
531ca0ff 694%files -n perl-SNMP
c4deead5 695%defattr(644,root,root,755)
531ca0ff
JB
696%doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
697%{perl_vendorarch}/SNMP.pm
698%{perl_vendorarch}/NetSNMP
699%dir %{perl_vendorarch}/auto/SNMP
700%{perl_vendorarch}/auto/SNMP/autosplit.ix
701%{perl_vendorarch}/auto/SNMP/SNMP.bs
702%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
703%dir %{perl_vendorarch}/auto/NetSNMP
704%dir %{perl_vendorarch}/auto/NetSNMP/*
705%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
706%{perl_vendorarch}/auto/NetSNMP/*/*.bs
707%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
708%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
709%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
710%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
711%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
712%{_mandir}/man3/NetSNMP::*.3*
713%{_mandir}/man3/SNMP.3*
714%{_examplesdir}/perl-SNMP-%{version}
715
ea774f60
AF
716%files utils-perl
717%defattr(644,root,root,755)
6789d157 718%attr(755,root,root) %{_bindir}/fixproc
60e7e283 719%attr(755,root,root) %{_bindir}/snmpcheck
6810e918 720%attr(755,root,root) %{_bindir}/traptoemail
a5fe3234
JB
721%{_mandir}/man1/fixproc.1*
722%{_mandir}/man1/traptoemail.1*
7470cbdb 723%endif
531ca0ff
JB
724
725%files snmpconf
4ec38672 726%defattr(644,root,root,755)
531ca0ff 727%attr(755,root,root) %{_bindir}/snmpconf
60e7e283
AF
728%{_mandir}/man1/snmpconf.1*
729%{_datadir}/snmp/snmpconf-data
e93f5ac2 730
7470cbdb 731%if %{with perl}
e93f5ac2
AF
732%files tkmib
733%defattr(644,root,root,755)
4ec38672 734%attr(755,root,root) %{_bindir}/tkmib
a5fe3234 735%{_mandir}/man1/tkmib.1*
7470cbdb 736%endif
a5fe3234 737
7470cbdb 738%if %{with python}
a5fe3234
JB
739%files -n python-netsnmp
740%defattr(644,root,root,755)
741%dir %{py_sitedir}/netsnmp
742%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
743%{py_sitedir}/netsnmp/*.py[co]
744%{py_sitedir}/netsnmp_python-*.egg-info
7470cbdb 745%endif
This page took 2.042446 seconds and 4 git commands to generate.