diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 13879bf..ff555d9 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -18,6 +18,14 @@ proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ %endif\ fi +# tweak depends versions +# cabal_tweak_dep_ver dep old new [backup] +%cabal_tweak_dep_ver()\ +if ! grep -q "%1[ >=].*%2"; then\ + exit 1\ +fi\ +sed -i.%{?3}%{!?3:%1} -e "s/\(%1[ >=].*\)%2/\1%3/g" %{pkg_name}-%{version}/%{pkg_name}.cabal + # configure %cabal_configure\ %ghc_check_bootstrap\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 862b6d5..82a7a62 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.3 +Version: 0.95.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Fri Jun 22 2012 Jens Petersen - 0.95.4-1 +- add cabal_tweak_dep_ver macro to tweak a depend's version bound in .cabal + * Sat Jun 9 2012 Jens Petersen - 0.95.3-1 - ghc-dep.sh: only use buildroot package.conf.d if it exists