improve %ghc_fix_dynamic_rpath not to assume cwd = pkg_name

epel9
Jens Petersen 10 years ago
parent 3efe41dd0c
commit 2da26f9db5

@ -6,7 +6,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.3.5
Version: 1.3.6
Release: 1%{?dist}
Summary: RPM macros for building packages for GHC
@ -93,6 +93,9 @@ EOF
%changelog
* Wed Sep 10 2014 Jens Petersen <petersen@redhat.com> - 1.3.6-1
- improve ghc_fix_dynamic_rpath not to assume cwd = pkg_name
* Fri Aug 29 2014 Jens Petersen <petersen@redhat.com> - 1.3.5-1
- no longer disable debuginfo by default:
packages now need to explicitly opt out of debuginfo if appropriate

@ -118,18 +118,17 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
%{nil}
# ghc_fix_dynamic_rpath prog ...
# (assumes cwd = pkg_name !)
%ghc_fix_dynamic_rpath()\
%if %{undefined ghc_without_dynamic}\
if ! type chrpath > /dev/null; then exit 1; fi\
PDIR=$(cd ..; pwd)\
PDIR=$(pwd)\
for i in %*; do\
PROG=%{buildroot}%{_bindir}/$i\
if [ -x "$PROG" ]; then\
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")\
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\
chrpath -r $NEWRPATH $PROG\
;;\
esac\

Loading…
Cancel
Save