]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
- Fixed typos in bconds.
[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
ff4ab342 31Release: 10
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
ea774f60 57URL: http://www.net-snmp.org/
82f38c90 58BuildRequires: autoconf >= 2.61-3
ea774f60 59BuildRequires: automake
e43a09d3 60BuildRequires: elfutils-devel
7470cbdb 61%{?with_kerberos5:BuildRequires: krb5-devel}
ea774f60
AF
62BuildRequires: libtool >= 1.4
63BuildRequires: libwrap-devel
7470cbdb 64%{?with_lm_sensors:BuildRequires: lm_sensors-devel}
2e25f11c 65BuildRequires: openssl-devel >= 0.9.7d
ad841d97
JB
66%{?with_autodeps:BuildRequires: perl-Term-ReadKey}
67BuildRequires: perl-devel >= 1:5.8.0
7470cbdb 68%if %{with python}
a5fe3234 69BuildRequires: python-devel >= 1:2.5
c2ceb56d 70BuildRequires: python-setuptools
7470cbdb
JK
71%endif
72%if %{with rpm}
ea774f60
AF
73BuildRequires: rpm-devel >= 4.0
74BuildRequires: rpm-perlprov >= 3.0.3-16
7470cbdb 75%endif
fa43c632 76BuildRequires: rpmbuild(macros) >= 1.268
ea774f60 77Requires(post,preun): /sbin/chkconfig
b0389a15 78Requires: %{name}-libs = %{version}-%{release}
4feada3c 79Requires: %{name}-mibs = %{version}-%{release}
ea774f60 80Requires: /usr/bin/setsid
b0389a15 81Requires: rc-scripts >= 0.2.0
ea774f60 82Provides: snmpd
ea774f60
AF
83Obsoletes: cmu-snmp
84Obsoletes: snmpd
e93f5ac2 85Obsoletes: ucd-snmp
c4627f0b 86Conflicts: rpm < 4.4.9-43.11
fa43c632 87BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
ea774f60 88
ea774f60
AF
89%define logfile /var/log/snmpd.log
90
91%description
92SNMP (Simple Network Management Protocol) is a protocol used for
531ca0ff 93network management (hence the name). The net-snmp project includes
ea774f60
AF
94various SNMP tools: an extensible agent, an SNMP library, tools for
95requesting or setting information from SNMP agents, tools for
96generating and handling SNMP traps, a version of the netstat command
97which uses SNMP, and a Tk/Perl mib browser. This package contains the
98snmpd daemon, documentation, etc.
99
b1738c7c
JR
100%description -l es.UTF-8
101Este paquete se deriva de la implementación del Protocolo Simple de
102Gestión de Redes versión 2 (SNMPv2) de la Universidad Carnegie Mellon.
103Útil para administrar redes y hacer contabilidad.
104
105%description -l pl.UTF-8
106SNMP (Simple Network Management Protocol) jest protokołem używanym do
107zarządzania sieciami. Pakiet zawiera narzędzia: rozbudowywalnego
108agenta, bibliotekę SNMP, narzędzia do odpytywania oraz ustawiania
109informacji poprzez agentów SNMP, narzędzia do generowania i obsługi
110pułapek SNMP, wersję komendy netstat używającą SNMP, przeglądarkę mib
111w Tk/Perl, demona, dokumentację itp.
112
113%description -l pt_BR.UTF-8
114Este pacote é derivado da implementação do Protocolo Simples de
115Gerenciamento de Redes versão 2 (SNMPv2) da Universidade Carnegie
116Mellon. Útil para gerenciar redes e fazer contabilidade.
117
118%description -l ru.UTF-8
119SNMP (Simple Network Management Protocol) - это протокол, используемый
120для управления сетью (отсюда и название). Проект net-snmp включает
121разнообразные SNMP-утилиты: расширяемый агент, библиотека SNMP,
122утилиты для запроса или установки информации от SNMP-агентов, утилиты
123для генерации и обработки SNMP-трапов, версия команды netstat,
124использующей SNMP, и mib-браузер на Tk/Perl. Этот пакет содержит
125демоны snmpd и snmptrapd, документацию и т.д.
126
127%description -l uk.UTF-8
128SNMP (Simple Network Management Protocol) - це протокол, який
129використовують для керування мережею (звідси і назва). Проект net-snmp
130містить різноманітні SNMP-утиліти: розширюваний агент, бібліотека
131SNMP, утиліти для запросу та встановлення інформації від NMP-агентів,
132утиліти для генерації та обробки SNMP-трапів, версія команди netstat,
133яка використовує SNMP, та mib-браузер на Tk/Perl. Цей пакет містить
134демони snmpd та snmptrapd, документацію і т.і.
ea774f60
AF
135
136%package libs
e93f5ac2 137Summary: NET SNMP libraries
7d4e48ba 138Summary(pl.UTF-8): Biblioteki SNMP
ea774f60 139Group: Libraries
6537f78d 140Requires: %{name}-mibs
5ae1bff8 141Obsoletes: net-snmp-compat-libs
60e7e283 142Obsoletes: ucd-snmp-libs
ea774f60
AF
143
144%description libs
e93f5ac2 145NET SNMP libraries.
ea774f60 146
b1738c7c 147%description libs -l pl.UTF-8
ea774f60
AF
148Biblioteki SNMP.
149
ea774f60 150%package devel
531ca0ff 151Summary: The development environment for the net-snmp project
7d4e48ba
ER
152Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
153Summary(pl.UTF-8): Pliki dla programistów używających bibliotek net-snmp
154Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
155Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP
156Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP
ea774f60 157Group: Development/Libraries
9274a72b 158Requires: %{name}-libs = %{version}-%{release}
e43a09d3 159Requires: elfutils-devel
1bcf5c62 160%{?with_kerberos5:Requires: krb5-devel}
b0389a15 161Requires: libwrap-devel
7470cbdb 162%{?with_lm_sensors:Requires: lm_sensors-devel}
8d251b9e 163Requires: openssl-devel >= 0.9.7c
7470cbdb 164%{?with_rpm:Requires: rpm-devel}
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
ea774f60
AF
423
424%build
425%{__libtoolize}
426%{__aclocal}
ea774f60 427%{__autoconf}
564bc1fe 428%{__autoheader}
ea774f60 429%configure \
27b5f5a2
JR
430 --disable-debugging \
431 --enable-as-needed \
c4627f0b 432 %{!?with_static_libs:--disable-static} \
f42492ff 433 --with-cflags="%{rpmcflags} -I/usr/include/et" \
ea774f60 434 --with-ldflags="%{rpmldflags}" \
c74e79f9
JB
435 --with-defaults \
436 --with-default-snmp-version=3 \
7470cbdb 437 %{?with_kerberos5:--with-krb5=%{_prefix}} \
1c79f0b7 438 %{!?with_kerberos5:--without-krb5} \
27b5f5a2
JR
439 --with-openssl=%{_prefix} \
440 --with-libwrap=%{_prefix} \
c74e79f9 441 --with-logfile="%{logfile}" \
27b5f5a2
JR
442 --with-zlib=%{_prefix} \
443 --with-bzip2=%{_prefix} \
ff4ab342 444 --with%{!?with_perl:out}-perl-modules \
445 --with%{!?with_python:out}-python-modules \
27b5f5a2
JR
446 --with-mib-modules="host agentx smux mibII/mta_sendmail \
447%ifarch %{ix86} %{x8664}
1b8b7a85 448%if %{with lm_sensors}
27b5f5a2 449 ucd-snmp/lmSensors \
7470cbdb 450%endif
27b5f5a2
JR
451%endif
452 disman/event disman/schedule ucd-snmp/diskio \
453 target misc/ipfwacc" \
7470cbdb 454 %{?with_kerberos5:--with-security-modules="ksm"} \
ea774f60 455 --with-sys-contact="root@localhost" \
c74e79f9
JB
456 --with-sys-location="Unknown" \
457 --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback " \
27b5f5a2
JR
458 --with-persistent-directory="/var/lib/net-snmp" \
459 --enable-ucd-snmp-compatibility \
7470cbdb
JK
460 --enable-ipv6 \
461 --with%{!?with_rpm:out}-rpm
2d4ec541 462
cb52cd5b 463%{__make} -j1
ea774f60 464
531ca0ff 465cd perl
531ca0ff 466
531ca0ff 467%{__perl} Makefile.PL \
2b15ac96 468 -NET-SNMP-IN-SOURCE=true \
531ca0ff 469 INSTALLDIRS=vendor \
2b15ac96 470 OPTIMIZE="%{rpmcflags}" \
531ca0ff 471 </dev/null
2b15ac96 472
531ca0ff
JB
473# avoid rpaths generated by MakeMaker
474perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
475
d59f5301
JK
476%{__make} \
477 LDFLAGS="%{rpmldflags}"
ea774f60
AF
478
479%install
480rm -rf $RPM_BUILD_ROOT
fa43c632 481install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log}
ea774f60 482
6789d157 483%{__make} install \
543e900e 484 DESTDIR=$RPM_BUILD_ROOT
ea774f60 485
6810e918
AF
486install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
487:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf
6e818aed 488:> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf
e93f5ac2 489:> $RPM_BUILD_ROOT%{logfile}
ea774f60 490
60e7e283 491install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
6810e918 492install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
60e7e283 493install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd
ea774f60 494
60e7e283 495install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
6810e918 496install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
60e7e283 497install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
ea774f60
AF
498
499#install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \
500# $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
501
531ca0ff
JB
502cd perl
503%{__make} install \
504 DESTDIR=$RPM_BUILD_ROOT
9274a72b 505
531ca0ff
JB
506install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
507install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
b572d007 508cd ..
ea774f60 509
9274a72b
JB
510# IP-Filter (non-Linux)
511rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
512
7f35dfac 513rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
3a0b5f9c
ER
514rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl
515rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
7f35dfac 516
c4627f0b
ER
517%if %{with static_libs}
518# hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument
519for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do
520 rm -f *.o *.a
521 ar x $a DynaLoader.a
522 if [ -f DynaLoader.a ]; then
523 ar x DynaLoader.a
524 ar cr $a DynaLoader.o
525 ar d $a DynaLoader.a
526 # remove second file too
527 ar d $a DynaLoader.a
528 fi
529done
530%endif
531
ea774f60
AF
532%clean
533rm -rf $RPM_BUILD_ROOT
534
e93f5ac2 535%post
ea774f60
AF
536touch %{logfile}
537chmod 640 %{logfile}
fa43c632
ER
538/sbin/chkconfig --add snmpd
539%service snmpd restart "snmpd daemon"
ea774f60 540
60e7e283
AF
541%preun
542if [ "$1" = "0" ]; then
fa43c632 543 %service snmpd stop
60e7e283
AF
544 /sbin/chkconfig --del snmpd
545fi
ea774f60
AF
546
547%post libs -p /sbin/ldconfig
548%postun libs -p /sbin/ldconfig
549
5b201584
JB
550%triggerpostun -- ucd-snmp
551/sbin/chkconfig --add snmpd
552
e93f5ac2 553%post snmptrapd
ea774f60
AF
554touch %{logfile}
555chmod 640 %{logfile}
fa43c632
ER
556/sbin/chkconfig --add snmptrapd
557%service snmptrapd restart "snmp trap daemon"
ea774f60 558
60e7e283
AF
559%preun snmptrapd
560if [ "$1" = "0" ]; then
fa43c632 561 %service snmptrapd stop
60e7e283
AF
562 /sbin/chkconfig --del snmptrapd
563fi
ea774f60 564
605b587c 565%triggerpostun snmptrapd -- ucd-snmp-snmptrapd
5b201584
JB
566/sbin/chkconfig --add snmptrapd
567
ea774f60
AF
568%files
569%defattr(644,root,root,755)
570%doc README local
571%doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
572%doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
573
60e7e283 574%attr(754,root,root) /etc/rc.d/init.d/snmpd
9e8f34e2 575%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
ea774f60 576
9e8f34e2
JB
577%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
578%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
ea774f60
AF
579
580%attr(755,root,root) %{_sbindir}/snmpd
581
ea774f60 582%{_mandir}/man5/snmpd.conf.5*
a23e7817
JB
583%{_mandir}/man5/snmpd.examples.5*
584%{_mandir}/man5/snmpd.internal.5*
ea774f60 585%{_mandir}/man5/variables.5*
531ca0ff 586%{_mandir}/man8/snmpd.8*
ea774f60 587
e93f5ac2 588%attr(640,root,root) %ghost %{logfile}
ea774f60
AF
589
590%files libs
591%defattr(644,root,root,755)
e043d0db 592%dir %{_sysconfdir}/snmp
60e7e283 593%attr(755,root,root) %{_libdir}/libnet*.so.*.*
ea774f60 594
531ca0ff
JB
595%files devel
596%defattr(644,root,root,755)
597%attr(755,root,root) %{_bindir}/mib2c
f2ba5e16 598%attr(755,root,root) %{_bindir}/mib2c-update
531ca0ff
JB
599%attr(755,root,root) %{_bindir}/net-snmp-config
600%attr(755,root,root) %{_libdir}/libnet*[a-z].so
601%{_libdir}/libnet*.la
602%{_includedir}/net-snmp
603%{_datadir}/snmp/mib2c*
604%{_mandir}/man1/mib2c.1*
a5fe3234
JB
605%{_mandir}/man1/mib2c-update.1*
606%{_mandir}/man1/net-snmp-config.1*
bdee8ff5 607%{_mandir}/man3/[!NS]*
f2ba5e16 608%{_mandir}/man5/mib2c.conf.5*
531ca0ff 609
c4627f0b 610%if %{with static_libs}
531ca0ff
JB
611%files static
612%defattr(644,root,root,755)
613%{_libdir}/libnet*.a
c4627f0b 614%endif
531ca0ff 615
531ca0ff
JB
616%files compat-devel
617%defattr(644,root,root,755)
618%attr(755,root,root) %{_libdir}/libsnmp.so
619%{_libdir}/libsnmp.la
620%{_includedir}/ucd-snmp
621
c4627f0b 622%if %{with static_libs}
531ca0ff
JB
623%files compat-static
624%defattr(644,root,root,755)
625%{_libdir}/libsnmp.a
c4627f0b 626%endif
531ca0ff 627
60e7e283
AF
628%files mibs
629%defattr(644,root,root,755)
ee807caf 630%dir %{_datadir}/snmp
ea774f60
AF
631%{_datadir}/snmp/mibs
632
531ca0ff 633%files snmptrapd
60e7e283 634%defattr(644,root,root,755)
531ca0ff
JB
635%attr(755,root,root) %{_sbindir}/snmptrapd
636%attr(754,root,root) /etc/rc.d/init.d/snmptrapd
9e8f34e2
JB
637%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
638%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
7470cbdb 639%if %{with perl}
f2ba5e16 640%attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
7470cbdb 641%endif
531ca0ff
JB
642%{_mandir}/man5/snmptrapd.conf.5*
643%{_mandir}/man8/snmptrapd.8*
60e7e283 644
ea774f60
AF
645%files utils
646%defattr(644,root,root,755)
647%attr(755,root,root) %{_bindir}/encode_keychange
648%attr(755,root,root) %{_bindir}/snmpbulkget
649%attr(755,root,root) %{_bindir}/snmpbulkwalk
650%attr(755,root,root) %{_bindir}/snmpdelta
6789d157 651%attr(755,root,root) %{_bindir}/snmpdf
ea774f60
AF
652%attr(755,root,root) %{_bindir}/snmpget
653%attr(755,root,root) %{_bindir}/snmpgetnext
6789d157 654%attr(755,root,root) %{_bindir}/snmpinform
ea774f60
AF
655%attr(755,root,root) %{_bindir}/snmpnetstat
656%attr(755,root,root) %{_bindir}/snmpset
657%attr(755,root,root) %{_bindir}/snmpstatus
658%attr(755,root,root) %{_bindir}/snmptable
659%attr(755,root,root) %{_bindir}/snmptest
660%attr(755,root,root) %{_bindir}/snmptranslate
661%attr(755,root,root) %{_bindir}/snmptrap
662%attr(755,root,root) %{_bindir}/snmpusm
ea774f60 663%attr(755,root,root) %{_bindir}/snmpvacm
6789d157 664%attr(755,root,root) %{_bindir}/snmpwalk
a5fe3234 665%{_mandir}/man1/encode_keychange.1*
ea774f60
AF
666%{_mandir}/man1/snmpbulkget.1*
667%{_mandir}/man1/snmpbulkwalk.1*
668%{_mandir}/man1/snmpcmd.1*
669%{_mandir}/man1/snmpdelta.1*
6789d157 670%{_mandir}/man1/snmpdf.1*
ea774f60
AF
671%{_mandir}/man1/snmpget.1*
672%{_mandir}/man1/snmpgetnext.1*
6789d157 673%{_mandir}/man1/snmpinform.1*
ea774f60
AF
674%{_mandir}/man1/snmpnetstat.1*
675%{_mandir}/man1/snmpset.1*
676%{_mandir}/man1/snmpstatus.1*
677%{_mandir}/man1/snmptable.1*
678%{_mandir}/man1/snmptest.1*
679%{_mandir}/man1/snmptranslate.1*
680%{_mandir}/man1/snmptrap.1*
681%{_mandir}/man1/snmpusm.1*
6789d157 682%{_mandir}/man1/snmpvacm.1*
ea774f60 683%{_mandir}/man1/snmpwalk.1*
ea774f60
AF
684%{_mandir}/man5/snmp.conf.5*
685%{_mandir}/man5/snmp_config.5*
686
7bb0c439 687%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf
6e818aed 688
7470cbdb 689%if %{with perl}
531ca0ff 690%files -n perl-SNMP
c4deead5 691%defattr(644,root,root,755)
531ca0ff
JB
692%doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
693%{perl_vendorarch}/SNMP.pm
694%{perl_vendorarch}/NetSNMP
695%dir %{perl_vendorarch}/auto/SNMP
696%{perl_vendorarch}/auto/SNMP/autosplit.ix
697%{perl_vendorarch}/auto/SNMP/SNMP.bs
698%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
699%dir %{perl_vendorarch}/auto/NetSNMP
700%dir %{perl_vendorarch}/auto/NetSNMP/*
701%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
702%{perl_vendorarch}/auto/NetSNMP/*/*.bs
703%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
704%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
705%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
706%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
707%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
708%{_mandir}/man3/NetSNMP::*.3*
709%{_mandir}/man3/SNMP.3*
710%{_examplesdir}/perl-SNMP-%{version}
711
ea774f60
AF
712%files utils-perl
713%defattr(644,root,root,755)
6789d157 714%attr(755,root,root) %{_bindir}/fixproc
60e7e283 715%attr(755,root,root) %{_bindir}/snmpcheck
6810e918 716%attr(755,root,root) %{_bindir}/traptoemail
a5fe3234
JB
717%{_mandir}/man1/fixproc.1*
718%{_mandir}/man1/traptoemail.1*
7470cbdb 719%endif
531ca0ff
JB
720
721%files snmpconf
4ec38672 722%defattr(644,root,root,755)
531ca0ff 723%attr(755,root,root) %{_bindir}/snmpconf
60e7e283
AF
724%{_mandir}/man1/snmpconf.1*
725%{_datadir}/snmp/snmpconf-data
e93f5ac2 726
7470cbdb 727%if %{with perl}
e93f5ac2
AF
728%files tkmib
729%defattr(644,root,root,755)
4ec38672 730%attr(755,root,root) %{_bindir}/tkmib
a5fe3234 731%{_mandir}/man1/tkmib.1*
7470cbdb 732%endif
a5fe3234 733
7470cbdb 734%if %{with python}
a5fe3234
JB
735%files -n python-netsnmp
736%defattr(644,root,root,755)
737%dir %{py_sitedir}/netsnmp
738%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
739%{py_sitedir}/netsnmp/*.py[co]
740%{py_sitedir}/netsnmp_python-*.egg-info
7470cbdb 741%endif
This page took 0.15672 seconds and 4 git commands to generate.