44 # list of sources |
44 # list of sources |
45 Source0: http://www.mico.org/mico-%{version}.tar.gz |
45 Source0: http://www.mico.org/mico-%{version}.tar.gz |
46 Source2: rc.mico |
46 Source2: rc.mico |
47 |
47 |
48 # build information |
48 # build information |
49 Prefix: %{l_prefix} |
49 BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes |
50 BuildRoot: %{l_buildroot} |
50 PreReq: OpenPKG, openpkg >= 20100101 |
51 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes |
|
52 PreReq: OpenPKG, openpkg >= 20060823 |
|
53 %if "%{with_ssl}" == "yes" |
51 %if "%{with_ssl}" == "yes" |
54 BuildPreReq: openssl |
52 BuildPreReq: openssl |
55 PreReq: openssl |
53 PreReq: openssl |
56 %endif |
54 %endif |
57 %if "%{with_x11}" == "yes" |
55 %if "%{with_x11}" == "yes" |
149 --disable-shared |
148 --disable-shared |
150 touch cpp/.depend |
149 touch cpp/.depend |
151 %{l_make} %{l_mflags -O} |
150 %{l_make} %{l_mflags -O} |
152 |
151 |
153 %install |
152 %install |
154 rm -rf $RPM_BUILD_ROOT |
|
155 |
|
156 # make directory structure |
153 # make directory structure |
157 %{l_shtool} mkdir -f -p -m 755 \ |
154 %{l_shtool} mkdir -f -p -m 755 \ |
158 $RPM_BUILD_ROOT%{l_prefix}/bin \ |
155 $RPM_BUILD_ROOT%{l_prefix}/bin \ |
159 $RPM_BUILD_ROOT%{l_prefix}/lib \ |
156 $RPM_BUILD_ROOT%{l_prefix}/lib \ |
160 $RPM_BUILD_ROOT%{l_prefix}/include/mico \ |
157 $RPM_BUILD_ROOT%{l_prefix}/include/mico \ |
203 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mico' |
200 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mico' |
204 |
201 |
205 %files -f files |
202 %files -f files |
206 |
203 |
207 %clean |
204 %clean |
208 rm -rf $RPM_BUILD_ROOT |
|
209 |
205 |
210 %pre |
206 %pre |
211 # before upgrade, save status and stop service |
207 # before upgrade, save status and stop service |
212 [ $1 -eq 2 ] || exit 0 |
208 [ $1 -eq 2 ] || exit 0 |
213 eval `%{l_rc} mico status 2>/dev/null | tee %{l_tmpfile}` |
209 eval `%{l_rc} mico status 2>/dev/null | tee %{l_tmpfile}` |