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