ghc-deps.sh: look in buildroot package.conf.d for program deps

This commit is contained in:
Jens Petersen 2012-06-08 14:00:43 +09:00
parent c013051271
commit 1b8536abf1
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,7 @@ GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
else
GHC_PKG=/usr/bin/ghc-pkg
GHC_PKG="/usr/bin/ghc-pkg"
fi
case $MODE in
@ -70,7 +70,7 @@ for i in $files; do
if file $i | grep -q 'executable, .* dynamically linked'; then
BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
for p in ${BIN_DEPS}; do
HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//")
HASH=$(${GHC_PKG} --global --package-conf=$PKGCONFDIR field $p id | sed -e "s/^id: \+//")
echo "ghc($HASH)"
done
fi

View File

@ -3,7 +3,7 @@
%global macros_file %{_sysconfdir}/rpm/macros.ghc
Name: ghc-rpm-macros
Version: 0.95.1
Version: 0.95.2
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -60,6 +60,9 @@ EOF
%changelog
* Fri Jun 8 2012 Jens Petersen <petersen@redhat.com> - 0.95.2-1
- ghc-deps.sh: look in buildroot package.conf.d for program deps
* Fri Jun 8 2012 Jens Petersen <petersen@redhat.com> - 0.95.1-1
- add a meta-package option to ghc_devel_package and use in ghc_devel_requires