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