ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version
ghc-7.7 has bin subdir
This commit is contained in:
parent
0cd6abba00
commit
795c0c522b
@ -8,17 +8,20 @@
|
|||||||
|
|
||||||
[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1
|
[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1
|
||||||
|
|
||||||
#set -x
|
set +x
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
PKGBASEDIR=$2
|
PKGBASEDIR=$2
|
||||||
PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
||||||
GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
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"
|
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR"
|
||||||
else
|
else
|
||||||
GHC_PKG="/usr/bin/ghc-pkg"
|
GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $MODE in
|
case $MODE in
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.1.2
|
Version: 1.1.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building packages for GHC
|
Summary: RPM macros for building packages for GHC
|
||||||
|
|
||||||
@ -90,6 +90,9 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 10 2013 Jens Petersen <petersen@redhat.com> - 1.1.3-1
|
||||||
|
- ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version
|
||||||
|
|
||||||
* Mon Sep 9 2013 Jens Petersen <petersen@redhat.com> - 1.1.2-1
|
* Mon Sep 9 2013 Jens Petersen <petersen@redhat.com> - 1.1.2-1
|
||||||
- fix ghc-deps.sh when bootstrapping a new ghc version
|
- fix ghc-deps.sh when bootstrapping a new ghc version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user