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
37 lines
862 B
Bash
Executable File
37 lines
862 B
Bash
Executable File
#!/bin/sh
|
|
# find rpm provides and requires for Haskell GHC libraries
|
|
|
|
[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1
|
|
|
|
set +x
|
|
|
|
MODE=$1
|
|
PKGBASEDIR=$2
|
|
PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
|
|
|
case $MODE in
|
|
--provides) FIELD=id ;;
|
|
--requires) FIELD=depends ;;
|
|
*) echo "`basename $0`: Need --provides or --requires" ; exit 1
|
|
esac
|
|
|
|
files=$(cat)
|
|
|
|
for i in $files; do
|
|
case $i in
|
|
# exclude builtin_rts.conf
|
|
$PKGCONFDIR/*-*.conf)
|
|
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-[^ ]\+//")
|
|
for d in $OUT; do
|
|
case $d in
|
|
*-*) echo "ghc-devel($d)" ;;
|
|
*) ;;
|
|
esac
|
|
done
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
done
|