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