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