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