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