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