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