From ec03c230db873ffa9bd0ec17f98682111565bf0246bf5efb6915e6be66766ebf Mon Sep 17 00:00:00 2001 From: Peter Trommler Date: Wed, 6 Jun 2012 09:18:01 +0000 Subject: [PATCH] Accepting request 123719 from home:ptrommler:haskell-platform Haskell Platform update OBS-URL: https://build.opensuse.org/request/show/123719 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=6 --- buildService.patch | 28 +++++++++------------------- ghc-deps.sh | 7 +++---- ghc-rpm-macros.changes | 19 +++++++++++++++++++ ghc-rpm-macros.ghc | 5 ++++- ghc-rpm-macros.spec | 11 +++++++---- sle-sp1-rpmdeps.patch | 16 ++++++++-------- 6 files changed, 50 insertions(+), 36 deletions(-) diff --git a/buildService.patch b/buildService.patch index e09df17..e8e1cb6 100644 --- a/buildService.patch +++ b/buildService.patch @@ -1,7 +1,7 @@ -diff -Nur 0.15.5/ghc-deps.sh 0.15.5-obs/ghc-deps.sh ---- 0.15.5/ghc-deps.sh 2012-02-23 10:10:50.000000000 +0100 -+++ 0.15.5-obs/ghc-deps.sh 2012-03-19 19:56:38.000000000 +0100 -@@ -69,7 +69,7 @@ +diff -Nur 0.90/ghc-deps.sh 0.90-suse-packaging/ghc-deps.sh +--- 0.90/ghc-deps.sh 2012-04-23 17:36:55.000000000 +0200 ++++ 0.90-suse-packaging/ghc-deps.sh 2012-04-26 16:08:59.000000000 +0200 +@@ -68,7 +68,7 @@ fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then @@ -9,10 +9,10 @@ diff -Nur 0.15.5/ghc-deps.sh 0.15.5-obs/ghc-deps.sh + BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | grep -v libHSffi | 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/" -diff -Nur 0.15.5/ghc-rpm-macros.ghc 0.15.5-obs/ghc-rpm-macros.ghc ---- 0.15.5/ghc-rpm-macros.ghc 2012-02-23 10:10:50.000000000 +0100 -+++ 0.15.5-obs/ghc-rpm-macros.ghc 2012-03-19 16:58:43.000000000 +0100 + echo "ghc($HASH)" +diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc +--- 0.90/ghc-rpm-macros.ghc 2012-04-23 17:36:47.000000000 +0200 ++++ 0.90-suse-packaging/ghc-rpm-macros.ghc 2012-04-26 16:10:36.000000000 +0200 @@ -21,13 +21,14 @@ # configure %cabal_configure\ @@ -91,18 +91,8 @@ diff -Nur 0.15.5/ghc-rpm-macros.ghc 0.15.5-obs/ghc-rpm-macros.ghc %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_devel_requires}\ -@@ -236,15 +239,17 @@ - - # ghc_bin_build - %ghc_bin_build\ -+export SUSE_ASNEEDED=0\ - %global debug_package %{nil}\ - %cabal_configure\ - %cabal build - - # ghc_lib_build [name] [version] +@@ -245,7 +248,7 @@ %ghc_lib_build()\ -+export SUSE_ASNEEDED=0\ %global debug_package %{nil}\ %{?1:cd %1-%2}\ -%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ diff --git a/ghc-deps.sh b/ghc-deps.sh index 8ead847..6171ca6 100644 --- 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.changes b/ghc-rpm-macros.changes index 9e59fc4..5405d59 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Sat May 5 10:02:41 UTC 2012 - peter.trommler@ohm-hochschule.de + +- bumped version number to match upstream +- dropped fix for magic, not needed anymore +- added copyright notice + +------------------------------------------------------------------- +Thu Apr 26 15:36:41 UTC 2012 - peter.trommler@ohm-hochschule.de + +- upgrade to 0.90 from upstream +- 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 +- remove SUSE_ASNEEDED in buildService.patch +- rebase sle patch + ------------------------------------------------------------------- Mon Mar 19 18:58:47 UTC 2012 - peter.trommler@ohm-hochschule.de diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 7661c00..95045f2 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 5471424..f460f4c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,3 +1,7 @@ +# +# spec file for ghc-rpm-macros +# + # Copyright (c) 2012 Peter Trommler peter.trommler@ohm-hochschule.de # # All modifications and additions to the file contributed by third parties @@ -11,12 +15,13 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %global debug_package %{nil} %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.5 +Version: 0.90 Release: 1 Summary: Macros for building packages for GHC @@ -64,8 +69,6 @@ install -p -D -m 0644 ./ghc-rpm-macros.ghc ${RPM_BUILD_ROOT}/%{macros_file} install -p -D -m 0644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc-suse install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh -# fix magic issue on SLE-11-SP1 -ln -s /usr/share/misc/magic %{buildroot}/%{_prefix}/lib/rpm/magic # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs @@ -85,6 +88,6 @@ EOF %config(noreplace) %{macros_file} %config(noreplace) %{_sysconfdir}/rpm/macros.ghc-suse %{_prefix}/lib/rpm/ghc-deps.sh -%{_prefix}/lib/rpm/magic +#%{_prefix}/lib/rpm/magic %changelog diff --git a/sle-sp1-rpmdeps.patch b/sle-sp1-rpmdeps.patch index d59adfe..64667f3 100644 --- a/sle-sp1-rpmdeps.patch +++ b/sle-sp1-rpmdeps.patch @@ -1,6 +1,6 @@ -diff -Nur 0.15.5-obs/ghc-deps.sh 0.15.5-sle/ghc-deps.sh ---- 0.15.5-obs/ghc-deps.sh 2012-03-19 17:03:57.000000000 +0100 -+++ 0.15.5-sle/ghc-deps.sh 2012-03-19 17:05:16.000000000 +0100 +diff -Nur 0.90-suse-packaging/ghc-deps.sh 0.90-sle-rpmdeps/ghc-deps.sh +--- 0.90-suse-packaging/ghc-deps.sh 2012-04-26 16:08:59.000000000 +0200 ++++ 0.90-sle-rpmdeps/ghc-deps.sh 2012-04-26 16:16:10.000000000 +0200 @@ -20,8 +20,8 @@ fi @@ -12,16 +12,16 @@ diff -Nur 0.15.5-obs/ghc-deps.sh 0.15.5-sle/ghc-deps.sh *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac -@@ -78,4 +78,4 @@ +@@ -77,4 +77,4 @@ fi done -echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE +echo $files | tr [:blank:] '\n' | /usr/lib/rpm/find$FINDMODE -diff -Nur 0.15.5-obs/ghc-rpm-macros.ghc 0.15.5-sle/ghc-rpm-macros.ghc ---- 0.15.5-obs/ghc-rpm-macros.ghc 2012-03-19 16:58:43.000000000 +0100 -+++ 0.15.5-sle/ghc-rpm-macros.ghc 2012-03-19 17:05:16.000000000 +0100 -@@ -257,6 +257,9 @@ +diff -Nur 0.90-suse-packaging/ghc-rpm-macros.ghc 0.90-sle-rpmdeps/ghc-rpm-macros.ghc +--- 0.90-suse-packaging/ghc-rpm-macros.ghc 2012-04-26 16:10:36.000000000 +0200 ++++ 0.90-sle-rpmdeps/ghc-rpm-macros.ghc 2012-04-26 16:16:10.000000000 +0200 +@@ -256,6 +256,9 @@ %{?1:cd -}\ %{nil}