From dffc2c5084a4ec5de15d18d4821985333259bc6f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Dec 2009 14:42:16 +0000 Subject: [PATCH] - add cabal_configure_dynamic - add ghc_requires, ghc_doc_requires, ghc_prof_requires --- ghc-rpm-macros.ghc | 15 +++++++++++++++ ghc-rpm-macros.spec | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ff4e772..4ffc09e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -3,6 +3,8 @@ %cabal_configure \ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} +%cabal_configure_dynamic %cabal_configure --ghc-option=-dynamic + %cabal_makefile \ %cabal makefile -f cabal-rpm.mk \ make -f cabal-rpm.mk %{_smp_mflags} \ @@ -40,3 +42,16 @@ echo '%{ghcdocdir}' >> %1-doc.files \ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%(ghc --numeric-version)/package.conf.d \ install --mode=0644 %{?pkg_name}%{!?pkg_name:%name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d +%ghc_requires Requires: ghc = %{ghc_version}\ +Requires(post): ghc = %{ghc_version}\ +Requires(postun): ghc = %{ghc_version}\ +%if %{with shared}\ +Requires: ghc-%{?pkg_name}%{!?pkg_name:%name} = %{version}-%{release}\ +%endif + +%ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ +Requires(post): ghc-doc = %{ghc_version}\ +Requires(postun): ghc-doc = %{ghc_version} + +%ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ +Requires: ghc-%{?pkg_name}%{!?pkg_name:%name}-devel = %{version}-%{release} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0c84f53..46c0f03 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.3.1 +Version: 0.4.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Dec 24 2009 Jens Petersen - 0.4.0-1 +- add cabal_configure_dynamic +- add ghc_requires, ghc_doc_requires, ghc_prof_requires + * Tue Dec 15 2009 Jens Petersen - 0.3.1-1 - use ghc_version_override to override ghc_version - fix pkg .conf filelist match