diff --git a/ghc-deps.sh b/ghc-deps.sh index 67f90d4..23d009f 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -8,6 +8,8 @@ [ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 +#set -x + MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d @@ -29,12 +31,8 @@ if [ -d "$PKGBASEDIR" ]; then SHARED=$(find $PKGBASEDIR -type f -name '*.so') fi -GHCVERSION=$(ghc --numeric-version) - files=$(cat) -#set -x - for i in $files; do LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts") if [ "$LIB_FILE" ]; then @@ -68,7 +66,7 @@ for i in $files; do fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ NEEDED *libHS\(.*\)-ghc${GHCVERSION}.so%\1%") + BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%") if [ -d "$PKGCONFDIR" ]; then PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c9f989e..b33d648 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.1.1 +Version: 1.1.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Mon Sep 9 2013 Jens Petersen - 1.1.2-1 +- fix ghc-deps.sh when bootstrapping a new ghc version + * Mon Sep 9 2013 Jens Petersen - 1.1.1-1 - use objdump -p instead of ldd to read executable dependencies