snmp/snmp.spec

changeset 326
efe7dfa57059
parent 325
6601d28cfe52
child 327
02bcb113e039
equal deleted inserted replaced
0:8858fcf40b57 1:e458640f15d0
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.6.1 34 Version: 5.6.1
35 Release: 20110104 35 Release: 20110106
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
50 Source3: snmpd.conf 50 Source3: snmpd.conf
51 Source4: snmptrapd.conf 51 Source4: snmptrapd.conf
52 Patch0: snmp.patch 52 Patch0: snmp.patch
53 53
54 # build information 54 # build information
55 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc 55 Prefix: %{l_prefix}
56 PreReq: OpenPKG, openpkg >= 20100101 56 BuildRoot: %{l_buildroot}
57 BuildPreReq: OpenPKG, openpkg >= 20060823, gcc
58 PreReq: OpenPKG, openpkg >= 20060823
57 BuildPreReq: openssl 59 BuildPreReq: openssl
58 PreReq: openssl 60 PreReq: openssl
59 %if "%{with_fsl}" == "yes" 61 %if "%{with_fsl}" == "yes"
60 BuildPreReq: fsl 62 BuildPreReq: fsl
61 PreReq: fsl 63 PreReq: fsl
62 %endif 64 %endif
63 %if "%{with_perl}" == "yes" 65 %if "%{with_perl}" == "yes"
64 BuildPreReq: perl 66 BuildPreReq: perl
65 PreReq: perl 67 PreReq: perl
66 %endif 68 %endif
69 AutoReq: no
70 AutoReqProv: no
67 71
68 %description 72 %description
69 This is a toolkit relating to the Simple Network Management Protocol 73 This is a toolkit relating to the Simple Network Management Protocol
70 (SNMP), including an extensible agent, an SNMP library, tools to 74 (SNMP), including an extensible agent, an SNMP library, tools to
71 request or set information from SNMP agents, tools to generate and 75 request or set information from SNMP agents, tools to generate and
171 # build package 175 # build package
172 %{l_make} %{l_mflags} touchit 176 %{l_make} %{l_mflags} touchit
173 %{l_make} %{l_mflags} 177 %{l_make} %{l_mflags}
174 178
175 %install 179 %install
180 rm -rf $RPM_BUILD_ROOT
176 181
177 # install package 182 # install package
178 %{l_shtool} subst -v \ 183 %{l_shtool} subst -v \
179 -e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \ 184 -e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
180 -e "s;^\\(exec_prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \ 185 -e "s;^\\(exec_prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
224 '%config %{l_prefix}/etc/snmp/*.conf' 229 '%config %{l_prefix}/etc/snmp/*.conf'
225 230
226 %files -f files 231 %files -f files
227 232
228 %clean 233 %clean
234 rm -rf $RPM_BUILD_ROOT
229 235
230 %post 236 %post
231 # after upgrade, restart service 237 # after upgrade, restart service
232 [ $1 -eq 2 ] || exit 0 238 [ $1 -eq 2 ] || exit 0
233 eval `%{l_rc} snmp status 2>/dev/null` 239 eval `%{l_rc} snmp status 2>/dev/null`

mercurial