add ghc_check_bootstrap

epel9
Jens Petersen 14 years ago
parent 232d0166b5
commit ed9a00f761

@ -5,17 +5,22 @@
%cabal [ -x Setup ] || ghc --make %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\ %cabal [ -x Setup ] || ghc --make %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\
./Setup ./Setup
# configure # check ghc version was rebuilt against self
%cabal_configure\ %ghc_check_bootstrap\
%if %{undefined ghc_bootstrap}\
if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\
echo "Aborting since this ghc build is not self-bootstrapped.\ echo "Warning: this ghc build is not self-bootstrapped.\
The ghc package should be rebuilt against its current version first\ The ghc package should be rebuilt against its current version first\
to prevent dependency ABI breakage from a future ghc rebuild.\ to prevent dependency ABI breakage from a future ghc rebuild.\
(This can be overridden understanding this risk, by defining ghc_bootstrap.)"\ (This can be overridden understanding this risk, by defining ghc_bootstrap.)"\
%if %{undefined ghc_bootstrap}\
echo "Aborting."\
exit 1\ exit 1\
fi\
%endif\ %endif\
fi
# configure
%cabal_configure\
%ghc_check_bootstrap\
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
# install # install

@ -3,7 +3,7 @@
%global macros_file %{_sysconfdir}/rpm/macros.ghc %global macros_file %{_sysconfdir}/rpm/macros.ghc
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 0.13.3 Version: 0.13.4
Release: 1%{?dist} Release: 1%{?dist}
Summary: Macros for building packages for GHC Summary: Macros for building packages for GHC
@ -34,11 +34,9 @@ echo no build stage needed
%install %install
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file}
install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file}
mkdir -p %{buildroot}/%{_prefix}/lib/rpm install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
install -p %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm
# this is why this package is now arch-dependent: # this is why this package is now arch-dependent:
# turn off shared libs and dynamic linking on secondary archs # turn off shared libs and dynamic linking on secondary archs
@ -60,6 +58,9 @@ EOF
%changelog %changelog
* Fri Jun 17 2011 Jens Petersen <petersen@redhat.com> - 0.13.4-1
- add ghc_check_bootstrap
* Thu Jun 2 2011 Jens Petersen <petersen@redhat.com> - 0.13.3-1 * Thu Jun 2 2011 Jens Petersen <petersen@redhat.com> - 0.13.3-1
- rename macros.ghc-pkg back to macros.ghc - rename macros.ghc-pkg back to macros.ghc
- move the devel summary prefix back to a suffix - move the devel summary prefix back to a suffix

Loading…
Cancel
Save