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