new ghc_fix_rpath macro deprecates ghc_fix_dynamic_rpath
- ghc-pkg-wrapper: quieter and simple output - ghc_libs_install now runs ghc_fix_rpath to fix subpackage rpaths
This commit is contained in:
parent
83eef9382a
commit
411d61ddf0
@ -22,7 +22,7 @@ for i in $files; do
|
|||||||
# exclude builtin_rts.conf
|
# exclude builtin_rts.conf
|
||||||
$PKGCONFDIR/*-*.conf)
|
$PKGCONFDIR/*-*.conf)
|
||||||
PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%")
|
PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%")
|
||||||
OUT=$(/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR field $PKGVER $FIELD | sed -e "s/^depends: \+//" -e "s/rts//" -e "s/bin-package-db-[^ ]\+//")
|
OUT=$(/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR field $PKGVER $FIELD | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//")
|
||||||
for d in $OUT; do
|
for d in $OUT; do
|
||||||
case $d in
|
case $d in
|
||||||
*-*) echo "ghc-devel($d)" ;;
|
*-*) echo "ghc-devel($d)" ;;
|
||||||
|
@ -29,4 +29,4 @@ else
|
|||||||
GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR"
|
GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$GHC_PKG --global $*
|
$GHC_PKG -v0 --simple-output --global $*
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.6.8
|
Version: 1.6.9
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building packages for GHC
|
Summary: RPM macros for building packages for GHC
|
||||||
|
|
||||||
@ -135,6 +135,11 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 27 2016 Jens Petersen <petersen@redhat.com> - 1.6.9-1
|
||||||
|
- new ghc_fix_rpath macro deprecates ghc_fix_dynamic_rpath
|
||||||
|
- ghc-pkg-wrapper: quieter and simple output
|
||||||
|
- ghc_libs_install now runs ghc_fix_rpath to fix subpackage rpaths
|
||||||
|
|
||||||
* Tue Sep 6 2016 Jens Petersen <petersen@redhat.com> - 1.6.8-1
|
* Tue Sep 6 2016 Jens Petersen <petersen@redhat.com> - 1.6.8-1
|
||||||
- set Cabal docdir to licensedir so licenses end up in right place
|
- set Cabal docdir to licensedir so licenses end up in right place
|
||||||
|
|
||||||
|
26
macros.ghc
26
macros.ghc
@ -153,6 +153,32 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
|
|||||||
%{!?1:%ghc_strip_dynlinked}\
|
%{!?1:%ghc_strip_dynlinked}\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
# ghc_fix_rpath lib-ver ...
|
||||||
|
%ghc_fix_rpath()\
|
||||||
|
%if %{undefined ghc_without_dynamic}\
|
||||||
|
if ! type chrpath > /dev/null; then exit 1; fi\
|
||||||
|
PDIR=$(pwd)\
|
||||||
|
for lib in %*; do\
|
||||||
|
for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
|
||||||
|
if [ -x "$i" ]; then\
|
||||||
|
RPATH=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
|
||||||
|
case $RPATH in\
|
||||||
|
*$PDIR/$lib/*)\
|
||||||
|
SYSPATH=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | uniq)\
|
||||||
|
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/$lib/dist/build@${SYSPATH}@g")\
|
||||||
|
chrpath -r $NEWRPATH $i\
|
||||||
|
;;\
|
||||||
|
esac\
|
||||||
|
else\
|
||||||
|
echo "%%ghc_fix_rpath: no $i executable"\
|
||||||
|
exit 1\
|
||||||
|
fi\
|
||||||
|
done\
|
||||||
|
done\
|
||||||
|
%endif\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
# Deprecated by ghc_fix_rpath:
|
||||||
# ghc_fix_dynamic_rpath prog ...
|
# ghc_fix_dynamic_rpath prog ...
|
||||||
%ghc_fix_dynamic_rpath()\
|
%ghc_fix_dynamic_rpath()\
|
||||||
%if %{undefined ghc_without_dynamic}\
|
%if %{undefined ghc_without_dynamic}\
|
||||||
|
@ -87,12 +87,14 @@ done\
|
|||||||
# ghc_sublib_install [name-version] ...
|
# ghc_sublib_install [name-version] ...
|
||||||
%ghc_libs_install()\
|
%ghc_libs_install()\
|
||||||
HOME=$PWD\
|
HOME=$PWD\
|
||||||
for i in %*; do\
|
args="%*"\
|
||||||
|
for i in $args; do\
|
||||||
|
cd $i\
|
||||||
name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\
|
name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\
|
||||||
ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\
|
ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\
|
||||||
cd $name-$ver\
|
|
||||||
%ghc_lib_install $name $ver\
|
%ghc_lib_install $name $ver\
|
||||||
mv *.files ..\
|
mv *.files ..\
|
||||||
cd ..\
|
cd ..\
|
||||||
done\
|
done\
|
||||||
|
%ghc_fix_rpath $args\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
Loading…
Reference in New Issue
Block a user