improve %ghc_fix_dynamic_rpath not to assume cwd = pkg_name
This commit is contained in:
parent
3efe41dd0c
commit
2da26f9db5
@ -6,7 +6,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.3.5
|
Version: 1.3.6
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building packages for GHC
|
Summary: RPM macros for building packages for GHC
|
||||||
|
|
||||||
@ -93,6 +93,9 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Aug 29 2014 Jens Petersen <petersen@redhat.com> - 1.3.5-1
|
||||||
- no longer disable debuginfo by default:
|
- no longer disable debuginfo by default:
|
||||||
packages now need to explicitly opt out of debuginfo if appropriate
|
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}
|
%{nil}
|
||||||
|
|
||||||
# ghc_fix_dynamic_rpath prog ...
|
# ghc_fix_dynamic_rpath prog ...
|
||||||
# (assumes cwd = pkg_name !)
|
|
||||||
%ghc_fix_dynamic_rpath()\
|
%ghc_fix_dynamic_rpath()\
|
||||||
%if %{undefined ghc_without_dynamic}\
|
%if %{undefined ghc_without_dynamic}\
|
||||||
if ! type chrpath > /dev/null; then exit 1; fi\
|
if ! type chrpath > /dev/null; then exit 1; fi\
|
||||||
PDIR=$(cd ..; pwd)\
|
PDIR=$(pwd)\
|
||||||
for i in %*; do\
|
for i in %*; do\
|
||||||
PROG=%{buildroot}%{_bindir}/$i\
|
PROG=%{buildroot}%{_bindir}/$i\
|
||||||
if [ -x "$PROG" ]; then\
|
if [ -x "$PROG" ]; then\
|
||||||
RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\
|
RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\
|
||||||
case $RPATH in\
|
case $RPATH in\
|
||||||
*$PDIR*)\
|
*$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\
|
chrpath -r $NEWRPATH $PROG\
|
||||||
;;\
|
;;\
|
||||||
esac\
|
esac\
|
||||||
|
Loading…
Reference in New Issue
Block a user