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