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