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