diff --git a/ghc-deps.sh b/ghc-deps.sh index 23d009f..28e39a1 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -8,17 +8,20 @@ [ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 -#set -x +set +x MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) -if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then +if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then + # ghc-7.7 + GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" +elif [ -x "$PKGBASEDIR/ghc-pkg" ]; then GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" else - GHC_PKG="/usr/bin/ghc-pkg" + GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}" fi case $MODE in diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b33d648..86ebcb1 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.2 +Version: 1.1.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Tue Sep 10 2013 Jens Petersen - 1.1.3-1 +- ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version + * Mon Sep 9 2013 Jens Petersen - 1.1.2-1 - fix ghc-deps.sh when bootstrapping a new ghc version