snmp/snmp.spec

changeset 615
b36c21980261
parent 588
300d43423c2e
child 636
17d7a4451299
equal deleted inserted replaced
5:489db9c99e7a 6:c4e18f8b736a
30 Distribution: OpenPKG Community 30 Distribution: OpenPKG Community
31 Class: BASE 31 Class: BASE
32 Group: Network 32 Group: Network
33 License: BSD 33 License: BSD
34 Version: 5.7.1 34 Version: 5.7.1
35 Release: 20120208 35 Release: 20120800
36 36
37 # package options 37 # package options
38 %option with_fsl yes 38 %option with_fsl yes
39 %option with_perl no 39 %option with_perl no
40 %option with_shared no 40 %option with_shared no
52 Patch0: snmp.patch 52 Patch0: snmp.patch
53 Patch1: snmp_agentx.patch 53 Patch1: snmp_agentx.patch
54 Patch2: snmp_iface.patch 54 Patch2: snmp_iface.patch
55 55
56 # build information 56 # build information
57 Prefix: %{l_prefix} 57 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc
58 BuildRoot: %{l_buildroot} 58 PreReq: OpenPKG, openpkg >= 20100101
59 BuildPreReq: OpenPKG, openpkg >= 20060823, gcc
60 PreReq: OpenPKG, openpkg >= 20060823
61 BuildPreReq: openssl 59 BuildPreReq: openssl
62 PreReq: openssl 60 PreReq: openssl
63 %if "%{with_fsl}" == "yes" 61 %if "%{with_fsl}" == "yes"
64 BuildPreReq: fsl 62 BuildPreReq: fsl
65 PreReq: fsl 63 PreReq: fsl
66 %endif 64 %endif
67 %if "%{with_perl}" == "yes" 65 %if "%{with_perl}" == "yes"
68 BuildPreReq: perl 66 BuildPreReq: perl
69 PreReq: perl 67 PreReq: perl
70 %endif 68 %endif
71 AutoReq: no
72 AutoReqProv: no
73 69
74 %description 70 %description
75 This is a toolkit relating to the Simple Network Management Protocol 71 This is a toolkit relating to the Simple Network Management Protocol
76 (SNMP), including an extensible agent, an SNMP library, tools to 72 (SNMP), including an extensible agent, an SNMP library, tools to
77 request or set information from SNMP agents, tools to generate and 73 request or set information from SNMP agents, tools to generate and
175 # build package 171 # build package
176 %{l_make} %{l_mflags} touchit 172 %{l_make} %{l_mflags} touchit
177 %{l_make} %{l_mflags} 173 %{l_make} %{l_mflags}
178 174
179 %install 175 %install
180 rm -rf $RPM_BUILD_ROOT
181
182 # install package 176 # install package
183 %{l_shtool} subst -v \ 177 %{l_shtool} subst -v \
184 -e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \ 178 -e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
185 -e "s;^\\(exec_prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \ 179 -e "s;^\\(exec_prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
186 -e "s;^\\(persistentdir.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/snmp;g" \ 180 -e "s;^\\(persistentdir.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/snmp;g" \
229 '%config %{l_prefix}/etc/snmp/*.conf' 223 '%config %{l_prefix}/etc/snmp/*.conf'
230 224
231 %files -f files 225 %files -f files
232 226
233 %clean 227 %clean
234 rm -rf $RPM_BUILD_ROOT
235 228
236 %post 229 %post
237 # after upgrade, restart service 230 # after upgrade, restart service
238 [ $1 -eq 2 ] || exit 0 231 [ $1 -eq 2 ] || exit 0
239 eval `%{l_rc} snmp status 2>/dev/null` 232 eval `%{l_rc} snmp status 2>/dev/null`

mercurial