]> git.pld-linux.org Git - packages/net-snmp.git/blame - net-snmp.spec
- rel 5
[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
21101cb1 30Release: 5
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
ea774f60 54URL: http://www.net-snmp.org/
82f38c90 55BuildRequires: autoconf >= 2.61-3
ea774f60 56BuildRequires: automake
e43a09d3 57BuildRequires: elfutils-devel
7470cbdb 58%{?with_kerberos5:BuildRequires: krb5-devel}
ea774f60
AF
59BuildRequires: libtool >= 1.4
60BuildRequires: libwrap-devel
7470cbdb 61%{?with_lm_sensors:BuildRequires: lm_sensors-devel}
2e25f11c 62BuildRequires: openssl-devel >= 0.9.7d
ad841d97
JB
63%{?with_autodeps:BuildRequires: perl-Term-ReadKey}
64BuildRequires: perl-devel >= 1:5.8.0
7470cbdb 65%if %{with python}
a5fe3234 66BuildRequires: python-devel >= 1:2.5
c2ceb56d 67BuildRequires: python-setuptools
7470cbdb
JK
68%endif
69%if %{with rpm}
ea774f60
AF
70BuildRequires: rpm-devel >= 4.0
71BuildRequires: rpm-perlprov >= 3.0.3-16
7470cbdb 72%endif
e65e8dc4 73BuildRequires: rpmbuild(macros) >= 1.176
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
ea774f60
AF
419
420%build
421%{__libtoolize}
422%{__aclocal}
ea774f60 423%{__autoconf}
564bc1fe 424%{__autoheader}
ea774f60 425%configure \
27b5f5a2
JR
426 --disable-debugging \
427 --enable-as-needed \
f42492ff 428 --with-cflags="%{rpmcflags} -I/usr/include/et" \
ea774f60 429 --with-ldflags="%{rpmldflags}" \
c74e79f9
JB
430 --with-defaults \
431 --with-default-snmp-version=3 \
7470cbdb 432 %{?with_kerberos5:--with-krb5=%{_prefix}} \
1c79f0b7 433 %{!?with_kerberos5:--without-krb5} \
27b5f5a2
JR
434 --with-openssl=%{_prefix} \
435 --with-libwrap=%{_prefix} \
c74e79f9 436 --with-logfile="%{logfile}" \
27b5f5a2
JR
437 --with-zlib=%{_prefix} \
438 --with-bzip2=%{_prefix} \
7470cbdb
JK
439 --with%{!?with_rpm:out}-perl-modules \
440 --with%{!?with_rpm:out}-python-modules \
27b5f5a2
JR
441 --with-mib-modules="host agentx smux mibII/mta_sendmail \
442%ifarch %{ix86} %{x8664}
1b8b7a85 443%if %{with lm_sensors}
27b5f5a2 444 ucd-snmp/lmSensors \
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
JB
451 --with-sys-location="Unknown" \
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
ea774f60
AF
512%clean
513rm -rf $RPM_BUILD_ROOT
514
e93f5ac2 515%post
ea774f60
AF
516touch %{logfile}
517chmod 640 %{logfile}
fa43c632
ER
518/sbin/chkconfig --add snmpd
519%service snmpd restart "snmpd daemon"
ea774f60 520
60e7e283
AF
521%preun
522if [ "$1" = "0" ]; then
fa43c632 523 %service snmpd stop
60e7e283
AF
524 /sbin/chkconfig --del snmpd
525fi
ea774f60
AF
526
527%post libs -p /sbin/ldconfig
528%postun libs -p /sbin/ldconfig
529
5b201584
JB
530%triggerpostun -- ucd-snmp
531/sbin/chkconfig --add snmpd
532
e93f5ac2 533%post snmptrapd
ea774f60
AF
534touch %{logfile}
535chmod 640 %{logfile}
fa43c632
ER
536/sbin/chkconfig --add snmptrapd
537%service snmptrapd restart "snmp trap daemon"
ea774f60 538
60e7e283
AF
539%preun snmptrapd
540if [ "$1" = "0" ]; then
fa43c632 541 %service snmptrapd stop
60e7e283
AF
542 /sbin/chkconfig --del snmptrapd
543fi
ea774f60 544
605b587c 545%triggerpostun snmptrapd -- ucd-snmp-snmptrapd
5b201584
JB
546/sbin/chkconfig --add snmptrapd
547
ea774f60
AF
548%files
549%defattr(644,root,root,755)
550%doc README local
551%doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
552%doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
553
60e7e283 554%attr(754,root,root) /etc/rc.d/init.d/snmpd
9e8f34e2 555%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
ea774f60 556
9e8f34e2
JB
557%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
558%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
ea774f60
AF
559
560%attr(755,root,root) %{_sbindir}/snmpd
561
ea774f60 562%{_mandir}/man5/snmpd.conf.5*
a23e7817
JB
563%{_mandir}/man5/snmpd.examples.5*
564%{_mandir}/man5/snmpd.internal.5*
ea774f60 565%{_mandir}/man5/variables.5*
531ca0ff 566%{_mandir}/man8/snmpd.8*
ea774f60 567
e93f5ac2 568%attr(640,root,root) %ghost %{logfile}
ea774f60
AF
569
570%files libs
571%defattr(644,root,root,755)
e043d0db 572%dir %{_sysconfdir}/snmp
60e7e283 573%attr(755,root,root) %{_libdir}/libnet*.so.*.*
ea774f60 574
531ca0ff
JB
575%files devel
576%defattr(644,root,root,755)
577%attr(755,root,root) %{_bindir}/mib2c
f2ba5e16 578%attr(755,root,root) %{_bindir}/mib2c-update
531ca0ff
JB
579%attr(755,root,root) %{_bindir}/net-snmp-config
580%attr(755,root,root) %{_libdir}/libnet*[a-z].so
581%{_libdir}/libnet*.la
582%{_includedir}/net-snmp
583%{_datadir}/snmp/mib2c*
584%{_mandir}/man1/mib2c.1*
a5fe3234
JB
585%{_mandir}/man1/mib2c-update.1*
586%{_mandir}/man1/net-snmp-config.1*
bdee8ff5 587%{_mandir}/man3/[!NS]*
f2ba5e16 588%{_mandir}/man5/mib2c.conf.5*
531ca0ff
JB
589
590%files static
591%defattr(644,root,root,755)
592%{_libdir}/libnet*.a
593
531ca0ff
JB
594%files compat-devel
595%defattr(644,root,root,755)
596%attr(755,root,root) %{_libdir}/libsnmp.so
597%{_libdir}/libsnmp.la
598%{_includedir}/ucd-snmp
599
600%files compat-static
601%defattr(644,root,root,755)
602%{_libdir}/libsnmp.a
603
60e7e283
AF
604%files mibs
605%defattr(644,root,root,755)
ee807caf 606%dir %{_datadir}/snmp
ea774f60
AF
607%{_datadir}/snmp/mibs
608
531ca0ff 609%files snmptrapd
60e7e283 610%defattr(644,root,root,755)
531ca0ff
JB
611%attr(755,root,root) %{_sbindir}/snmptrapd
612%attr(754,root,root) /etc/rc.d/init.d/snmptrapd
9e8f34e2
JB
613%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
614%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
7470cbdb 615%if %{with perl}
f2ba5e16 616%attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
7470cbdb 617%endif
531ca0ff
JB
618%{_mandir}/man5/snmptrapd.conf.5*
619%{_mandir}/man8/snmptrapd.8*
60e7e283 620
ea774f60
AF
621%files utils
622%defattr(644,root,root,755)
623%attr(755,root,root) %{_bindir}/encode_keychange
624%attr(755,root,root) %{_bindir}/snmpbulkget
625%attr(755,root,root) %{_bindir}/snmpbulkwalk
626%attr(755,root,root) %{_bindir}/snmpdelta
6789d157 627%attr(755,root,root) %{_bindir}/snmpdf
ea774f60
AF
628%attr(755,root,root) %{_bindir}/snmpget
629%attr(755,root,root) %{_bindir}/snmpgetnext
6789d157 630%attr(755,root,root) %{_bindir}/snmpinform
ea774f60
AF
631%attr(755,root,root) %{_bindir}/snmpnetstat
632%attr(755,root,root) %{_bindir}/snmpset
633%attr(755,root,root) %{_bindir}/snmpstatus
634%attr(755,root,root) %{_bindir}/snmptable
635%attr(755,root,root) %{_bindir}/snmptest
636%attr(755,root,root) %{_bindir}/snmptranslate
637%attr(755,root,root) %{_bindir}/snmptrap
638%attr(755,root,root) %{_bindir}/snmpusm
ea774f60 639%attr(755,root,root) %{_bindir}/snmpvacm
6789d157 640%attr(755,root,root) %{_bindir}/snmpwalk
a5fe3234 641%{_mandir}/man1/encode_keychange.1*
ea774f60
AF
642%{_mandir}/man1/snmpbulkget.1*
643%{_mandir}/man1/snmpbulkwalk.1*
644%{_mandir}/man1/snmpcmd.1*
645%{_mandir}/man1/snmpdelta.1*
6789d157 646%{_mandir}/man1/snmpdf.1*
ea774f60
AF
647%{_mandir}/man1/snmpget.1*
648%{_mandir}/man1/snmpgetnext.1*
6789d157 649%{_mandir}/man1/snmpinform.1*
ea774f60
AF
650%{_mandir}/man1/snmpnetstat.1*
651%{_mandir}/man1/snmpset.1*
652%{_mandir}/man1/snmpstatus.1*
653%{_mandir}/man1/snmptable.1*
654%{_mandir}/man1/snmptest.1*
655%{_mandir}/man1/snmptranslate.1*
656%{_mandir}/man1/snmptrap.1*
657%{_mandir}/man1/snmpusm.1*
6789d157 658%{_mandir}/man1/snmpvacm.1*
ea774f60 659%{_mandir}/man1/snmpwalk.1*
ea774f60
AF
660%{_mandir}/man5/snmp.conf.5*
661%{_mandir}/man5/snmp_config.5*
662
7bb0c439 663%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf
6e818aed 664
7470cbdb 665%if %{with perl}
531ca0ff 666%files -n perl-SNMP
c4deead5 667%defattr(644,root,root,755)
531ca0ff
JB
668%doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
669%{perl_vendorarch}/SNMP.pm
670%{perl_vendorarch}/NetSNMP
671%dir %{perl_vendorarch}/auto/SNMP
672%{perl_vendorarch}/auto/SNMP/autosplit.ix
673%{perl_vendorarch}/auto/SNMP/SNMP.bs
674%attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
675%dir %{perl_vendorarch}/auto/NetSNMP
676%dir %{perl_vendorarch}/auto/NetSNMP/*
677%{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
678%{perl_vendorarch}/auto/NetSNMP/*/*.bs
679%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
680%dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
681%{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
682%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
683%attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
684%{_mandir}/man3/NetSNMP::*.3*
685%{_mandir}/man3/SNMP.3*
686%{_examplesdir}/perl-SNMP-%{version}
687
ea774f60
AF
688%files utils-perl
689%defattr(644,root,root,755)
6789d157 690%attr(755,root,root) %{_bindir}/fixproc
60e7e283 691%attr(755,root,root) %{_bindir}/snmpcheck
6810e918 692%attr(755,root,root) %{_bindir}/traptoemail
a5fe3234
JB
693%{_mandir}/man1/fixproc.1*
694%{_mandir}/man1/traptoemail.1*
7470cbdb 695%endif
531ca0ff
JB
696
697%files snmpconf
4ec38672 698%defattr(644,root,root,755)
531ca0ff 699%attr(755,root,root) %{_bindir}/snmpconf
60e7e283
AF
700%{_mandir}/man1/snmpconf.1*
701%{_datadir}/snmp/snmpconf-data
e93f5ac2 702
7470cbdb 703%if %{with perl}
e93f5ac2
AF
704%files tkmib
705%defattr(644,root,root,755)
4ec38672 706%attr(755,root,root) %{_bindir}/tkmib
a5fe3234 707%{_mandir}/man1/tkmib.1*
7470cbdb 708%endif
a5fe3234 709
7470cbdb 710%if %{with python}
a5fe3234
JB
711%files -n python-netsnmp
712%defattr(644,root,root,755)
713%dir %{py_sitedir}/netsnmp
714%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
715%{py_sitedir}/netsnmp/*.py[co]
716%{py_sitedir}/netsnmp_python-*.egg-info
7470cbdb 717%endif
This page took 0.199001 seconds and 4 git commands to generate.