]>
Commit | Line | Data |
---|---|---|
6139ec4c | 1 | # TODO |
2 | # - package or remove: | |
3 | # %{py_sitedir}/netsnmp/__init__.py | |
4 | # %{py_sitedir}/netsnmp/client.py | |
5 | # %{py_sitedir}/netsnmp/tests/__init__.py | |
6 | # %{py_sitedir}/netsnmp/tests/__init__.pyc | |
7 | # %{py_sitedir}/netsnmp/tests/__init__.pyo | |
8 | # %{py_sitedir}/netsnmp/tests/test.py | |
9 | # %{py_sitedir}/netsnmp/tests/test.pyc | |
10 | # %{py_sitedir}/netsnmp/tests/test.pyo | |
11 | # %{_datadir}/snmp/snmp_perl.pl | |
12 | # | |
13 | # Conditional build: | |
14 | %bcond_without autodeps # don't BR packages only for deps resolving | |
15 | %bcond_without rpm # don't include RPM support | |
16 | %bcond_without kerberos5 # don't include kerberos support | |
17 | %bcond_without lm_sensors # don't include sensors support | |
18 | %bcond_without perl # don't include Perl modules and utils | |
19 | %bcond_without python # don't include Python modules | |
1807fdee | 20 | %bcond_without static_libs # don't build static library |
6139ec4c | 21 | # |
22 | %include /usr/lib/rpm/macros.perl | |
23 | Summary: A collection of SNMP protocol tools | |
24 | Summary(es.UTF-8): Agente SNMP de la UCD | |
25 | Summary(pl.UTF-8): Kolekcja narzędzi do obsługi protokołu SNMP | |
26 | Summary(pt_BR.UTF-8): Agente SNMP da UCD | |
27 | Summary(ru.UTF-8): Набор утилит для протокола SNMP от UC-Davis | |
28 | Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis | |
29 | Name: net-snmp | |
30 | Version: 5.4.1 | |
ab44d410 | 31 | Release: 5 |
6139ec4c | 32 | License: BSD-like |
33 | Group: Networking/Daemons | |
34 | Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz | |
35 | # Source0-md5: 6c974df7a5a5b1579f72115e6b045bda | |
36 | Source1: %{name}d.init | |
37 | Source2: %{name}d.conf | |
38 | Source3: %{name}d.sysconfig | |
39 | Source4: %{name}trapd.init | |
40 | Source5: %{name}trapd.conf | |
41 | Source6: %{name}trapd.sysconfig | |
42 | Source7: ucd-ipchains.tar.gz | |
43 | # Source7-md5: 29949f1008f1a04d6efefd5b3ea607da | |
44 | Patch0: %{name}-acfix.patch | |
45 | Patch1: %{name}-rpm-implicit-libs.patch | |
46 | Patch2: %{name}-config-noflags.patch | |
47 | Patch3: %{name}-manpage.patch | |
48 | Patch4: %{name}-link.patch | |
49 | Patch5: %{name}-llinterfaces.patch | |
50 | Patch6: %{name}-kernel_headers.patch | |
51 | Patch7: %{name}-rpmpath.patch | |
52 | Patch8: %{name}-snmpksm.patch | |
53 | Patch9: %{name}-python.patch | |
54 | Patch10: %{name}-lvalue.patch | |
ab44d410 | 55 | Patch11: %{name}-defaultconfig.patch |
6139ec4c | 56 | URL: http://www.net-snmp.org/ |
57 | BuildRequires: autoconf >= 2.61-3 | |
58 | BuildRequires: automake | |
59 | BuildRequires: elfutils-devel | |
917dbec5 | 60 | %{?with_kerberos5:BuildRequires: heimdal-devel} |
6139ec4c | 61 | BuildRequires: libtool >= 1.4 |
62 | BuildRequires: libwrap-devel | |
63 | %{?with_lm_sensors:BuildRequires: lm_sensors-devel} | |
64 | BuildRequires: openssl-devel >= 0.9.7d | |
65 | %{?with_autodeps:BuildRequires: perl-Term-ReadKey} | |
66 | BuildRequires: perl-devel >= 1:5.8.0 | |
67 | %if %{with python} | |
917dbec5 | 68 | BuildRequires: python-devel |
6139ec4c | 69 | BuildRequires: python-setuptools |
70 | %endif | |
71 | %if %{with rpm} | |
72 | BuildRequires: rpm-devel >= 4.0 | |
73 | BuildRequires: rpm-perlprov >= 3.0.3-16 | |
74 | %endif | |
6139ec4c | 75 | BuildRequires: rpmbuild(macros) >= 1.268 |
76 | Requires(post,preun): /sbin/chkconfig | |
77 | Requires: %{name}-libs = %{version}-%{release} | |
ab44d410 | 78 | Requires: %{name}-mibs = %{version}-%{release} |
6139ec4c | 79 | Requires: /usr/bin/setsid |
80 | Requires: rc-scripts >= 0.2.0 | |
81 | Provides: snmpd | |
82 | Obsoletes: cmu-snmp | |
83 | Obsoletes: snmpd | |
84 | Obsoletes: ucd-snmp | |
85 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
86 | ||
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 | |
ab44d410 | 158 | %{?with_kerberos5:Requires: krb5-devel} |
6139ec4c | 159 | Requires: libwrap-devel |
160 | %{?with_lm_sensors:Requires: lm_sensors-devel} | |
161 | Requires: openssl-devel >= 0.9.7c | |
162 | %{?with_rpm:Requires: rpm-devel} | |
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 |
6139ec4c | 420 | |
421 | %build | |
422 | %{__libtoolize} | |
423 | %{__aclocal} | |
424 | %{__autoconf} | |
425 | %{__autoheader} | |
426 | %configure \ | |
427 | --disable-debugging \ | |
428 | --enable-as-needed \ | |
1807fdee | 429 | %{!?with_static_libs:--disable-static} \ |
6139ec4c | 430 | --with-cflags="%{rpmcflags} -I/usr/include/et" \ |
431 | --with-ldflags="%{rpmldflags}" \ | |
432 | --with-defaults \ | |
433 | --with-default-snmp-version=3 \ | |
434 | %{?with_kerberos5:--with-krb5=%{_prefix}} \ | |
435 | %{!?with_kerberos5:--without-krb5} \ | |
436 | --with-openssl=%{_prefix} \ | |
437 | --with-libwrap=%{_prefix} \ | |
438 | --with-logfile="%{logfile}" \ | |
439 | --with-zlib=%{_prefix} \ | |
440 | --with-bzip2=%{_prefix} \ | |
441 | --with%{!?with_rpm:out}-perl-modules \ | |
442 | --with%{!?with_rpm:out}-python-modules \ | |
443 | --with-mib-modules="host agentx smux mibII/mta_sendmail \ | |
444 | %ifarch %{ix86} %{x8664} | |
445 | %if %{with lm_sensors} | |
446 | ucd-snmp/lmSensors \ | |
447 | %endif | |
448 | %endif | |
449 | disman/event disman/schedule ucd-snmp/diskio \ | |
450 | target misc/ipfwacc" \ | |
451 | %{?with_kerberos5:--with-security-modules="ksm"} \ | |
452 | --with-sys-contact="root@localhost" \ | |
453 | --with-sys-location="Unknown" \ | |
454 | --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback " \ | |
455 | --with-persistent-directory="/var/lib/net-snmp" \ | |
456 | --enable-ucd-snmp-compatibility \ | |
457 | --enable-ipv6 \ | |
458 | --with%{!?with_rpm:out}-rpm | |
459 | ||
460 | %{__make} -j1 | |
461 | ||
462 | cd perl | |
463 | ||
464 | %{__perl} Makefile.PL \ | |
465 | -NET-SNMP-IN-SOURCE=true \ | |
466 | INSTALLDIRS=vendor \ | |
467 | OPTIMIZE="%{rpmcflags}" \ | |
468 | </dev/null | |
469 | ||
470 | # avoid rpaths generated by MakeMaker | |
471 | perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile | |
472 | ||
473 | %{__make} \ | |
474 | LDFLAGS="%{rpmldflags}" | |
475 | ||
476 | %install | |
477 | rm -rf $RPM_BUILD_ROOT | |
478 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log} | |
479 | ||
480 | %{__make} install \ | |
481 | DESTDIR=$RPM_BUILD_ROOT | |
482 | ||
483 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf | |
484 | :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf | |
485 | :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf | |
486 | :> $RPM_BUILD_ROOT%{logfile} | |
487 | ||
488 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd | |
489 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf | |
490 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd | |
491 | ||
492 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd | |
493 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf | |
494 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd | |
495 | ||
496 | #install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \ | |
497 | # $RPM_BUILD_ROOT%{_datadir}/snmp/mibs | |
498 | ||
499 | cd perl | |
500 | %{__make} install \ | |
501 | DESTDIR=$RPM_BUILD_ROOT | |
502 | ||
503 | install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version} | |
504 | install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version} | |
505 | cd .. | |
506 | ||
507 | # IP-Filter (non-Linux) | |
508 | rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl | |
509 | ||
510 | rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
511 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl | |
512 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist | |
513 | ||
514 | %clean | |
515 | rm -rf $RPM_BUILD_ROOT | |
516 | ||
517 | %post | |
518 | touch %{logfile} | |
519 | chmod 640 %{logfile} | |
520 | /sbin/chkconfig --add snmpd | |
521 | %service snmpd restart "snmpd daemon" | |
522 | ||
523 | %preun | |
524 | if [ "$1" = "0" ]; then | |
525 | %service snmpd stop | |
526 | /sbin/chkconfig --del snmpd | |
527 | fi | |
528 | ||
529 | %post libs -p /sbin/ldconfig | |
530 | %postun libs -p /sbin/ldconfig | |
531 | ||
532 | %triggerpostun -- ucd-snmp | |
533 | /sbin/chkconfig --add snmpd | |
534 | ||
535 | %post snmptrapd | |
536 | touch %{logfile} | |
537 | chmod 640 %{logfile} | |
538 | /sbin/chkconfig --add snmptrapd | |
539 | %service snmptrapd restart "snmp trap daemon" | |
540 | ||
541 | %preun snmptrapd | |
542 | if [ "$1" = "0" ]; then | |
543 | %service snmptrapd stop | |
544 | /sbin/chkconfig --del snmptrapd | |
545 | fi | |
546 | ||
547 | %triggerpostun snmptrapd -- ucd-snmp-snmptrapd | |
548 | /sbin/chkconfig --add snmptrapd | |
549 | ||
550 | %files | |
551 | %defattr(644,root,root,755) | |
552 | %doc README local | |
553 | %doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf | |
554 | %doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt | |
555 | ||
556 | %attr(754,root,root) /etc/rc.d/init.d/snmpd | |
557 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd | |
558 | ||
559 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf | |
560 | %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf | |
561 | ||
562 | %attr(755,root,root) %{_sbindir}/snmpd | |
563 | ||
564 | %{_mandir}/man5/snmpd.conf.5* | |
565 | %{_mandir}/man5/snmpd.examples.5* | |
566 | %{_mandir}/man5/snmpd.internal.5* | |
567 | %{_mandir}/man5/variables.5* | |
568 | %{_mandir}/man8/snmpd.8* | |
569 | ||
570 | %attr(640,root,root) %ghost %{logfile} | |
571 | ||
572 | %files libs | |
573 | %defattr(644,root,root,755) | |
574 | %dir %{_sysconfdir}/snmp | |
575 | %attr(755,root,root) %{_libdir}/libnet*.so.*.* | |
576 | ||
577 | %files devel | |
578 | %defattr(644,root,root,755) | |
579 | %attr(755,root,root) %{_bindir}/mib2c | |
580 | %attr(755,root,root) %{_bindir}/mib2c-update | |
581 | %attr(755,root,root) %{_bindir}/net-snmp-config | |
582 | %attr(755,root,root) %{_libdir}/libnet*[a-z].so | |
583 | %{_libdir}/libnet*.la | |
584 | %{_includedir}/net-snmp | |
585 | %{_datadir}/snmp/mib2c* | |
586 | %{_mandir}/man1/mib2c.1* | |
587 | %{_mandir}/man1/mib2c-update.1* | |
588 | %{_mandir}/man1/net-snmp-config.1* | |
589 | %{_mandir}/man3/[!NS]* | |
590 | %{_mandir}/man5/mib2c.conf.5* | |
591 | ||
1807fdee | 592 | %if %{with static_libs} |
6139ec4c | 593 | %files static |
594 | %defattr(644,root,root,755) | |
595 | %{_libdir}/libnet*.a | |
1807fdee | 596 | %endif |
6139ec4c | 597 | |
598 | %files compat-devel | |
599 | %defattr(644,root,root,755) | |
600 | %attr(755,root,root) %{_libdir}/libsnmp.so | |
601 | %{_libdir}/libsnmp.la | |
602 | %{_includedir}/ucd-snmp | |
603 | ||
1807fdee | 604 | %if %{with static_libs} |
6139ec4c | 605 | %files compat-static |
606 | %defattr(644,root,root,755) | |
607 | %{_libdir}/libsnmp.a | |
1807fdee | 608 | %endif |
6139ec4c | 609 | |
610 | %files mibs | |
611 | %defattr(644,root,root,755) | |
612 | %dir %{_datadir}/snmp | |
613 | %{_datadir}/snmp/mibs | |
614 | ||
615 | %files snmptrapd | |
616 | %defattr(644,root,root,755) | |
617 | %attr(755,root,root) %{_sbindir}/snmptrapd | |
618 | %attr(754,root,root) /etc/rc.d/init.d/snmptrapd | |
619 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd | |
620 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf | |
621 | %if %{with perl} | |
622 | %attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl | |
623 | %endif | |
624 | %{_mandir}/man5/snmptrapd.conf.5* | |
625 | %{_mandir}/man8/snmptrapd.8* | |
626 | ||
627 | %files utils | |
628 | %defattr(644,root,root,755) | |
629 | %attr(755,root,root) %{_bindir}/encode_keychange | |
630 | %attr(755,root,root) %{_bindir}/snmpbulkget | |
631 | %attr(755,root,root) %{_bindir}/snmpbulkwalk | |
632 | %attr(755,root,root) %{_bindir}/snmpdelta | |
633 | %attr(755,root,root) %{_bindir}/snmpdf | |
634 | %attr(755,root,root) %{_bindir}/snmpget | |
635 | %attr(755,root,root) %{_bindir}/snmpgetnext | |
636 | %attr(755,root,root) %{_bindir}/snmpinform | |
637 | %attr(755,root,root) %{_bindir}/snmpnetstat | |
638 | %attr(755,root,root) %{_bindir}/snmpset | |
639 | %attr(755,root,root) %{_bindir}/snmpstatus | |
640 | %attr(755,root,root) %{_bindir}/snmptable | |
641 | %attr(755,root,root) %{_bindir}/snmptest | |
642 | %attr(755,root,root) %{_bindir}/snmptranslate | |
643 | %attr(755,root,root) %{_bindir}/snmptrap | |
644 | %attr(755,root,root) %{_bindir}/snmpusm | |
645 | %attr(755,root,root) %{_bindir}/snmpvacm | |
646 | %attr(755,root,root) %{_bindir}/snmpwalk | |
647 | %{_mandir}/man1/encode_keychange.1* | |
648 | %{_mandir}/man1/snmpbulkget.1* | |
649 | %{_mandir}/man1/snmpbulkwalk.1* | |
650 | %{_mandir}/man1/snmpcmd.1* | |
651 | %{_mandir}/man1/snmpdelta.1* | |
652 | %{_mandir}/man1/snmpdf.1* | |
653 | %{_mandir}/man1/snmpget.1* | |
654 | %{_mandir}/man1/snmpgetnext.1* | |
655 | %{_mandir}/man1/snmpinform.1* | |
656 | %{_mandir}/man1/snmpnetstat.1* | |
657 | %{_mandir}/man1/snmpset.1* | |
658 | %{_mandir}/man1/snmpstatus.1* | |
659 | %{_mandir}/man1/snmptable.1* | |
660 | %{_mandir}/man1/snmptest.1* | |
661 | %{_mandir}/man1/snmptranslate.1* | |
662 | %{_mandir}/man1/snmptrap.1* | |
663 | %{_mandir}/man1/snmpusm.1* | |
664 | %{_mandir}/man1/snmpvacm.1* | |
665 | %{_mandir}/man1/snmpwalk.1* | |
666 | %{_mandir}/man5/snmp.conf.5* | |
667 | %{_mandir}/man5/snmp_config.5* | |
668 | ||
669 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf | |
670 | ||
671 | %if %{with perl} | |
672 | %files -n perl-SNMP | |
673 | %defattr(644,root,root,755) | |
674 | %doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples | |
675 | %{perl_vendorarch}/SNMP.pm | |
676 | %{perl_vendorarch}/NetSNMP | |
677 | %dir %{perl_vendorarch}/auto/SNMP | |
678 | %{perl_vendorarch}/auto/SNMP/autosplit.ix | |
679 | %{perl_vendorarch}/auto/SNMP/SNMP.bs | |
680 | %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so | |
681 | %dir %{perl_vendorarch}/auto/NetSNMP | |
682 | %dir %{perl_vendorarch}/auto/NetSNMP/* | |
683 | %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix | |
684 | %{perl_vendorarch}/auto/NetSNMP/*/*.bs | |
685 | %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so | |
686 | %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store | |
687 | %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix | |
688 | %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs | |
689 | %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so | |
690 | %{_mandir}/man3/NetSNMP::*.3* | |
691 | %{_mandir}/man3/SNMP.3* | |
692 | %{_examplesdir}/perl-SNMP-%{version} | |
693 | ||
694 | %files utils-perl | |
695 | %defattr(644,root,root,755) | |
696 | %attr(755,root,root) %{_bindir}/fixproc | |
697 | %attr(755,root,root) %{_bindir}/snmpcheck | |
698 | %attr(755,root,root) %{_bindir}/traptoemail | |
699 | %{_mandir}/man1/fixproc.1* | |
700 | %{_mandir}/man1/traptoemail.1* | |
701 | %endif | |
702 | ||
703 | %files snmpconf | |
704 | %defattr(644,root,root,755) | |
705 | %attr(755,root,root) %{_bindir}/snmpconf | |
706 | %{_mandir}/man1/snmpconf.1* | |
707 | %{_datadir}/snmp/snmpconf-data | |
708 | ||
709 | %if %{with perl} | |
710 | %files tkmib | |
711 | %defattr(644,root,root,755) | |
712 | %attr(755,root,root) %{_bindir}/tkmib | |
713 | %{_mandir}/man1/tkmib.1* | |
714 | %endif | |
715 | ||
716 | %if %{with python} | |
717 | %files -n python-netsnmp | |
718 | %defattr(644,root,root,755) | |
719 | %dir %{py_sitedir}/netsnmp | |
720 | %attr(755,root,root) %{py_sitedir}/netsnmp/*.so | |
721 | %{py_sitedir}/netsnmp/*.py[co] | |
6139ec4c | 722 | %endif |