fix %ghc_fix_rpath for ghc-7.10

epel9
Jens Petersen 8 years ago
parent 7855aaa8f1
commit 38f99a79b3

@ -36,6 +36,8 @@ Requires: ghc-compiler
Requires: hscolour
%endif
%endif
# this package could now be noarch again
#BuildArch: noarch
%description
A set of macros for building GHC packages following the Haskell Guidelines

@ -172,8 +172,14 @@ for lib in %*; do\
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
case $rpath in\
*$PWD/$lib/dist/build*)\
pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid)\
case %{ghc_version} in\
7.10.*)\
pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\
*)\
pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\
esac\
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\
chrpath -r $newrpath $i\
;;\

Loading…
Cancel
Save