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