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