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