]> git.pld-linux.org Git - packages/net-snmp.git/blob - net-snmp.spec
- files update
[packages/net-snmp.git] / net-snmp.spec
1 # TODO:
2 # - init scripts (which, what?)
3 # - default configs
4 # - review ucd-snmp-ia64.patch patch
5 #
6 # Conditional build:
7 %bcond_without  autodeps        # don't BR packages only for deps resolving
8 #
9 %include        /usr/lib/rpm/macros.perl
10 Summary:        A collection of SNMP protocol tools
11 Summary(es):    Agente SNMP de la UCD
12 Summary(pl):    Kolekcja narzêdzi do obs³ugi protoko³u SNMP
13 Summary(pt_BR): Agente SNMP da UCD
14 Summary(ru):    îÁÂÏÒ ÕÔÉÌÉÔ ÄÌÑ ÐÒÏÔÏËÏÌÁ SNMP ÏÔ UC-Davis
15 Summary(uk):    îÁ¦ҠÕÔÉ̦ԠÄÌÑ ÐÒÏÔÏËÏÌÕ SNMP ×¦Ä UC-Davis
16 Name:           net-snmp
17 Version:        5.2
18 Release:        0.1
19 License:        BSD-like
20 Group:          Networking/Daemons
21 Source0:        http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
22 # Source0-md5:  af1c18209474ec4851b06504aae2a7c1
23 Source1:        %{name}d.init
24 Source2:        %{name}d.conf
25 Source3:        %{name}d.sysconfig
26 Source4:        %{name}trapd.init
27 Source5:        %{name}trapd.conf
28 Source6:        %{name}trapd.sysconfig
29 Source7:        ftp://ucd-snmp.ucdavis.edu/contrib/ucd-ipchains.tar.gz
30 # Source7-md5:  29949f1008f1a04d6efefd5b3ea607da
31 Patch0:         %{name}-acinclude.patch
32 Patch1:         %{name}-acfix.patch
33 Patch2:         %{name}-rpm-implicit-libs.patch
34 Patch3:         %{name}-config-noflags.patch
35 Patch4:         %{name}-dlopen-fix.patch
36 Patch5:         %{name}-manpage.patch
37 Patch6:         %{name}-link.patch
38 Patch7:         %{name}-llinterfaces.patch
39 Patch8:         %{name}-usr_local_bin_perl.patch
40 Patch9:         %{name}-kernel_headers.patch
41 URL:            http://www.net-snmp.org/
42 BuildRequires:  autoconf >= 2.57-3
43 BuildRequires:  automake
44 BuildRequires:  elfutils-devel
45 BuildRequires:  libtool >= 1.4
46 BuildRequires:  libwrap-devel
47 BuildRequires:  openssl-devel >= 0.9.7d
48 %{?with_autodeps:BuildRequires: perl-Term-ReadKey}
49 BuildRequires:  perl-devel >= 1:5.8.0
50 BuildRequires:  rpm-devel >= 4.0
51 BuildRequires:  rpm-perlprov >= 3.0.3-16
52 PreReq:         rc-scripts >= 0.2.0
53 PreReq:         %{name}-libs = %{version}-%{release}
54 Requires(post,preun):   /sbin/chkconfig
55 Requires:       /usr/bin/setsid
56 Provides:       snmpd
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Obsoletes:      cmu-snmp
59 Obsoletes:      snmpd
60 Obsoletes:      ucd-snmp
61
62 %define         logfile         /var/log/snmpd.log
63
64 %description
65 SNMP (Simple Network Management Protocol) is a protocol used for
66 network management (hence the name). The net-snmp project includes
67 various SNMP tools: an extensible agent, an SNMP library, tools for
68 requesting or setting information from SNMP agents, tools for
69 generating and handling SNMP traps, a version of the netstat command
70 which uses SNMP, and a Tk/Perl mib browser. This package contains the
71 snmpd daemon, documentation, etc.
72
73 %description -l es
74 Este paquete se deriva de la implementación del Protocolo Simple de
75 Gestión de Redes versión 2 (SNMPv2) de la Universidad Carnegie Mellon.
76 Útil para administrar redes y hacer contabilidad.
77
78 %description -l pl
79 SNMP (Simple Network Management Protocol) jest protoko³em u¿ywanym do
80 zarz±dzania sieciami. Pakiet zawiera narzêdzia: rozbudowywalnego
81 agenta, bibliotekê SNMP, narzêdzia do odpytywania oraz ustawiania
82 informacji poprzez agentów SNMP, narzêdzia do generowania i obs³ugi
83 pu³apek SNMP, wersjê komendy netstat u¿ywaj±c± SNMP, przegl±darkê mib
84 w Tk/Perl, demona, dokumentacjê itp.
85
86 %description -l pt_BR
87 Este pacote é derivado da implementação do Protocolo Simples de
88 Gerenciamento de Redes versão 2 (SNMPv2) da Universidade Carnegie
89 Mellon. Útil para gerenciar redes e fazer contabilidade.
90
91 %description -l ru
92 SNMP (Simple Network Management Protocol) - ÜÔÏ ÐÒÏÔÏËÏÌ, ÉÓÐÏÌØÚÕÅÍÙÊ
93 ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ (ÏÔÓÀÄÁ É ÎÁÚ×ÁÎÉÅ). ðÒÏÅËÔ net-snmp ×ËÌÀÞÁÅÔ
94 ÒÁÚÎÏÏÂÒÁÚÎÙÅ SNMP-ÕÔÉÌÉÔÙ: ÒÁÓÛÉÒÑÅÍÙÊ ÁÇÅÎÔ, ÂÉÂÌÉÏÔÅËÁ SNMP,
95 ÕÔÉÌÉÔÙ ÄÌÑ ÚÁÐÒÏÓÁ ÉÌÉ ÕÓÔÁÎÏ×ËÉ ÉÎÆÏÒÍÁÃÉÉ ÏÔ SNMP-ÁÇÅÎÔÏ×, ÕÔÉÌÉÔÙ
96 ÄÌÑ ÇÅÎÅÒÁÃÉÉ É ÏÂÒÁÂÏÔËÉ SNMP-ÔÒÁÐÏ×, ×ÅÒÓÉÑ ËÏÍÁÎÄÙ netstat,
97 ÉÓÐÏÌØÚÕÀÝÅÊ SNMP, É mib-ÂÒÁÕÚÅÒ ÎÁ Tk/Perl. üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ
98 ÄÅÍÏÎÙ snmpd É snmptrapd, ÄÏËÕÍÅÎÔÁÃÉÀ É Ô.Ä.
99
100 %description -l uk
101 SNMP (Simple Network Management Protocol) - ÃÅ ÐÒÏÔÏËÏÌ, ÑËÉÊ
102 ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÌÑ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ (ÚצÄÓÉ ¦ ÎÁÚ×Á). ðÒÏÅËÔ net-snmp
103 ͦÓÔÉÔØ Ò¦ÚÎÏÍÁΦÔΦ SNMP-ÕÔÉ̦ÔÉ: ÒÏÚÛÉÒÀ×ÁÎÉÊ ÁÇÅÎÔ, Â¦Â̦ÏÔÅËÁ
104 SNMP, ÕÔÉ̦ÔÉ ÄÌÑ ÚÁÐÒÏÓÕ ÔÁ ×ÓÔÁÎÏ×ÌÅÎÎÑ ¦ÎÆÏÒÍÁ槠צĠNMP-ÁÇÅÎÔ¦×,
105 ÕÔÉ̦ÔÉ ÄÌÑ ÇÅÎÅÒÁ槠ÔÁ ÏÂÒÏÂËÉ SNMP-ÔÒÁЦ×, ×ÅÒӦѠËÏÍÁÎÄÉ netstat,
106 ÑËÁ ×ÉËÏÒÉÓÔÏ×Õ¤ SNMP, ÔÁ mib-ÂÒÁÕÚÅÒ ÎÁ Tk/Perl. ãÅÊ ÐÁËÅԠͦÓÔÉÔØ
107 ÄÅÍÏÎÉ snmpd ÔÁ snmptrapd, ÄÏËÕÍÅÎÔÁæÀ ¦ Ô.¦.
108
109 %package libs
110 Summary:        NET SNMP libraries
111 Summary(pl):    Biblioteki SNMP
112 Group:          Libraries
113 Requires:       %{name}-mibs = %{version}-%{release}
114 Obsoletes:      net-snmp-compat-libs
115 Obsoletes:      ucd-snmp-libs
116
117 %description libs
118 NET SNMP libraries.
119
120 %description libs -l pl
121 Biblioteki SNMP.
122
123 %package devel
124 Summary:        The development environment for the net-snmp project
125 Summary(es):    Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
126 Summary(pl):    Pliki dla programistów u¿ywaj±cych bibliotek net-snmp
127 Summary(pt_BR): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
128 Summary(ru):    óÒÅÄÁ ÒÁÚÒÁÂÏÔËÉ ÄÌÑ ÐÒÏÅËÔÁ UCD-SNMP
129 Summary(uk):    óÅÒÅÄÏ×ÉÝÅ ÒÏÚÒÏÂËÉ ÄÌÑ ÐÒÏÅËÔÕ UCD-SNMP
130 Group:          Development/Libraries
131 Requires:       %{name}-libs = %{version}-%{release}
132 Requires:       elfutils-devel
133 Requires:       openssl-devel >= 0.9.7c
134 Obsoletes:      ucd-snmp-devel
135
136 %description devel
137 The ucd-snmp-devel package contains the development libraries and
138 header files for use with the net-snmp project's network management
139 tools.
140
141 %description devel -l es
142 Estas son las bibliotecas y archivos de inclusión para desarrollo con
143 el SNMP de la UCD. Con este paquete es posible la creación de
144 programas para uso en la gestión de redes.
145
146 %description devel -l pl
147 Pakiet zawiera pliki nag³ówkowe i biblioteki potrzebne do rozwoju
148 aplikacji u¿ywaj±cych protoko³u SNMP.
149
150 %description devel -l pt_BR
151 Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
152 com o SNMP da UCD. Com este pacote é possível a criação de programas
153 para uso no gerenciamento de redes.
154
155 %description devel -l ru
156 ðÁËÅÔ ucd-snmp-devel ÓÏÄÅÒÖÉÔ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ É ÈÅÄÅÒÁ ÄÌÑ
157 ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ó ÕÔÉÌÉÔÁÍÉ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ ÐÒÏÅËÔÁ net-snmp.
158
159 %description devel -l uk
160 ðÁËÅÔ ucd-snmp-devel Í¦ÓÔÉÔؠ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÔÁ ÈÅÄÅÒÉ ÄÌÑ
161 ×ÉËÏÒÉÓÔÁÎÎÑ Ú ÕÔÉ̦ÔÁÍÉ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ ÐÒÏÅËÔÕ net-snmp.
162
163 %package static
164 Summary:        Static net-snmp libraries
165 Summary(pl):    Statyczne biblioteki net-snmp
166 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com ucd-snmp
167 Summary(ru):    óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÁ net-snmp
168 Summary(uk):    óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÕ net-snmp
169 Group:          Development/Libraries
170 Requires:       %{name}-devel = %{version}-%{release}
171 Obsoletes:      ucd-snmp-static
172
173 %description static
174 Static net-snmp libraries.
175
176 %description static -l pl
177 Statyczne biblioteki net-snmp.
178
179 %description static -l pt_BR
180 Bibliotecas estáticas para desenvolvimento com net-snmp.
181
182 %package compat-devel
183 Summary:        The development environment for the UCD-SNMP project
184 Summary(es):    Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
185 Summary(pl):    Pliki dla programistów u¿ywaj±cych bibliotek UCD-SNMP
186 Summary(pt_BR): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
187 Summary(ru):    óÒÅÄÁ ÒÁÚÒÁÂÏÔËÉ ÄÌÑ ÐÒÏÅËÔÁ UCD-SNMP
188 Summary(uk):    óÅÒÅÄÏ×ÉÝÅ ÒÏÚÒÏÂËÉ ÄÌÑ ÐÒÏÅËÔÕ UCD-SNMP
189 Group:          Development/Libraries
190 Requires:       %{name}-libs = %{version}-%{release}
191 Requires:       openssl-devel >= 0.9.7d
192 Obsoletes:      cmu-snmp-devel
193 Obsoletes:      ucd-snmp-devel
194
195 %description compat-devel
196 The ucd-snmp-devel package contains the development libraries and
197 header files for use with the UCD-SNMP project's network management
198 tools.
199
200 %description compat-devel -l es
201 Estas son las bibliotecas y archivos de inclusión para desarrollo con
202 el SNMP de la UCD. Con este paquete es posible la creación de
203 programas para uso en la gestión de redes.
204
205 %description compat-devel -l pl
206 Pakiet zawiera pliki nag³ówkowe i biblioteki potrzebne do rozwoju
207 aplikacji u¿ywaj±cych protoko³u SNMP.
208
209 %description compat-devel -l pt_BR
210 Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
211 com o SNMP da UCD. Com este pacote é possível a criação de programas
212 para uso no gerenciamento de redes.
213
214 %description compat-devel -l ru
215 ðÁËÅÔ ucd-snmp-devel ÓÏÄÅÒÖÉÔ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ É ÈÅÄÅÒÁ ÄÌÑ
216 ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ó ÕÔÉÌÉÔÁÍÉ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ ÐÒÏÅËÔÁ UCD-SNMP.
217
218 %description compat-devel -l uk
219 ðÁËÅÔ ucd-snmp-devel Í¦ÓÔÉÔؠ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÔÁ ÈÅÄÅÒÉ ÄÌÑ
220 ×ÉËÏÒÉÓÔÁÎÎÑ Ú ÕÔÉ̦ÔÁÍÉ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ ÐÒÏÅËÔÕ UCD-SNMP.
221
222 %package compat-static
223 Summary:        Static UCD-SNMP libraries
224 Summary(pl):    Statyczne biblioteki UCD-SNMP
225 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com ucd-snmp
226 Summary(ru):    óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÁ UCD-SNMP
227 Summary(uk):    óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÕ UCD-SNMP
228 Group:          Development/Libraries
229 Requires:       %{name}-compat-devel = %{version}-%{release}
230 Obsoletes:      ucd-snmp-static
231
232 %description compat-static
233 Static UCD-SNMP libraries.
234
235 %description compat-static -l pl
236 Statyczne biblioteki UCD-SNMP.
237
238 %description compat-static -l pt_BR
239 Bibliotecas estáticas para desenvolvimento com ucd-snmp.
240
241 %package mibs
242 Summary:        MIB database
243 Summary(pl):    Baza danych MIB
244 Group:          Applications/System
245 Conflicts:      ucd-snmp-libs
246
247 %description mibs
248 MIB database.
249
250 %description mibs -l pl
251 Baza danych MIB.
252
253 %package snmptrapd
254 Summary:        SNMP trap daemon
255 Summary(pl):    Demon obs³uguj±cy pu³apki SNMP
256 Group:          Applications/System
257 PreReq:         %{name} = %{version}-%{release}
258 PreReq:         rc-scripts >= 0.2.0
259 Requires(post,preun):   /sbin/chkconfig
260 Obsoletes:      cmu-snmp-utils
261 Obsoletes:      ucd-snmp-snmptrapd
262
263 %description snmptrapd
264 The ucd-snmp-snmptrapd package contains snmp trap daemon.
265
266 %description snmptrapd -l pl
267 Pakiet zawiera demon obs³uguj±cy pu³apki SNMP.
268
269 %package utils
270 Summary:        Network management utilities using SNMP, from the NET-SNMP project
271 Summary(es):    Utilitarios del SNMP de la UCD
272 Summary(pl):    Narzêdzia u¿ywaj±ce protoko³u SNMP
273 Summary(pt_BR): Utilitários do SNMP da UCD
274 Summary(ru):    õÔÉÌÉÔÙ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ ÐÏ SNMP ÉÚ ÐÒÏÅËÔÁ NET-SNMP
275 Summary(uk):    õÔÉ̦ÔÉ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ ÐÏ SNMP Ú ÐÒÏÅËÔÕ NET-SNMP
276 Group:          Applications/System
277 Requires:       %{name}-libs = %{version}-%{release}
278 Obsoletes:      cmu-snmp-utils
279 Obsoletes:      ucd-snmp-utils
280
281 %description utils
282 This package contains various utilities for managing your network
283 using the SNMP protocol.
284
285 %description utils -l es
286 Varios utilitarios para uso con el SNMP de la UCD. Contiene
287 utilitarios como: snmpwalk, snmptest y otros.
288
289 %description utils -l pl
290 Ró¿nego rodzaju narzêdzia do zarz±dzania sieci± przy u¿yciu protoko³u
291 SNMP.
292
293 %description utils -l pt_BR
294 Vários utilitários para uso com o SNMP da UCD. Contém utilitários
295 como: snmpwalk, snmptest e outros.
296
297 %description utils -l ru
298 ðÁËÅÔ ucd-snmp-utils ÓÏÄÅÒÖÉÔ ÒÁÚÎÏÏÂÒÁÚÎÙÅ ÕÔÉÌÉÔÙ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ
299 × ÐÒÏÅËÔÅ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ net-snmp.
300
301 %description utils -l uk
302 ðÁËÅÔ ucd-snmp-utils Í¦ÓÔÉÔØ Ò¦ÚÎÏÍÁΦÔΦ ÕÔÉ̦ÔÉ ÄÌÑ ×ÉËÏÒÉÓÔÁÎÎÑ ×
303 ÐÒÏÅËÔ¦ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ net-snmp.
304
305 %package -n perl-SNMP
306 Summary:        SNMP and NetSNMP::* Perl modules
307 Summary(pl):    Modu³y Perla SNMP oraz NetSNMP::*
308 Group:          Development/Languages/Perl
309 Requires:       %{name}-libs = %{version}-%{release}
310 Conflicts:      ucd-snmp-utils-perl
311
312 %description -n perl-SNMP
313 SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp.
314
315 %description -n perl-SNMP -l pl
316 Modu³y Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp.
317
318 %package utils-perl
319 Summary:        Perl utilities for network management using SNMP
320 Summary(pl):    Perlowe narzêdzia u¿ywaj±ce protoko³u SNMP
321 Group:          Applications/System
322 Requires:       perl-SNMP = %{version}-%{release}
323 Obsoletes:      cmu-snmp-utils
324 Obsoletes:      ucd-snmp-utils-perl
325
326 %description utils-perl
327 This package contains various Perl utilities for managing your network
328 using the SNMP protocol.
329
330 %description utils-perl -l pl
331 Perlowe narzêdzia do zarz±dzania sieci± przy u¿yciu protoko³u SNMP.
332
333 %package snmpconf
334 Summary:        snmpconf - creating and modifying SNMP configuration files
335 Summary(pl):    snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP
336 Group:          Applications/System
337 Requires:       %{name} = %{version}-%{release}
338 Requires:       perl-SNMP = %{version}-%{release}
339
340 %description snmpconf
341 snmpconf is a simple Perl script that walks you through setting up a
342 configuration file step by step. It should be fairly straight forward
343 to use.
344
345 %description snmpconf -l pl
346 snmpconf to prosty skrypt Perla pozwalaj±cy na tworzenie pliku
347 konfiguracyjnego krok po kroku. Powinien byæ w miarê prosty w u¿yciu.
348
349 %package tkmib
350 Summary:        MIB browser in Tk
351 Summary(pl):    Przegl±darka MIB-ów w Tk
352 Group:          Applications/System
353 Requires:       perl-SNMP = %{version}-%{release}
354 Requires:       perl-Tk
355
356 %description tkmib
357 MIB browser in Tk.
358
359 %description tkmib -l pl
360 Przegl±darka MIB-ów w Tk.
361
362 %prep
363 %setup -q -a7
364 %patch0 -p1
365 %patch1 -p1
366 %patch2 -p1
367 %patch3 -p1
368 %patch4 -p1
369 %patch5 -p1
370 %patch6 -p1
371 %patch7 -p1
372 %patch8 -p1
373 %patch9 -p1
374
375 %build
376 %{__libtoolize}
377 %{__aclocal}
378 %{__autoheader}
379 %{__autoconf}
380 %configure \
381         --with-logfile="%{logfile}" \
382         --with-cflags="%{rpmcflags} -I%{_includedir}/rpm" \
383         --with-ldflags="%{rpmldflags}" \
384         --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback " \
385         --with-sys-location="Unknown" \
386         --with-mib-modules="host disman/event-mib smux mibII/mta_sendmail \
387                 agentx target misc/ipfwacc tunnel" \
388         --with-libwrap \
389         --with-openssl \
390         --disable-debugging \
391         --with-persistent-directory="/var/lib/net-snmp" \
392         --enable-ipv6 \
393         --enable-reentrant \
394         --with-sys-contact="root@localhost" \
395         --enable-ucd-snmp-compatibility \
396         --with-defaults \
397         --with-default-snmp-version=3 \
398         --enable-shared
399 %{__make}
400
401 TDIR="`pwd`"
402 cd perl
403 sed -e "s@-L/usr/lib@-L${TDIR}/snmplib/.libs -L${TDIR}/agent/.libs -L${TDIR}/agent/helpers/.libs@" \
404         ../net-snmp-config > net-snmp-config
405 chmod +x net-snmp-config
406
407 PATH=`pwd`:$PATH \
408 %{__perl} Makefile.PL \
409         INSTALLDIRS=vendor \
410         OPTIMIZE="%{rpmcflags} -I`pwd`/../include" \
411         </dev/null
412 # avoid rpaths generated by MakeMaker
413 perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
414
415 %{__make} \
416         LDFLAGS="%{rpmldflags}"
417
418 %install
419 rm -rf $RPM_BUILD_ROOT
420 install -d $RPM_BUILD_ROOT{/etc/{snmp,rc.d/init.d,sysconfig},/var/log}
421
422 %{__make} install \
423         INSTALL_PREFIX=$RPM_BUILD_ROOT
424
425 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
426 :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf
427 :> $RPM_BUILD_ROOT%{logfile}
428
429 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
430 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
431 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd
432
433 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
434 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
435 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
436
437 #install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \
438 #       $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
439
440 cd perl
441 %{__make} install \
442         DESTDIR=$RPM_BUILD_ROOT
443
444 install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
445 install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
446
447 # IP-Filter (non-Linux)
448 rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
449
450 %clean
451 rm -rf $RPM_BUILD_ROOT
452
453 %post
454 /sbin/chkconfig --add snmpd
455 if [ -f /var/lock/subsys/snmpd ]; then
456         /etc/rc.d/init.d/snmpd restart >&2
457 else
458         echo "Run \"/etc/rc.d/init.d/snmpd start\" to start snmpd daemon." >&2
459 fi
460 touch %{logfile}
461 chmod 640 %{logfile}
462
463 %preun
464 if [ "$1" = "0" ]; then
465         if [ -f /var/lock/subsys/snmpd ]; then
466                 /etc/rc.d/init.d/snmpd stop >&2
467         fi
468         /sbin/chkconfig --del snmpd
469 fi
470
471 %post   libs -p /sbin/ldconfig
472 %postun libs -p /sbin/ldconfig
473
474 %post snmptrapd
475 /sbin/chkconfig --add snmptrapd
476 if [ -f /var/lock/subsys/snmptrapd ]; then
477         /etc/rc.d/init.d/snmptrapd restart >&2
478 else
479         echo "Run \"/etc/rc.d/init.d/snmptrapd start\" to start snmp trap daemon." >&2
480 fi
481 touch %{logfile}
482 chmod 640 %{logfile}
483
484 %preun snmptrapd
485 if [ "$1" = "0" ]; then
486         if [ -f /var/lock/subsys/snmptrapd ]; then
487                 /etc/rc.d/init.d/snmptrapd stop >&2
488         fi
489         /sbin/chkconfig --del snmptrapd
490 fi
491
492 %files
493 %defattr(644,root,root,755)
494 %doc README local
495 %doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
496 %doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
497
498 %attr(754,root,root) /etc/rc.d/init.d/snmpd
499 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/snmpd
500
501 %dir %{_sysconfdir}/snmp
502 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/snmp/snmpd.conf
503 %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/snmp/snmpd.local.conf
504
505 %attr(755,root,root) %{_sbindir}/snmpd
506
507 %{_mandir}/man5/snmpd.conf.5*
508 %{_mandir}/man5/variables.5*
509 %{_mandir}/man8/snmpd.8*
510
511 %attr(640,root,root) %ghost %{logfile}
512
513 %files libs
514 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_libdir}/libnet*.so.*.*
516
517 %files devel
518 %defattr(644,root,root,755)
519 %attr(755,root,root) %{_bindir}/mib2c
520 %attr(755,root,root) %{_bindir}/mib2c-update
521 %attr(755,root,root) %{_bindir}/net-snmp-config
522 %attr(755,root,root) %{_libdir}/libnet*[a-z].so
523 %{_libdir}/libnet*.la
524 %{_includedir}/net-snmp
525 %{_datadir}/snmp/mib2c*
526 %{_mandir}/man1/mib2c.1*
527 %{_mandir}/man3/[!NS]*
528 %{_mandir}/man5/mib2c.conf.5*
529
530 %files static
531 %defattr(644,root,root,755)
532 %{_libdir}/libnet*.a
533
534 %files compat-devel
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_libdir}/libsnmp.so
537 %{_libdir}/libsnmp.la
538 %{_includedir}/ucd-snmp
539
540 %files compat-static
541 %defattr(644,root,root,755)
542 %{_libdir}/libsnmp.a
543
544 %files mibs
545 %defattr(644,root,root,755)
546 %dir %{_datadir}/snmp
547 %{_datadir}/snmp/mibs
548
549 %files snmptrapd
550 %defattr(644,root,root,755)
551 %attr(755,root,root) %{_sbindir}/snmptrapd
552 %attr(754,root,root) /etc/rc.d/init.d/snmptrapd
553 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/snmptrapd
554 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/snmp/snmptrapd.conf
555 %attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
556 %{_mandir}/man5/snmptrapd.conf.5*
557 %{_mandir}/man8/snmptrapd.8*
558
559 %files utils
560 %defattr(644,root,root,755)
561 %attr(755,root,root) %{_bindir}/encode_keychange
562 %attr(755,root,root) %{_bindir}/snmpbulkget
563 %attr(755,root,root) %{_bindir}/snmpbulkwalk
564 %attr(755,root,root) %{_bindir}/snmpdelta
565 %attr(755,root,root) %{_bindir}/snmpdf
566 %attr(755,root,root) %{_bindir}/snmpget
567 %attr(755,root,root) %{_bindir}/snmpgetnext
568 %attr(755,root,root) %{_bindir}/snmpinform
569 %attr(755,root,root) %{_bindir}/snmpnetstat
570 %attr(755,root,root) %{_bindir}/snmpset
571 %attr(755,root,root) %{_bindir}/snmpstatus
572 %attr(755,root,root) %{_bindir}/snmptable
573 %attr(755,root,root) %{_bindir}/snmptest
574 %attr(755,root,root) %{_bindir}/snmptranslate
575 %attr(755,root,root) %{_bindir}/snmptrap
576 %attr(755,root,root) %{_bindir}/snmpusm
577 %attr(755,root,root) %{_bindir}/snmpvacm
578 %attr(755,root,root) %{_bindir}/snmpwalk
579
580 %{_mandir}/man1/snmpbulkget.1*
581 %{_mandir}/man1/snmpbulkwalk.1*
582 %{_mandir}/man1/snmpcmd.1*
583 %{_mandir}/man1/snmpdelta.1*
584 %{_mandir}/man1/snmpdf.1*
585 %{_mandir}/man1/snmpget.1*
586 %{_mandir}/man1/snmpgetnext.1*
587 %{_mandir}/man1/snmpinform.1*
588 %{_mandir}/man1/snmpnetstat.1*
589 %{_mandir}/man1/snmpset.1*
590 %{_mandir}/man1/snmpstatus.1*
591 %{_mandir}/man1/snmptable.1*
592 %{_mandir}/man1/snmptest.1*
593 %{_mandir}/man1/snmptranslate.1*
594 %{_mandir}/man1/snmptrap.1*
595 %{_mandir}/man1/snmpusm.1*
596 %{_mandir}/man1/snmpvacm.1*
597 %{_mandir}/man1/snmpwalk.1*
598 %{_mandir}/man5/snmp.conf.5*
599 %{_mandir}/man5/snmp_config.5*
600
601 %files -n perl-SNMP
602 %defattr(644,root,root,755)
603 %doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
604 %{perl_vendorarch}/SNMP.pm
605 %{perl_vendorarch}/NetSNMP
606 %dir %{perl_vendorarch}/auto/SNMP
607 %{perl_vendorarch}/auto/SNMP/autosplit.ix
608 %{perl_vendorarch}/auto/SNMP/SNMP.bs
609 %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
610 %dir %{perl_vendorarch}/auto/NetSNMP
611 %dir %{perl_vendorarch}/auto/NetSNMP/*
612 %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
613 %{perl_vendorarch}/auto/NetSNMP/*/*.bs
614 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
615 %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
616 %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
617 %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
618 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
619 %{_mandir}/man3/NetSNMP::*.3*
620 %{_mandir}/man3/SNMP.3*
621 %{_examplesdir}/perl-SNMP-%{version}
622
623 %files utils-perl
624 %defattr(644,root,root,755)
625 %attr(755,root,root) %{_bindir}/fixproc
626 %attr(755,root,root) %{_bindir}/snmpcheck
627 %attr(755,root,root) %{_bindir}/traptoemail
628
629 %files snmpconf
630 %defattr(644,root,root,755)
631 %attr(755,root,root) %{_bindir}/snmpconf
632 %{_mandir}/man1/snmpconf.1*
633 %{_datadir}/snmp/snmpconf-data
634
635 %files tkmib
636 %defattr(644,root,root,755)
637 %attr(755,root,root) %{_bindir}/tkmib
This page took 0.103465 seconds and 4 git commands to generate.