check PKGBASEDIR, ghc bootstrapping, ghc_reindex_haddock nop, drop ghc-*-doc provides

- ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package
- abort cabal_configure if ghc is not self-bootstrapped
- make ghc_reindex_haddock a safe no-op
- no longer provide ghc-*-doc
- no longer run ghc_reindex_haddock in ghc-*-devel scripts
epel9
Jens Petersen 14 years ago
parent 82b34c5629
commit cd30bb3547

@ -18,7 +18,9 @@ case $MODE in
*) echo "`basename $0`: Need --provides or --requires" ; exit 1
esac
SHARED=$(find $PKGBASEDIR -type f -name '*.so')
if [ -d "$PKGBASEDIR" ]; then
SHARED=$(find $PKGBASEDIR -type f -name '*.so')
fi
GHCVERSION=$(ghc --numeric-version)

@ -7,6 +7,15 @@
# configure
%cabal_configure\
%if %{undefined ghc_bootstrap}\
if ! ghc --info | grep -q "(\"Booter version\",\"%{ghc_version}\")"; then\
echo "Aborting since this ghc build is not ABI self-bootstrapped.\
The ghc package should be rebuilt against its current version first\
to prevent avoid any potential future dependency breakage.\
(This can be overridden by defining ghc_bootstrap at your own risk.)"\
exit 1\
fi\
%endif\
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
# install
@ -128,9 +137,8 @@ This package provides the shared library.\
%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
# for docs post and postun
%ghc_reindex_haddock\
%{nil}
# (deprecated) for docs post and postun
%ghc_reindex_haddock :
# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
%ghc_package_devel(c:h:l:)\
@ -154,7 +162,6 @@ Group: Development/Libraries\
%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\
Obsoletes: %{basepkg}-doc < %{version}-%{release}\
Provides: %{basepkg}-doc = %{version}-%{release}\
\
%description -n %{basepkg}-devel\
%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
@ -163,11 +170,9 @@ This package contains the development files.\
\
%post -n %{basepkg}-devel\
%ghc_pkg_recache\
%ghc_reindex_haddock\
\
%postun -n %{basepkg}-devel\
%ghc_pkg_recache\
%ghc_reindex_haddock\
\
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
%defattr(-,root,root,-)\

@ -1,7 +1,7 @@
%global debug_package %{nil}
Name: ghc-rpm-macros
Version: 0.11.12
Version: 0.11.13
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -58,6 +58,13 @@ EOF
%changelog
* Mon Mar 28 2011 Jens Petersen <petersen@redhat.com> - 0.11.13-1
- ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package
- abort cabal_configure if ghc is not self-bootstrapped
- make ghc_reindex_haddock a safe : no-op
- no longer provide ghc-*-doc
- no longer run ghc_reindex_haddock in ghc-*-devel scripts
* Thu Mar 10 2011 Jens Petersen <petersen@redhat.com> - 0.11.12-1
- add ghc_pkg_obsoletes to binlib base lib package too
@ -72,7 +79,7 @@ EOF
- use %%undefined macro
- disable debug_package in ghc_bin_build and ghc_lib_build
- set ghc_without_shared and ghc_without_dynamic on secondary
(ie non main intel archs)
(ie non main intel) archs
- disable debuginfo for self
* Fri Feb 11 2011 Jens Petersen <petersen@redhat.com> - 0.11.9-1

Loading…
Cancel
Save