use %buildroot instead of $RPM_BUILD_ROOT ; remove HS*.o files

This commit is contained in:
Jens Petersen 2012-09-30 17:52:34 +09:00
parent e866330046
commit ac56c4ea87

View File

@ -258,7 +258,10 @@ export CFLAGS="${CFLAGS:-%optflags}"
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make DESTDIR=${RPM_BUILD_ROOT} install make DESTDIR=%{buildroot} install
# this should be done in the buildsys
find %{buildroot} -type f -name "HS*.o" -delete
for i in %{ghc_packages_list}; do for i in %{ghc_packages_list}; do
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/") name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
@ -285,28 +288,28 @@ echo "%doc libraries/LICENSE.%1" >> ghc-%2.files
%merge_filelist bin-package-db ghc %merge_filelist bin-package-db ghc
%if %{undefined ghc_without_shared} %if %{undefined ghc_without_shared}
ls $RPM_BUILD_ROOT%{ghclibdir}/libHS*.so >> ghc-base.files ls %{buildroot}%{ghclibdir}/libHS*.so >> ghc-base.files
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base.files sed -i -e "s|^%{buildroot}||g" ghc-base.files
%endif %endif
ls -d $RPM_BUILD_ROOT%{ghclibdir}/libHS*.a $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d/builtin_*.conf $RPM_BUILD_ROOT%{ghclibdir}/include >> ghc-base-devel.files ls -d %{buildroot}%{ghclibdir}/libHS*.a %{buildroot}%{ghclibdir}/package.conf.d/builtin_*.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base-devel.files sed -i -e "s|^%{buildroot}||g" ghc-base-devel.files
# these are handled as alternatives # these are handled as alternatives
for i in hsc2hs runhaskell; do for i in hsc2hs runhaskell; do
if [ -x ${RPM_BUILD_ROOT}%{_bindir}/$i-ghc ]; then if [ -x %{buildroot}%{_bindir}/$i-ghc ]; then
rm ${RPM_BUILD_ROOT}%{_bindir}/$i rm %{buildroot}%{_bindir}/$i
else else
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc} mv %{buildroot}%{_bindir}/$i{,-ghc}
fi fi
touch ${RPM_BUILD_ROOT}%{_bindir}/$i touch %{buildroot}%{_bindir}/$i
done done
%ghc_strip_dynlinked %ghc_strip_dynlinked
%if %{undefined without_haddock} %if %{undefined without_haddock}
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.hourly mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly
install -p --mode=755 %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.hourly/ghc-doc-index install -p --mode=755 %SOURCE3 %{buildroot}%{_sysconfdir}/cron.hourly/ghc-doc-index
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/ghc mkdir -p %{buildroot}%{_localstatedir}/lib/ghc
%endif %endif
%check %check
@ -432,6 +435,7 @@ fi
- use Karel Gardas' ARM hardfloat patch committed upstream - use Karel Gardas' ARM hardfloat patch committed upstream
- use _smp_mflags again - use _smp_mflags again
- disable Cabal building ghci lib files - disable Cabal building ghci lib files
- forcibly remove HS*.o files from ghc libs for now
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.1-6 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild