%ghc_fix_dynamic_rpath for cleaning up executables linked against own libs

epel9
Jens Petersen 12 years ago
parent 59daf96cb2
commit 436bfaf65d

@ -281,6 +281,23 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
%{!?1:%ghc_strip_dynlinked}\
%{nil}
# ghc_fix_dynamic_rpath prog ...
%ghc_fix_dynamic_rpath()\
%if %{undefined ghc_without_dynamic}\
PDIR=$(cd ..; pwd)\
for i in %*; do\
PROG=%{buildroot}%{_bindir}/$i\
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
case $RPATH in\
$PDIR*)\
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
chrpath -r $NEWRPATH $PROG\
;;\
esac\
done\
%endif\
%{nil}
# - without_hscolour, without_testsuite, and ghc_bootstrapping
# need to be set locally in the spec file

@ -6,7 +6,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 0.97.6
Version: 0.98
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -75,6 +75,10 @@ EOF
%changelog
* Mon Jan 21 2013 Jens Petersen <petersen@redhat.com> - 0.98-1
- new ghc_fix_dynamic_rpath macro for cleaning up package executables
linked against their own libraries
* Fri Jan 18 2013 Jens Petersen <petersen@redhat.com> - 0.97.6-1
- be more careful about library pkgdir ownership (#893777)

Loading…
Cancel
Save