]>
Commit | Line | Data |
---|---|---|
7f35dfac ER |
1 | # TODO |
2 | # - package or remove: | |
7f35dfac | 3 | # %{_datadir}/snmp/snmp_perl.pl |
ad841d97 JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without autodeps # don't BR packages only for deps resolving | |
7470cbdb JK |
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 | |
c4627f0b | 12 | %bcond_without static_libs # don't build static library |
ad841d97 | 13 | # |
ea774f60 AF |
14 | %include /usr/lib/rpm/macros.perl |
15 | Summary: A collection of SNMP protocol tools | |
7d4e48ba ER |
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 | |
ea774f60 | 21 | Name: net-snmp |
93be734e AM |
22 | Version: 5.4.2.1 |
23 | Release: 1 | |
ea774f60 AF |
24 | License: BSD-like |
25 | Group: Networking/Daemons | |
26 | Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz | |
93be734e | 27 | # Source0-md5: 984932520143f0c8bf7b7ce1fc9e1da1 |
ea774f60 | 28 | Source1: %{name}d.init |
6810e918 | 29 | Source2: %{name}d.conf |
ea774f60 AF |
30 | Source3: %{name}d.sysconfig |
31 | Source4: %{name}trapd.init | |
6810e918 | 32 | Source5: %{name}trapd.conf |
ea774f60 | 33 | Source6: %{name}trapd.sysconfig |
ee18f99a | 34 | Source7: ucd-ipchains.tar.gz |
6789d157 | 35 | # Source7-md5: 29949f1008f1a04d6efefd5b3ea607da |
ee18f99a AM |
36 | Patch0: %{name}-acfix.patch |
37 | Patch1: %{name}-rpm-implicit-libs.patch | |
38 | Patch2: %{name}-config-noflags.patch | |
82f38c90 JB |
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 | |
713ab55c | 46 | Patch10: %{name}-lvalue.patch |
9f68faa0 | 47 | Patch11: %{name}-defaultconfig.patch |
c4627f0b | 48 | Patch12: %{name}-use-rpm-hrmib.patch |
0e59b3ea | 49 | Patch14: %{name}-lm_sensors_3.patch |
ea774f60 | 50 | URL: http://www.net-snmp.org/ |
82f38c90 | 51 | BuildRequires: autoconf >= 2.61-3 |
ea774f60 | 52 | BuildRequires: automake |
e43a09d3 | 53 | BuildRequires: elfutils-devel |
7470cbdb | 54 | %{?with_kerberos5:BuildRequires: krb5-devel} |
ea774f60 AF |
55 | BuildRequires: libtool >= 1.4 |
56 | BuildRequires: libwrap-devel | |
0e59b3ea | 57 | %{?with_lm_sensors:BuildRequires: lm_sensors-devel >= 3.0.1} |
2e25f11c | 58 | BuildRequires: openssl-devel >= 0.9.7d |
ad841d97 JB |
59 | %{?with_autodeps:BuildRequires: perl-Term-ReadKey} |
60 | BuildRequires: perl-devel >= 1:5.8.0 | |
7470cbdb | 61 | %if %{with python} |
a5fe3234 | 62 | BuildRequires: python-devel >= 1:2.5 |
c2ceb56d | 63 | BuildRequires: python-setuptools |
7470cbdb JK |
64 | %endif |
65 | %if %{with rpm} | |
2bacb8e1 | 66 | BuildRequires: rpm |
ea774f60 | 67 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
7470cbdb | 68 | %endif |
fa43c632 | 69 | BuildRequires: rpmbuild(macros) >= 1.268 |
ea774f60 | 70 | Requires(post,preun): /sbin/chkconfig |
b0389a15 | 71 | Requires: %{name}-libs = %{version}-%{release} |
4feada3c | 72 | Requires: %{name}-mibs = %{version}-%{release} |
ea774f60 | 73 | Requires: /usr/bin/setsid |
b0389a15 | 74 | Requires: rc-scripts >= 0.2.0 |
ea774f60 | 75 | Provides: snmpd |
ea774f60 AF |
76 | Obsoletes: cmu-snmp |
77 | Obsoletes: snmpd | |
e93f5ac2 | 78 | Obsoletes: ucd-snmp |
c4627f0b | 79 | Conflicts: rpm < 4.4.9-43.11 |
fa43c632 | 80 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ea774f60 | 81 | |
ea774f60 AF |
82 | %define logfile /var/log/snmpd.log |
83 | ||
84 | %description | |
85 | SNMP (Simple Network Management Protocol) is a protocol used for | |
531ca0ff | 86 | network management (hence the name). The net-snmp project includes |
ea774f60 AF |
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 | ||
b1738c7c JR |
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, документацію і т.і. | |
ea774f60 AF |
128 | |
129 | %package libs | |
e93f5ac2 | 130 | Summary: NET SNMP libraries |
7d4e48ba | 131 | Summary(pl.UTF-8): Biblioteki SNMP |
ea774f60 | 132 | Group: Libraries |
6537f78d | 133 | Requires: %{name}-mibs |
5ae1bff8 | 134 | Obsoletes: net-snmp-compat-libs |
60e7e283 | 135 | Obsoletes: ucd-snmp-libs |
ea774f60 AF |
136 | |
137 | %description libs | |
e93f5ac2 | 138 | NET SNMP libraries. |
ea774f60 | 139 | |
b1738c7c | 140 | %description libs -l pl.UTF-8 |
ea774f60 AF |
141 | Biblioteki SNMP. |
142 | ||
ea774f60 | 143 | %package devel |
531ca0ff | 144 | Summary: The development environment for the net-snmp project |
7d4e48ba ER |
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 | |
ea774f60 | 150 | Group: Development/Libraries |
9274a72b | 151 | Requires: %{name}-libs = %{version}-%{release} |
e43a09d3 | 152 | Requires: elfutils-devel |
1bcf5c62 | 153 | %{?with_kerberos5:Requires: krb5-devel} |
b0389a15 | 154 | Requires: libwrap-devel |
0e59b3ea | 155 | %{?with_lm_sensors:Requires: lm_sensors-devel >= 3.0.1} |
8d251b9e | 156 | Requires: openssl-devel >= 0.9.7c |
60e7e283 | 157 | Obsoletes: ucd-snmp-devel |
ea774f60 AF |
158 | |
159 | %description devel | |
160 | The ucd-snmp-devel package contains the development libraries and | |
531ca0ff | 161 | header files for use with the net-snmp project's network management |
ea774f60 AF |
162 | tools. |
163 | ||
b1738c7c JR |
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. | |
ea774f60 | 168 | |
b1738c7c JR |
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. | |
ea774f60 | 172 | |
b1738c7c JR |
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 | |
ea774f60 AF |
176 | para uso no gerenciamento de redes. |
177 | ||
b1738c7c JR |
178 | %description devel -l ru.UTF-8 |
179 | Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для | |
180 | использования с утилитами управления сетью проекта net-snmp. | |
ea774f60 | 181 | |
b1738c7c JR |
182 | %description devel -l uk.UTF-8 |
183 | Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для | |
184 | використання з утилітами керування мережею проекту net-snmp. | |
ea774f60 AF |
185 | |
186 | %package static | |
531ca0ff | 187 | Summary: Static net-snmp libraries |
7d4e48ba ER |
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 | |
ea774f60 | 192 | Group: Development/Libraries |
9274a72b | 193 | Requires: %{name}-devel = %{version}-%{release} |
60e7e283 | 194 | Obsoletes: ucd-snmp-static |
ea774f60 AF |
195 | |
196 | %description static | |
531ca0ff | 197 | Static net-snmp libraries. |
ea774f60 | 198 | |
b1738c7c | 199 | %description static -l pl.UTF-8 |
531ca0ff | 200 | Statyczne biblioteki net-snmp. |
ea774f60 | 201 | |
b1738c7c JR |
202 | %description static -l pt_BR.UTF-8 |
203 | Bibliotecas estáticas para desenvolvimento com net-snmp. | |
531ca0ff | 204 | |
e93f5ac2 AF |
205 | %package compat-devel |
206 | Summary: The development environment for the UCD-SNMP project | |
7d4e48ba ER |
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 | |
e93f5ac2 | 212 | Group: Development/Libraries |
9274a72b JB |
213 | Requires: %{name}-libs = %{version}-%{release} |
214 | Requires: openssl-devel >= 0.9.7d | |
e93f5ac2 AF |
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 | ||
b1738c7c JR |
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. | |
e93f5ac2 | 227 | |
b1738c7c JR |
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. | |
e93f5ac2 | 231 | |
b1738c7c JR |
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 | |
e93f5ac2 AF |
235 | para uso no gerenciamento de redes. |
236 | ||
b1738c7c JR |
237 | %description compat-devel -l ru.UTF-8 |
238 | Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для | |
239 | использования с утилитами управления сетью проекта UCD-SNMP. | |
e93f5ac2 | 240 | |
b1738c7c JR |
241 | %description compat-devel -l uk.UTF-8 |
242 | Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для | |
243 | використання з утилітами керування мережею проекту UCD-SNMP. | |
e93f5ac2 AF |
244 | |
245 | %package compat-static | |
246 | Summary: Static UCD-SNMP libraries | |
7d4e48ba ER |
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 | |
e93f5ac2 | 251 | Group: Development/Libraries |
9274a72b | 252 | Requires: %{name}-compat-devel = %{version}-%{release} |
e93f5ac2 AF |
253 | Obsoletes: ucd-snmp-static |
254 | ||
255 | %description compat-static | |
256 | Static UCD-SNMP libraries. | |
257 | ||
b1738c7c | 258 | %description compat-static -l pl.UTF-8 |
531ca0ff | 259 | Statyczne biblioteki UCD-SNMP. |
e93f5ac2 | 260 | |
b1738c7c JR |
261 | %description compat-static -l pt_BR.UTF-8 |
262 | Bibliotecas estáticas para desenvolvimento com ucd-snmp. | |
531ca0ff JB |
263 | |
264 | %package mibs | |
265 | Summary: MIB database | |
7d4e48ba | 266 | Summary(pl.UTF-8): Baza danych MIB |
531ca0ff | 267 | Group: Applications/System |
9274a72b | 268 | Conflicts: ucd-snmp-libs |
531ca0ff JB |
269 | |
270 | %description mibs | |
271 | MIB database. | |
272 | ||
b1738c7c | 273 | %description mibs -l pl.UTF-8 |
531ca0ff JB |
274 | Baza danych MIB. |
275 | ||
276 | %package snmptrapd | |
277 | Summary: SNMP trap daemon | |
7d4e48ba | 278 | Summary(pl.UTF-8): Demon obsługujący pułapki SNMP |
531ca0ff | 279 | Group: Applications/System |
531ca0ff | 280 | Requires(post,preun): /sbin/chkconfig |
b0389a15 ER |
281 | Requires: %{name} = %{version}-%{release} |
282 | Requires: rc-scripts >= 0.2.0 | |
531ca0ff JB |
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 | ||
b1738c7c JR |
289 | %description snmptrapd -l pl.UTF-8 |
290 | Pakiet zawiera demon obsługujący pułapki SNMP. | |
531ca0ff JB |
291 | |
292 | %package utils | |
293 | Summary: Network management utilities using SNMP, from the NET-SNMP project | |
7d4e48ba ER |
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 | |
531ca0ff | 299 | Group: Applications/System |
9274a72b | 300 | Requires: %{name}-libs = %{version}-%{release} |
4feada3c | 301 | Requires: %{name}-mibs = %{version}-%{release} |
531ca0ff JB |
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 | ||
b1738c7c | 309 | %description utils -l es.UTF-8 |
531ca0ff JB |
310 | Varios utilitarios para uso con el SNMP de la UCD. Contiene |
311 | utilitarios como: snmpwalk, snmptest y otros. | |
312 | ||
b1738c7c JR |
313 | %description utils -l pl.UTF-8 |
314 | Różnego rodzaju narzędzia do zarządzania siecią przy użyciu protokołu | |
531ca0ff JB |
315 | SNMP. |
316 | ||
b1738c7c JR |
317 | %description utils -l pt_BR.UTF-8 |
318 | Vários utilitários para uso com o SNMP da UCD. Contém utilitários | |
531ca0ff JB |
319 | como: snmpwalk, snmptest e outros. |
320 | ||
b1738c7c JR |
321 | %description utils -l ru.UTF-8 |
322 | Пакет ucd-snmp-utils содержит разнообразные утилиты для использования | |
323 | в проекте управления сетью net-snmp. | |
531ca0ff | 324 | |
b1738c7c JR |
325 | %description utils -l uk.UTF-8 |
326 | Пакет ucd-snmp-utils містить різноманітні утиліти для використання в | |
327 | проекті керування мережею net-snmp. | |
531ca0ff JB |
328 | |
329 | %package -n perl-SNMP | |
330 | Summary: SNMP and NetSNMP::* Perl modules | |
7d4e48ba | 331 | Summary(pl.UTF-8): Moduły Perla SNMP oraz NetSNMP::* |
531ca0ff | 332 | Group: Development/Languages/Perl |
9274a72b JB |
333 | Requires: %{name}-libs = %{version}-%{release} |
334 | Conflicts: ucd-snmp-utils-perl | |
531ca0ff JB |
335 | |
336 | %description -n perl-SNMP | |
337 | SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp. | |
338 | ||
b1738c7c JR |
339 | %description -n perl-SNMP -l pl.UTF-8 |
340 | Moduły Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp. | |
531ca0ff JB |
341 | |
342 | %package utils-perl | |
343 | Summary: Perl utilities for network management using SNMP | |
7d4e48ba | 344 | Summary(pl.UTF-8): Perlowe narzędzia używające protokołu SNMP |
531ca0ff | 345 | Group: Applications/System |
9274a72b | 346 | Requires: perl-SNMP = %{version}-%{release} |
531ca0ff JB |
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 | ||
b1738c7c JR |
354 | %description utils-perl -l pl.UTF-8 |
355 | Perlowe narzędzia do zarządzania siecią przy użyciu protokołu SNMP. | |
e93f5ac2 AF |
356 | |
357 | %package snmpconf | |
531ca0ff | 358 | Summary: snmpconf - creating and modifying SNMP configuration files |
7d4e48ba | 359 | Summary(pl.UTF-8): snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP |
e93f5ac2 | 360 | Group: Applications/System |
9274a72b JB |
361 | Requires: %{name} = %{version}-%{release} |
362 | Requires: perl-SNMP = %{version}-%{release} | |
e93f5ac2 AF |
363 | |
364 | %description snmpconf | |
531ca0ff JB |
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 | ||
b1738c7c JR |
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. | |
e93f5ac2 AF |
372 | |
373 | %package tkmib | |
2ffae1a4 | 374 | Summary: MIB browser in Tk |
7d4e48ba | 375 | Summary(pl.UTF-8): Przeglądarka MIB-ów w Tk |
e93f5ac2 | 376 | Group: Applications/System |
9274a72b | 377 | Requires: perl-SNMP = %{version}-%{release} |
531ca0ff | 378 | Requires: perl-Tk |
e93f5ac2 AF |
379 | |
380 | %description tkmib | |
2ffae1a4 | 381 | MIB browser in Tk. |
531ca0ff | 382 | |
b1738c7c JR |
383 | %description tkmib -l pl.UTF-8 |
384 | Przeglądarka MIB-ów w Tk. | |
e93f5ac2 | 385 | |
a5fe3234 JB |
386 | %package -n python-netsnmp |
387 | Summary: Python netsnmp extension module | |
7d4e48ba | 388 | Summary(pl.UTF-8): Moduł rozszerzenia netsnmp dla Pythona |
a5fe3234 JB |
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 | ||
b1738c7c JR |
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). | |
a5fe3234 | 399 | |
ea774f60 | 400 | %prep |
797d6879 | 401 | %setup -q -a7 |
ea774f60 AF |
402 | %patch0 -p1 |
403 | %patch1 -p1 | |
404 | %patch2 -p1 | |
405 | %patch3 -p1 | |
531ca0ff | 406 | %patch4 -p1 |
edf6eebd JB |
407 | %patch5 -p1 |
408 | %patch6 -p1 | |
8a2022cc | 409 | %patch7 -p1 |
9274a72b | 410 | %patch8 -p1 |
f42492ff | 411 | %patch9 -p1 |
713ab55c | 412 | %patch10 -p1 |
9f68faa0 | 413 | %patch11 -p1 |
c4627f0b | 414 | %patch12 -p1 |
0e59b3ea | 415 | %patch14 -p0 |
ea774f60 AF |
416 | |
417 | %build | |
418 | %{__libtoolize} | |
419 | %{__aclocal} | |
ea774f60 | 420 | %{__autoconf} |
564bc1fe | 421 | %{__autoheader} |
eca4ed56 | 422 | cp -f /usr/share/automake/config.sub . |
ea774f60 | 423 | %configure \ |
27b5f5a2 JR |
424 | --disable-debugging \ |
425 | --enable-as-needed \ | |
c4627f0b | 426 | %{!?with_static_libs:--disable-static} \ |
f42492ff | 427 | --with-cflags="%{rpmcflags} -I/usr/include/et" \ |
ea774f60 | 428 | --with-ldflags="%{rpmldflags}" \ |
c74e79f9 JB |
429 | --with-defaults \ |
430 | --with-default-snmp-version=3 \ | |
7470cbdb | 431 | %{?with_kerberos5:--with-krb5=%{_prefix}} \ |
1c79f0b7 | 432 | %{!?with_kerberos5:--without-krb5} \ |
27b5f5a2 JR |
433 | --with-openssl=%{_prefix} \ |
434 | --with-libwrap=%{_prefix} \ | |
c74e79f9 | 435 | --with-logfile="%{logfile}" \ |
27b5f5a2 JR |
436 | --with-zlib=%{_prefix} \ |
437 | --with-bzip2=%{_prefix} \ | |
ff4ab342 | 438 | --with%{!?with_perl:out}-perl-modules \ |
439 | --with%{!?with_python:out}-python-modules \ | |
2d9facbb | 440 | --enable-local-smux \ |
27b5f5a2 JR |
441 | --with-mib-modules="host agentx smux mibII/mta_sendmail \ |
442 | %ifarch %{ix86} %{x8664} | |
1b8b7a85 | 443 | %if %{with lm_sensors} |
0e59b3ea | 444 | ucd-snmp/lmsensorsMib \ |
7470cbdb | 445 | %endif |
27b5f5a2 JR |
446 | %endif |
447 | disman/event disman/schedule ucd-snmp/diskio \ | |
448 | target misc/ipfwacc" \ | |
7470cbdb | 449 | %{?with_kerberos5:--with-security-modules="ksm"} \ |
ea774f60 | 450 | --with-sys-contact="root@localhost" \ |
c74e79f9 | 451 | --with-sys-location="Unknown" \ |
2d9facbb | 452 | --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback" \ |
27b5f5a2 JR |
453 | --with-persistent-directory="/var/lib/net-snmp" \ |
454 | --enable-ucd-snmp-compatibility \ | |
7470cbdb JK |
455 | --enable-ipv6 \ |
456 | --with%{!?with_rpm:out}-rpm | |
2d4ec541 | 457 | |
cb52cd5b | 458 | %{__make} -j1 |
ea774f60 | 459 | |
531ca0ff | 460 | cd perl |
531ca0ff | 461 | |
531ca0ff | 462 | %{__perl} Makefile.PL \ |
2b15ac96 | 463 | -NET-SNMP-IN-SOURCE=true \ |
531ca0ff | 464 | INSTALLDIRS=vendor \ |
2b15ac96 | 465 | OPTIMIZE="%{rpmcflags}" \ |
531ca0ff | 466 | </dev/null |
2b15ac96 | 467 | |
531ca0ff JB |
468 | # avoid rpaths generated by MakeMaker |
469 | perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile | |
470 | ||
d59f5301 JK |
471 | %{__make} \ |
472 | LDFLAGS="%{rpmldflags}" | |
ea774f60 AF |
473 | |
474 | %install | |
475 | rm -rf $RPM_BUILD_ROOT | |
fa43c632 | 476 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log} |
ea774f60 | 477 | |
6789d157 | 478 | %{__make} install \ |
543e900e | 479 | DESTDIR=$RPM_BUILD_ROOT |
ea774f60 | 480 | |
6810e918 AF |
481 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf |
482 | :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf | |
6e818aed | 483 | :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf |
e93f5ac2 | 484 | :> $RPM_BUILD_ROOT%{logfile} |
ea774f60 | 485 | |
60e7e283 | 486 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd |
6810e918 | 487 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf |
60e7e283 | 488 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd |
ea774f60 | 489 | |
60e7e283 | 490 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd |
6810e918 | 491 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf |
60e7e283 | 492 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd |
ea774f60 AF |
493 | |
494 | #install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \ | |
495 | # $RPM_BUILD_ROOT%{_datadir}/snmp/mibs | |
496 | ||
531ca0ff JB |
497 | cd perl |
498 | %{__make} install \ | |
499 | DESTDIR=$RPM_BUILD_ROOT | |
9274a72b | 500 | |
531ca0ff JB |
501 | install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version} |
502 | install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version} | |
b572d007 | 503 | cd .. |
ea774f60 | 504 | |
9274a72b JB |
505 | # IP-Filter (non-Linux) |
506 | rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl | |
507 | ||
7f35dfac | 508 | rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
3a0b5f9c ER |
509 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl |
510 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist | |
7f35dfac | 511 | |
c4627f0b ER |
512 | %if %{with static_libs} |
513 | # hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument | |
514 | for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do | |
515 | rm -f *.o *.a | |
516 | ar x $a DynaLoader.a | |
517 | if [ -f DynaLoader.a ]; then | |
518 | ar x DynaLoader.a | |
519 | ar cr $a DynaLoader.o | |
520 | ar d $a DynaLoader.a | |
521 | # remove second file too | |
522 | ar d $a DynaLoader.a | |
523 | fi | |
524 | done | |
2bacb8e1 ER |
525 | %else |
526 | rm -f $RPM_BUILD_ROOT%{_libdir}/libsnmp.a | |
c4627f0b ER |
527 | %endif |
528 | ||
ae60ec22 JB |
529 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/tests |
530 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py | |
531 | ||
ea774f60 AF |
532 | %clean |
533 | rm -rf $RPM_BUILD_ROOT | |
534 | ||
e93f5ac2 | 535 | %post |
ea774f60 AF |
536 | touch %{logfile} |
537 | chmod 640 %{logfile} | |
fa43c632 ER |
538 | /sbin/chkconfig --add snmpd |
539 | %service snmpd restart "snmpd daemon" | |
ea774f60 | 540 | |
60e7e283 AF |
541 | %preun |
542 | if [ "$1" = "0" ]; then | |
fa43c632 | 543 | %service snmpd stop |
60e7e283 AF |
544 | /sbin/chkconfig --del snmpd |
545 | fi | |
ea774f60 AF |
546 | |
547 | %post libs -p /sbin/ldconfig | |
548 | %postun libs -p /sbin/ldconfig | |
549 | ||
5b201584 JB |
550 | %triggerpostun -- ucd-snmp |
551 | /sbin/chkconfig --add snmpd | |
552 | ||
e93f5ac2 | 553 | %post snmptrapd |
ea774f60 AF |
554 | touch %{logfile} |
555 | chmod 640 %{logfile} | |
fa43c632 ER |
556 | /sbin/chkconfig --add snmptrapd |
557 | %service snmptrapd restart "snmp trap daemon" | |
ea774f60 | 558 | |
60e7e283 AF |
559 | %preun snmptrapd |
560 | if [ "$1" = "0" ]; then | |
fa43c632 | 561 | %service snmptrapd stop |
60e7e283 AF |
562 | /sbin/chkconfig --del snmptrapd |
563 | fi | |
ea774f60 | 564 | |
605b587c | 565 | %triggerpostun snmptrapd -- ucd-snmp-snmptrapd |
5b201584 JB |
566 | /sbin/chkconfig --add snmptrapd |
567 | ||
ea774f60 AF |
568 | %files |
569 | %defattr(644,root,root,755) | |
570 | %doc README local | |
571 | %doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf | |
572 | %doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt | |
573 | ||
60e7e283 | 574 | %attr(754,root,root) /etc/rc.d/init.d/snmpd |
9e8f34e2 | 575 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd |
ea774f60 | 576 | |
9e8f34e2 JB |
577 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf |
578 | %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf | |
ea774f60 AF |
579 | |
580 | %attr(755,root,root) %{_sbindir}/snmpd | |
581 | ||
ea774f60 | 582 | %{_mandir}/man5/snmpd.conf.5* |
a23e7817 JB |
583 | %{_mandir}/man5/snmpd.examples.5* |
584 | %{_mandir}/man5/snmpd.internal.5* | |
ea774f60 | 585 | %{_mandir}/man5/variables.5* |
531ca0ff | 586 | %{_mandir}/man8/snmpd.8* |
ea774f60 | 587 | |
e93f5ac2 | 588 | %attr(640,root,root) %ghost %{logfile} |
ea774f60 AF |
589 | |
590 | %files libs | |
591 | %defattr(644,root,root,755) | |
e043d0db | 592 | %dir %{_sysconfdir}/snmp |
2bacb8e1 ER |
593 | %attr(755,root,root) %{_libdir}/libnetsnmp.so.*.* |
594 | %attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.* | |
595 | %attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.* | |
2bacb8e1 ER |
596 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.15 |
597 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.15 | |
598 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.15 | |
ea774f60 | 599 | |
531ca0ff JB |
600 | %files devel |
601 | %defattr(644,root,root,755) | |
602 | %attr(755,root,root) %{_bindir}/mib2c | |
f2ba5e16 | 603 | %attr(755,root,root) %{_bindir}/mib2c-update |
531ca0ff | 604 | %attr(755,root,root) %{_bindir}/net-snmp-config |
2bacb8e1 ER |
605 | %attr(755,root,root) %{_libdir}/libnetsnmp.so |
606 | %attr(755,root,root) %{_libdir}/libnetsnmpagent.so | |
607 | %attr(755,root,root) %{_libdir}/libnetsnmphelpers.so | |
2bacb8e1 ER |
608 | %{_libdir}/libnetsnmp.la |
609 | %{_libdir}/libnetsnmpagent.la | |
610 | %{_libdir}/libnetsnmphelpers.la | |
531ca0ff JB |
611 | %{_includedir}/net-snmp |
612 | %{_datadir}/snmp/mib2c* | |
613 | %{_mandir}/man1/mib2c.1* | |
a5fe3234 JB |
614 | %{_mandir}/man1/mib2c-update.1* |
615 | %{_mandir}/man1/net-snmp-config.1* | |
bdee8ff5 | 616 | %{_mandir}/man3/[!NS]* |
f2ba5e16 | 617 | %{_mandir}/man5/mib2c.conf.5* |
531ca0ff | 618 | |
c4627f0b | 619 | %if %{with static_libs} |
531ca0ff JB |
620 | %files static |
621 | %defattr(644,root,root,755) | |
622 | %{_libdir}/libnet*.a | |
c4627f0b | 623 | %endif |
531ca0ff | 624 | |
531ca0ff JB |
625 | %files compat-devel |
626 | %defattr(644,root,root,755) | |
627 | %attr(755,root,root) %{_libdir}/libsnmp.so | |
628 | %{_libdir}/libsnmp.la | |
629 | %{_includedir}/ucd-snmp | |
630 | ||
c4627f0b | 631 | %if %{with static_libs} |
531ca0ff JB |
632 | %files compat-static |
633 | %defattr(644,root,root,755) | |
634 | %{_libdir}/libsnmp.a | |
c4627f0b | 635 | %endif |
531ca0ff | 636 | |
60e7e283 AF |
637 | %files mibs |
638 | %defattr(644,root,root,755) | |
ee807caf | 639 | %dir %{_datadir}/snmp |
ea774f60 AF |
640 | %{_datadir}/snmp/mibs |
641 | ||
531ca0ff | 642 | %files snmptrapd |
60e7e283 | 643 | %defattr(644,root,root,755) |
531ca0ff JB |
644 | %attr(755,root,root) %{_sbindir}/snmptrapd |
645 | %attr(754,root,root) /etc/rc.d/init.d/snmptrapd | |
9e8f34e2 JB |
646 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd |
647 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf | |
7470cbdb | 648 | %if %{with perl} |
f2ba5e16 | 649 | %attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl |
7470cbdb | 650 | %endif |
531ca0ff JB |
651 | %{_mandir}/man5/snmptrapd.conf.5* |
652 | %{_mandir}/man8/snmptrapd.8* | |
60e7e283 | 653 | |
ea774f60 AF |
654 | %files utils |
655 | %defattr(644,root,root,755) | |
656 | %attr(755,root,root) %{_bindir}/encode_keychange | |
657 | %attr(755,root,root) %{_bindir}/snmpbulkget | |
658 | %attr(755,root,root) %{_bindir}/snmpbulkwalk | |
659 | %attr(755,root,root) %{_bindir}/snmpdelta | |
6789d157 | 660 | %attr(755,root,root) %{_bindir}/snmpdf |
ea774f60 AF |
661 | %attr(755,root,root) %{_bindir}/snmpget |
662 | %attr(755,root,root) %{_bindir}/snmpgetnext | |
6789d157 | 663 | %attr(755,root,root) %{_bindir}/snmpinform |
ea774f60 AF |
664 | %attr(755,root,root) %{_bindir}/snmpnetstat |
665 | %attr(755,root,root) %{_bindir}/snmpset | |
666 | %attr(755,root,root) %{_bindir}/snmpstatus | |
667 | %attr(755,root,root) %{_bindir}/snmptable | |
668 | %attr(755,root,root) %{_bindir}/snmptest | |
669 | %attr(755,root,root) %{_bindir}/snmptranslate | |
670 | %attr(755,root,root) %{_bindir}/snmptrap | |
671 | %attr(755,root,root) %{_bindir}/snmpusm | |
ea774f60 | 672 | %attr(755,root,root) %{_bindir}/snmpvacm |
6789d157 | 673 | %attr(755,root,root) %{_bindir}/snmpwalk |
a5fe3234 | 674 | %{_mandir}/man1/encode_keychange.1* |
ea774f60 AF |
675 | %{_mandir}/man1/snmpbulkget.1* |
676 | %{_mandir}/man1/snmpbulkwalk.1* | |
677 | %{_mandir}/man1/snmpcmd.1* | |
678 | %{_mandir}/man1/snmpdelta.1* | |
6789d157 | 679 | %{_mandir}/man1/snmpdf.1* |
ea774f60 AF |
680 | %{_mandir}/man1/snmpget.1* |
681 | %{_mandir}/man1/snmpgetnext.1* | |
6789d157 | 682 | %{_mandir}/man1/snmpinform.1* |
ea774f60 AF |
683 | %{_mandir}/man1/snmpnetstat.1* |
684 | %{_mandir}/man1/snmpset.1* | |
685 | %{_mandir}/man1/snmpstatus.1* | |
686 | %{_mandir}/man1/snmptable.1* | |
687 | %{_mandir}/man1/snmptest.1* | |
688 | %{_mandir}/man1/snmptranslate.1* | |
689 | %{_mandir}/man1/snmptrap.1* | |
690 | %{_mandir}/man1/snmpusm.1* | |
6789d157 | 691 | %{_mandir}/man1/snmpvacm.1* |
ea774f60 | 692 | %{_mandir}/man1/snmpwalk.1* |
ea774f60 AF |
693 | %{_mandir}/man5/snmp.conf.5* |
694 | %{_mandir}/man5/snmp_config.5* | |
695 | ||
7bb0c439 | 696 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf |
6e818aed | 697 | |
7470cbdb | 698 | %if %{with perl} |
531ca0ff | 699 | %files -n perl-SNMP |
c4deead5 | 700 | %defattr(644,root,root,755) |
531ca0ff JB |
701 | %doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples |
702 | %{perl_vendorarch}/SNMP.pm | |
703 | %{perl_vendorarch}/NetSNMP | |
704 | %dir %{perl_vendorarch}/auto/SNMP | |
705 | %{perl_vendorarch}/auto/SNMP/autosplit.ix | |
706 | %{perl_vendorarch}/auto/SNMP/SNMP.bs | |
707 | %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so | |
708 | %dir %{perl_vendorarch}/auto/NetSNMP | |
709 | %dir %{perl_vendorarch}/auto/NetSNMP/* | |
710 | %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix | |
711 | %{perl_vendorarch}/auto/NetSNMP/*/*.bs | |
712 | %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so | |
713 | %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store | |
714 | %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix | |
715 | %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs | |
716 | %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so | |
717 | %{_mandir}/man3/NetSNMP::*.3* | |
718 | %{_mandir}/man3/SNMP.3* | |
719 | %{_examplesdir}/perl-SNMP-%{version} | |
720 | ||
ea774f60 AF |
721 | %files utils-perl |
722 | %defattr(644,root,root,755) | |
6789d157 | 723 | %attr(755,root,root) %{_bindir}/fixproc |
60e7e283 | 724 | %attr(755,root,root) %{_bindir}/snmpcheck |
6810e918 | 725 | %attr(755,root,root) %{_bindir}/traptoemail |
a5fe3234 JB |
726 | %{_mandir}/man1/fixproc.1* |
727 | %{_mandir}/man1/traptoemail.1* | |
7470cbdb | 728 | %endif |
531ca0ff JB |
729 | |
730 | %files snmpconf | |
4ec38672 | 731 | %defattr(644,root,root,755) |
531ca0ff | 732 | %attr(755,root,root) %{_bindir}/snmpconf |
60e7e283 AF |
733 | %{_mandir}/man1/snmpconf.1* |
734 | %{_datadir}/snmp/snmpconf-data | |
e93f5ac2 | 735 | |
7470cbdb | 736 | %if %{with perl} |
e93f5ac2 AF |
737 | %files tkmib |
738 | %defattr(644,root,root,755) | |
4ec38672 | 739 | %attr(755,root,root) %{_bindir}/tkmib |
a5fe3234 | 740 | %{_mandir}/man1/tkmib.1* |
7470cbdb | 741 | %endif |
a5fe3234 | 742 | |
7470cbdb | 743 | %if %{with python} |
a5fe3234 JB |
744 | %files -n python-netsnmp |
745 | %defattr(644,root,root,755) | |
746 | %dir %{py_sitedir}/netsnmp | |
747 | %attr(755,root,root) %{py_sitedir}/netsnmp/*.so | |
748 | %{py_sitedir}/netsnmp/*.py[co] | |
749 | %{py_sitedir}/netsnmp_python-*.egg-info | |
7470cbdb | 750 | %endif |