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