7e15be0963
- ghc_gen_filelists: determine keyname with pkgnamever not just pkgname (fixes building newer version of installed package) - use _rpmconfigdir macro - support el6 (no fileattrs or /usr/lib/rpm/macros.d) - change url to github - add and use ghc-pkg-wrapper script - use ghc-pkg key field (for ghc-7.10) - configure libsubdir using pkgkey like ghc-cabal - handle no ghc-srpm-macros for fedora < 21 - fix ghc-pkg path in ghc-deps.sh for ghc-7.10 - version ghc-pkg in ghc_pkg_recache - update ghc_gen_filelists to use new keyed library filepaths and specify libHS*.so more loosely - ghc-dep.sh now just makes versioned devel reqs - rename ghc_lib.attr to ghc.attr and drop ghc_bin.attr - enable debuginfo package
33 lines
785 B
Bash
Executable File
33 lines
785 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1
|
|
|
|
set +x
|
|
|
|
PKGBASEDIR=$1
|
|
shift
|
|
PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
|
GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
|
|
|
# for a ghc build use the new ghc-pkg
|
|
INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER
|
|
|
|
if [ -x "$INPLACE_GHCPKG" ]; then
|
|
case $GHC_VER in
|
|
7.4.*)
|
|
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
|
|
;;
|
|
7.6.*)
|
|
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR"
|
|
;;
|
|
# 7.8 and 7.10
|
|
*)
|
|
GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR"
|
|
;;
|
|
esac
|
|
else
|
|
GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR"
|
|
fi
|
|
|
|
$GHC_PKG --global $*
|