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