add ghc_bootstrapping to ghc_bootstrap; fix ghc-deps.sh when bootstrapping
This commit is contained in:
parent
bd7f38e058
commit
0b163b3d06
13
ghc-deps.sh
13
ghc-deps.sh
@ -11,6 +11,13 @@
|
|||||||
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-//)
|
||||||
|
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
case $MODE in
|
case $MODE in
|
||||||
--provides) FIELD=id ;;
|
--provides) FIELD=id ;;
|
||||||
@ -45,7 +52,7 @@ for i in $files; do
|
|||||||
esac
|
esac
|
||||||
if [ "$META" ]; then
|
if [ "$META" ]; then
|
||||||
PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
|
PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
|
||||||
HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
||||||
for i in $HASHS; do
|
for i in $HASHS; do
|
||||||
case $i in
|
case $i in
|
||||||
*-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;;
|
*-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;;
|
||||||
@ -53,7 +60,7 @@ for i in $files; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if [ "$MODE" = "--requires" -a "$SELF" ]; then
|
if [ "$MODE" = "--requires" -a "$SELF" ]; then
|
||||||
HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//")
|
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//")
|
||||||
for i in $HASHS; do
|
for i in $HASHS; do
|
||||||
echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/"
|
echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/"
|
||||||
done
|
done
|
||||||
@ -64,7 +71,7 @@ for i in $files; do
|
|||||||
if file $i | grep -q 'executable, .* dynamically linked'; then
|
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%")
|
BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
|
||||||
for p in ${BIN_DEPS}; do
|
for p in ${BIN_DEPS}; do
|
||||||
HASH=$(ghc-pkg --global field $p id | sed -e "s/^id: \+//")
|
HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//")
|
||||||
echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/"
|
echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -221,7 +221,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
|
|||||||
%global ghc_without_dynamic 1\
|
%global ghc_without_dynamic 1\
|
||||||
%global without_prof 1\
|
%global without_prof 1\
|
||||||
%global without_haddock 1\
|
%global without_haddock 1\
|
||||||
%global without_manual 1
|
%global without_manual 1\
|
||||||
|
# needs to be set also in ghc.spec\
|
||||||
|
%global ghc_bootstrapping 1
|
||||||
|
|
||||||
# skip prof libs, and documentation
|
# skip prof libs, and documentation
|
||||||
# - without_hscolour needs to be set locally in the spec file
|
# - without_hscolour needs to be set locally in the spec file
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%global macros_file %{_sysconfdir}/rpm/macros.ghc
|
%global macros_file %{_sysconfdir}/rpm/macros.ghc
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 0.13.12
|
Version: 0.13.13
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Macros for building packages for GHC
|
Summary: Macros for building packages for GHC
|
||||||
|
|
||||||
@ -60,6 +60,10 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 17 2011 Jens Petersen <petersen@redhat.com> - 0.13.13-1
|
||||||
|
- add ghc_bootstrapping to ghc_bootstrap for packages other than ghc
|
||||||
|
- make ghc-deps.sh also work when bootstrapping a new ghc version
|
||||||
|
|
||||||
* Sat Oct 15 2011 Jens Petersen <petersen@redhat.com> - 0.13.12-1
|
* Sat Oct 15 2011 Jens Petersen <petersen@redhat.com> - 0.13.12-1
|
||||||
- add ghc_exclude_docdir to exclude docdir from filelists
|
- add ghc_exclude_docdir to exclude docdir from filelists
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user