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