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