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