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