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