new cabal_tweak_dep_ver macro for tweaking versions of depends

%cabal_tweak_dep_ver dep old new [backup]
changes old version bound to new for dep with optional backup suffix

eg %cabal_tweak_dep_ver haskell-src-exts 1.12 1.14 2
epel9
Jens Petersen 13 years ago
parent 8e22621418
commit 8a8de3a39a

@ -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\

@ -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 <petersen@redhat.com> - 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 <petersen@redhat.com> - 0.95.3-1
- ghc-dep.sh: only use buildroot package.conf.d if it exists

Loading…
Cancel
Save