From 5edaabc99824629560c247d5e075a96a30b18b81 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 Nov 2009 07:45:33 +0000 Subject: [PATCH] add %GHCRequires for automatically versioned library deps --- ghc-rpm-macros.ghc | 3 +++ ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 08a179e..c0c2511 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -36,3 +36,6 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : %ghc_version %(ghc --numeric-version) + +%GHCRequires() \ +Requires: ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/%1-//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 25191aa..98915d3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros -Version: 0.2.1 -Release: 2%{?dist} +Version: 0.2.2 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 16 2009 Jens Petersen - 0.2.2-1 +- add %%GHCRequires for automatically versioned library deps + * Tue Sep 22 2009 Jens Petersen - 0.2.1-2 - no, revert versioned ghcdocdir again!