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