From 7ffdbdc6d5f18256c446bfcd35dddc511ae04a1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 21 Mar 2012 17:41:59 +0900 Subject: [PATCH] change of rpm metadata hash format for new ghc-7.4 - drop prof meta hash data - no longer include doc files automatically by default - no longer provide doc subpackage - do not provide prof when without_prof set --- ghc-deps.sh | 7 +++---- ghc-rpm-macros.ghc | 5 ++++- ghc-rpm-macros.spec | 12 ++++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index add9b9f..8685929 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -43,7 +43,6 @@ for i in $files; do SELF="" case $LIB_FILE in *.so) META=ghc ;; - *_p.a) META=ghc-prof SELF=ghc-devel ;; *.a) META=ghc-devel if [ "$SHARED" ]; then SELF=ghc @@ -55,14 +54,14 @@ for i in $files; do HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") for i in $HASHS; do case $i in - *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;; + *-*) echo "$META($i)" ;; *) ;; esac done if [ "$MODE" = "--requires" -a "$SELF" ]; then HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") for i in $HASHS; do - echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" + echo "$SELF($i)" done fi fi @@ -72,7 +71,7 @@ for i in $files; do 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: \+//") - echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/" + echo "ghc($HASH)" done fi fi diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 85f3afc..4b94a4e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -192,9 +192,10 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ -Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ +%if %{undefined without_prof}\ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ +%endif # ghc_devel_description %ghc_devel_description\ @@ -290,3 +291,5 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global ghc_without_shared 1\ %global ghc_without_dynamic 1\ %ghc_test + +%ghc_exclude_docdir 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index bccb4c6..b569e03 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.5 +Version: 0.90 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -13,7 +13,8 @@ URL: https://fedoraproject.org/wiki/Haskell_SIG # This is a Fedora maintained package which is specific to # our distribution. Thus the source is only available from -# within this srpm. +# within this srpm. But it could be moved to fedorahosted.org +# if other rpm distros want to use it. Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS @@ -59,6 +60,13 @@ EOF %changelog +* Mon Mar 19 2012 Jens Petersen - 0.90-1 +- use new rpm metadata hash format for ghc-7.4 +- drop prof meta hash data +- no longer include doc files automatically by default +- no longer provide doc subpackage +- do not provide prof when without_prof set + * Thu Feb 23 2012 Jens Petersen - 0.15.5-1 - fix handling of devel docdir for non-shared builds - simplify ghc_bootstrap