Hello community,

here is the log from the commit of package ghc-rpm-macros for openSUSE:Factory 
checked in at 2015-08-28 08:27:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-rpm-macros (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-rpm-macros"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-rpm-macros/ghc-rpm-macros.changes    
2015-08-23 17:39:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new/ghc-rpm-macros.changes       
2015-08-28 08:27:55.000000000 +0200
@@ -1,0 +2,37 @@
+Thu Aug 27 08:45:19 UTC 2015 - mimi...@gmail.com
+
+- update to 1.4.93
+- refreshed:
+    add-group.patch
+    files-defattr.patch
+    fix-gen-filelists.patch
+    fix-library-dir.patch
+    suse-disable-debug-packages.patch
+    suse-docdir.patch
+- dropped:
+    version-docdirs.patch
+    fix-runpath.patch
+    ldflags.patch
+- added:
+    remove-flags.patch
+- fix ghc-pkg path in ghc-deps.sh for ghc-7.10
+- local pkgdir macro is redundant
+- use utf8 locale for cabal
+- add explicit --enable-shared again for arm64
+- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
+- allow overriding ghc- prefix with ghc_name (for ghc784 etc)
+- version ghc-pkg in ghc_pkg_recache
+- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil
+- add cabal_test macro
+- only run cabal haddock for real libraries with modules
+- make sure basepkg.files is also created for meta packages
+- fix the R*PATH regexp
+- version ghcpkgdocdir
+- add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir
+- correct cabal-tweak-flag error message for missing flag
+- 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
+
+-------------------------------------------------------------------

Old:
----
  fix-runpath.patch
  ghc-rpm-macros-1.4.8.tar.xz
  ldflags.patch
  version-docdirs.patch

New:
----
  fix-gen-filelists.patch
  ghc-rpm-macros-1.4.93.tar.xz
  remove-flags.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.w0gHID/_old  2015-08-28 08:27:56.000000000 +0200
+++ /var/tmp/diff_new_pack.w0gHID/_new  2015-08-28 08:27:56.000000000 +0200
@@ -21,7 +21,7 @@
 %global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        1.4.8
+Version:        1.4.93
 Release:        0
 BuildArch:      noarch
 Summary:        RPM Macros for building packages for GHC
@@ -30,6 +30,7 @@
 
 Url:            https://fedoraproject.org/wiki/Haskell_SIG
 
+# source prepared manually from github.com/fedora-haskell/ghc-rpm-macros
 Source0:        %{name}-%{version}.tar.xz
 # PATCH-FIX-OPENSUSE suse-disable-debug-packages.patch 
peter.tromm...@ohm-hochschule.de -- openSUSE way to disable debug packages
 Patch1:         suse-disable-debug-packages.patch
@@ -39,17 +40,15 @@
 Patch3:         files-defattr.patch
 # PATCH-FIX-OPENSUSE suse-docdir.patch peter.tromm...@ohm-hochschule.de -- fix 
location of docdir
 Patch4:         suse-docdir.patch
-# PATCH-FIX-UPSTREAM fix-runpath.patch peter.tromm...@ohm-hochschule.de -- In 
openSUSE we patch binutils to default to the "new" RUNPATH dynamic tag and not 
the obsolete RPATH. This patch adds support for the former and still works for 
the latter.
-Patch7:         fix-runpath.patch  
-# PATCH-FIX-OPENSUSE ldflags.patch peter.tromm...@ohm-hochschule.de -- Remove 
LDFLAGS. TODO: Find the right openSUSE way to do this.
-Patch8:         ldflags.patch
+# PATCH-FIX_UPSTREAM fix-gen-filelists.patch
+Patch5:         fix-gen-filelists.patch
+# PATCH-FIX-OPENSUSE remove-flags.patch peter.tromm...@ohm-hochschule.de -- Do 
not pass CFLAGS and LDFLAGS to ghc. openSUSE is missing a RPM macro 
%%__global_ldflags.
+Patch8:         remove-flags.patch
 # PATCH-FIX-UPSTREAM fix-library-dir.patch peter.tromm...@ohm-hochschule.de -- 
Fix ghc-rpm-macros and ghc build system installing into different library 
directories (package version vs package key).
 Patch9:         fix-library-dir.patch 
-# PATCH-FIX-UPSTREAM version-docdir.patch peter.tromm...@ohm-hochschule.de -- 
Include version number in package documentation dir.
-Patch10:        version-docdirs.patch
 
-Requires:       rpm
 BuildRequires:  xz
+Requires:       rpm
 %if %{undefined without_hscolour}
 Requires:       hscolour
 %endif
@@ -70,7 +69,6 @@
 Extra macros used for subpackaging of Haskell libraries,
 for example in ghc and haskell-platform.
 
-
 %package -n ghc-srpm-macros
 Summary:        RPM macros for building Haskell source packages
 Group:          Development/Libraries/Other
@@ -82,15 +80,14 @@
 Macros used when generating source Haskell rpm packages.
 
 %prep
-%setup -q
+%setup -q -n %{name}-%{version}
 %patch1 -p1 -b .debug
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch7 -p1
+%patch5 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
 
 %build
 echo no build stage needed
@@ -111,8 +108,8 @@
 %dir %{_prefix}/lib/rpm
 %dir %{_prefix}/lib/rpm/fileattrs
 %endif
-%{_prefix}/lib/rpm/fileattrs/ghc.attr
 %{_prefix}/lib/rpm/ghc-deps.sh
+%{_prefix}/lib/rpm/fileattrs/ghc.attr
 %{_bindir}/cabal-tweak-dep-ver
 %{_bindir}/cabal-tweak-flag
 

++++++ add-group.patch ++++++
--- /var/tmp/diff_new_pack.w0gHID/_old  2015-08-28 08:27:56.000000000 +0200
+++ /var/tmp/diff_new_pack.w0gHID/_new  2015-08-28 08:27:56.000000000 +0200
@@ -1,20 +1,20 @@
-Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
+Index: ghc-rpm-macros-1.4.93/macros.ghc-extra
 ===================================================================
---- 
ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra
-+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
-@@ -8,6 +8,7 @@
- %define basepkg ghc-%{pkgname}\
+--- ghc-rpm-macros-1.4.93.orig/macros.ghc-extra
++++ ghc-rpm-macros-1.4.93/macros.ghc-extra
+@@ -9,6 +9,7 @@
+ %define basepkg %{ghc_prefix}-%{pkgname}\
  %package -n %{basepkg}\
  Summary:        Haskell %{pkgname} library\
 +Group:          System/Libraries\
  %{?1:Version:        %{pkgver}}\
  %{-l:License:        %{-l*}}\
  Url:            http://hackage.haskell.org/package/%{pkgname}\
-@@ -18,6 +19,7 @@ This package provides the Haskell %{pkgn
+@@ -19,6 +20,7 @@ This package provides the Haskell %{pkgn
  \
  %package -n %{basepkg}-devel\
  Summary:        Haskell %{pkgname} library development files\
 +Group:          Development/Languages/Other\
  %{?1:Version:        %{pkgver}}\
  %{-l:License:        %{-l*}}\
- Requires(post): ghc-compiler = %{ghc_version}\
+ Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\

++++++ files-defattr.patch ++++++
--- /var/tmp/diff_new_pack.w0gHID/_old  2015-08-28 08:27:56.000000000 +0200
+++ /var/tmp/diff_new_pack.w0gHID/_new  2015-08-28 08:27:56.000000000 +0200
@@ -1,8 +1,8 @@
-Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
+Index: ghc-rpm-macros-1.4.93/macros.ghc-extra
 ===================================================================
---- 
ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra
-+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
-@@ -39,8 +39,10 @@ This package provides the Haskell %{pkgn
+--- ghc-rpm-macros-1.4.93.orig/macros.ghc-extra
++++ ghc-rpm-macros-1.4.93/macros.ghc-extra
+@@ -40,8 +40,10 @@ This package provides the Haskell %{pkgn
  %ghc_pkg_recache\
  \
  %files -n %{basepkg} -f %{basepkg}.files\

++++++ fix-gen-filelists.patch ++++++
Index: ghc-rpm-macros-1.4.93/macros.ghc
===================================================================
--- ghc-rpm-macros-1.4.93.orig/macros.ghc
+++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -77,7 +77,7 @@ fi\
 rm -f %{basepkg}.files %{basepkg}-devel.files\
 touch %{basepkg}.files %{basepkg}-devel.files\
 if [ -d "%{buildroot}${pkgdir}" ]; then\
-echo "%dir ${pkgdir}" >> %{basepkg}.files\
+echo "%%dir ${pkgdir}" >> %{basepkg}.files\
 %if %{undefined ghc_without_shared}\
 echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> 
%{basepkg}.files\
 %endif\
++++++ fix-library-dir.patch ++++++
--- /var/tmp/diff_new_pack.w0gHID/_old  2015-08-28 08:27:56.000000000 +0200
+++ /var/tmp/diff_new_pack.w0gHID/_new  2015-08-28 08:27:56.000000000 +0200
@@ -1,11 +1,11 @@
-Index: ghc-rpm-macros-1.3.91/macros.ghc
+Index: ghc-rpm-macros-1.4.93/macros.ghc
 ===================================================================
---- ghc-rpm-macros-1.3.91.orig/macros.ghc
-+++ ghc-rpm-macros-1.3.91/macros.ghc
-@@ -24,7 +24,7 @@ fi
- # configure
+--- ghc-rpm-macros-1.4.93.orig/macros.ghc
++++ ghc-rpm-macros-1.4.93/macros.ghc
+@@ -26,7 +26,7 @@ fi
  %cabal_configure\
  %ghc_check_bootstrap\
+ %global _hardened_ldflags %{nil}\
 -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} 
--libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc 
%{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} %{?cabal_configure_options} 
$cabal_configure_extra_options
 +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} 
--libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc 
%{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} %{?cabal_configure_options} 
$cabal_configure_extra_options
  

++++++ ghc-rpm-macros-1.4.8.tar.xz -> ghc-rpm-macros-1.4.93.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/.gitignore 
new/ghc-rpm-macros-1.4.93/.gitignore
--- old/ghc-rpm-macros-1.4.8/.gitignore 2015-01-16 10:21:27.000000000 +0100
+++ new/ghc-rpm-macros-1.4.93/.gitignore        1970-01-01 01:00:00.000000000 
+0100
@@ -1 +0,0 @@
-/ghc-rpm-macros-*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/Makefile 
new/ghc-rpm-macros-1.4.93/Makefile
--- old/ghc-rpm-macros-1.4.8/Makefile   2015-01-16 10:21:27.000000000 +0100
+++ new/ghc-rpm-macros-1.4.93/Makefile  2015-05-11 06:28:04.000000000 +0200
@@ -1,4 +1,5 @@
-COPR_REPO = ghc-7.10
+COPR_REPO = ghc-7.10.1
 
-include ../common/common.mk
+NO_TARBALL = yes
 
+include ../common/common.mk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/cabal-tweak-flag 
new/ghc-rpm-macros-1.4.93/cabal-tweak-flag
--- old/ghc-rpm-macros-1.4.8/cabal-tweak-flag   2015-01-16 10:21:27.000000000 
+0100
+++ new/ghc-rpm-macros-1.4.93/cabal-tweak-flag  2015-05-11 06:28:04.000000000 
+0200
@@ -29,7 +29,7 @@
 fi
 
 if ! grep -q -i "^flag *$FLAG" $CABALFILE; then
-   echo "$CABALFILE does have flag $FLAG"
+   echo "$CABALFILE does not have flag $FLAG"
    exit 1
 fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/ghc-deps.sh 
new/ghc-rpm-macros-1.4.93/ghc-deps.sh
--- old/ghc-rpm-macros-1.4.8/ghc-deps.sh        2015-01-16 10:21:27.000000000 
+0100
+++ new/ghc-rpm-macros-1.4.93/ghc-deps.sh       2015-05-11 06:28:04.000000000 
+0200
@@ -20,7 +20,7 @@
         7.6.*)
             GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR"
             ;;
-        # 7.8+
+        # 7.8 and 7.10
         *)
             GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR"
             ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/ghc-rpm-macros.spec 
new/ghc-rpm-macros-1.4.93/ghc-rpm-macros.spec
--- old/ghc-rpm-macros-1.4.8/ghc-rpm-macros.spec        2015-01-16 
10:21:27.000000000 +0100
+++ new/ghc-rpm-macros-1.4.93/ghc-rpm-macros.spec       2015-05-11 
06:28:04.000000000 +0200
@@ -6,8 +6,8 @@
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        1.3.91
-Release:        1%{?dist}
+Version:        1.4.93
+Release:        2%{?dist}
 Summary:        RPM macros for building packages for GHC
 
 License:        GPLv3+
@@ -25,9 +25,7 @@
 Source5:        cabal-tweak-flag
 Source6:        macros.ghc-extra
 Source7:        ghc.attr
-Requires:       ghc-srpm-macros
-# macros.ghc-srpm moved out from redhat-rpm-config-21
-Requires:       redhat-rpm-config > 20-1.fc21
+Requires:       redhat-rpm-config
 # for ghc_version
 Requires:       ghc-compiler
 %if %{undefined without_hscolour}
@@ -85,14 +83,45 @@
 
 
 %changelog
-* Fri Jan 16 2015 Jens Petersen <peter...@redhat.com> - 1.3.91-1
-- rebase to rawhide 1.3.10
+* Sat May  9 2015 Jens Petersen <peter...@fedoraproject.org> - 1.4.93-2
+- handle no ghc-srpm-macros for fedora < 21
+
+* Thu May  7 2015 Jens Petersen <peter...@fedoraproject.org> - 1.4.93-1
+- fix ghc-pkg path in ghc-deps.sh for ghc-7.10
+
+* Fri May  1 2015 Jens Petersen <peter...@redhat.com> - 1.4.92-1
+- local pkgdir macro is redundant
+
+* Fri May  1 2015 Jens Petersen <peter...@redhat.com> - 1.4.91-1
+- use utf8 locale for cabal
+- sync with 1.4.14:
+- add explicit --enable-shared again for arm64
+- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
+- allow overriding ghc- prefix with ghc_name (for ghc784 etc)
+- version ghc-pkg in ghc_pkg_recache
+- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil
+- add cabal_test macro
+- only run cabal haddock for real libraries with modules
+- make sure basepkg.files is also created for meta packages
+- fix the R*PATH regexp
+- version ghcpkgdocdir
+- add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir
+- correct cabal-tweak-flag error message for missing flag (#1184508)
+
+* Sat Jan 17 2015 Jens Petersen <peter...@redhat.com> - 1.4.90-1
 - changes needed for ghc-7.10:
 - 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
 
+* Sat Jan 17 2015 Jens Petersen <peter...@redhat.com> - 1.4.1-1
+- revert to versioned doc htmldirs
+
+* Sat Jan 17 2015 Jens Petersen <peter...@redhat.com> - 1.4.0-1
+- enable shared libraries and dynamic linking on all arch's
+  since ghc-7.8 now supports that
+
 * Fri Nov 14 2014 Jens Petersen <peter...@redhat.com> - 1.3.10-1
 - split ghc.attr into ghc_lib.attr and ghc_bin.attr for finer grained handling
 - require ghc-compiler for ghc_version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/macros.ghc 
new/ghc-rpm-macros-1.4.93/macros.ghc
--- old/ghc-rpm-macros-1.4.8/macros.ghc 2015-01-16 10:21:27.000000000 +0100
+++ new/ghc-rpm-macros-1.4.93/macros.ghc        2015-05-11 06:28:04.000000000 
+0200
@@ -3,6 +3,7 @@
 
 # "cabal"
 %cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} 
%{!?ghc_without_dynamic:-dynamic} Setup\
+LANG=en_US.utf8\
 ./Setup
 
 # check ghc version was rebuilt against self
@@ -21,19 +22,38 @@
 # configure
 %cabal_configure\
 %ghc_check_bootstrap\
+%global _hardened_ldflags %{nil}\
 CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
 LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} 
--libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc 
%{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / 
-optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" 
%{?cabal_configure_options} $cabal_configure_extra_options
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' 
--ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / 
-optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" 
%{?cabal_configure_options} $cabal_configure_extra_options
 
 # install
 %cabal_install %cabal copy --destdir=%{buildroot} -v
 
-# root dir for ghc docs
+tests
+%cabal_test\
+%if %{with tests}\
+%cabal test\
+%endif
+
+# no _pkgdocdir in EPEL <= 7
+%ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
+
+# root dir for ghc docs (used by ghc.spec)
+%ghc_html_dir %{_docdir}/ghc/html
+# deprecates
 %ghcdocbasedir %{_docdir}/ghc/html
-# libraries doc dir
+
+# libraries doc dir (internal)
+%ghc_html_libraries_dir %{ghc_html_dir}/libraries
+# deprecates
 %ghclibdocdir %{ghcdocbasedir}/libraries
+
 # pkg doc dir
-%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name}
+%ghc_html_pkg_dir %{ghc_html_libraries_dir}/%{pkg_name}-%{version}
+# deprecates
+%ghcpkgdocdir %{ghclibdocdir}/%{pkg_name}-%{version}
+
 # top library dir
 %ghclibdir %{_libdir}/ghc-%{ghc_version}
 
@@ -42,15 +62,17 @@
 %define pkgname %{?1}%{!?1:%{pkg_name}}\
 %define pkgver %{?2}%{!?2:%{version}}\
 %define pkgnamever %{pkgname}-%{pkgver}\
-%define basepkg ghc-%{pkgname}\
+%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
+#%%define pkgdir %{ghclibdir}/%{pkgnamever}\
+%define docdir %{ghclibdocdir}/%{pkgnamever}\
 if [ "%{pkgname}" = "rts" ]; then\
 pkgdir=%{ghclibdir}/rts\
 else\
 keyname=$(echo %{pkgname} | sed -e "s/-//g" | cut -c 1-5)\
 pkgdir=$(ls -d %{buildroot}%{ghclibdir}/${keyname}_* | sed -e 
"s@^%{buildroot}@@")\
 fi\
-%define docdir %{ghclibdocdir}/%{pkgname}\
 rm -f %{basepkg}.files %{basepkg}-devel.files\
+touch %{basepkg}.files %{basepkg}-devel.files\
 if [ -d "%{buildroot}${pkgdir}" ]; then\
 echo "%dir ${pkgdir}" >> %{basepkg}.files\
 %if %{undefined ghc_without_shared}\
@@ -92,7 +114,7 @@
 
 # ghc_lib_build_without_haddock [name] [version]
 %ghc_lib_build_without_haddock()\
-%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} 
%{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} 
%{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} 
%{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
+%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} 
%{?ghc_without_shared:--disable-shared} 
%{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} 
%{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} 
%{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
 %cabal build\
 %{nil}
 
@@ -100,7 +122,11 @@
 %ghc_lib_build()\
 %ghc_lib_build_without_haddock\
 %if %{undefined without_haddock}\
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
+%define pkgver %{?2}%{!?2:%{version}}\
+if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\
 %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; 
then echo --hyperlink-source; fi)} --hoogle\
+fi\
 %endif\
 %{nil}
 
@@ -130,9 +156,12 @@
 if ! type chrpath > /dev/null; then exit 1; fi\
 PDIR=$(pwd)\
 for i in %*; do\
-  PROG=%{buildroot}%{_bindir}/$i\
+  case $i in\
+    /*) PROG=%{buildroot}$i ;;\
+    *) PROG=%{buildroot}%{_bindir}/$i ;;\
+  esac\
   if [ -x "$PROG" ]; then\
-    RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\
+    RPATH=$(chrpath $PROG | sed -e "s@^$PROG: R.*PATH=@@")\
     case $RPATH in\
          *$PDIR*)\
          NEWRPATH=$(echo $RPATH | sed -e 
"s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\
@@ -147,7 +176,7 @@
 %endif\
 %{nil}
 
-%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || :
+%ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache 
--no-user-package-db || :
 
 # - without_hscolour, without_testsuite, and ghc_bootstrapping
 #   need to be set locally in the spec file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/macros.ghc-extra 
new/ghc-rpm-macros-1.4.93/macros.ghc-extra
--- old/ghc-rpm-macros-1.4.8/macros.ghc-extra   2015-01-16 10:21:27.000000000 
+0100
+++ new/ghc-rpm-macros-1.4.93/macros.ghc-extra  2015-05-11 06:28:04.000000000 
+0200
@@ -5,13 +5,14 @@
 %define pkgname %{?1}%{!?1:%{pkg_name}}\
 %define pkgver %{?2}%{!?2:%{version}}\
 %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} 
%{pkgname}-%{pkgver}}}\
-%define basepkg ghc-%{pkgname}\
+%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\
+%define basepkg %{ghc_prefix}-%{pkgname}\
 %package -n %{basepkg}\
 Summary:        Haskell %{pkgname} library\
 %{?1:Version:        %{pkgver}}\
 %{-l:License:        %{-l*}}\
 Url:            http://hackage.haskell.org/package/%{pkgname}\
-%{?ghc_pkg_obsoletes:Obsoletes:      %(echo "%{ghc_pkg_obsoletes}" | sed -e 
"s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\
+%{?ghc_pkg_obsoletes:Obsoletes:      %(echo "%{ghc_pkg_obsoletes}" | sed -e 
"s/\\(%{ghc_prefix}-[^, ]*\\)-devel/\\1/g")}\
 \
 %description -n %{basepkg}\
 This package provides the Haskell %{pkgname} library.\
@@ -20,9 +21,9 @@
 Summary:        Haskell %{pkgname} library development files\
 %{?1:Version:        %{pkgver}}\
 %{-l:License:        %{-l*}}\
-Requires(post): ghc-compiler = %{ghc_version}\
-Requires(postun): ghc-compiler = %{ghc_version}\
-Requires:       ghc-%{pkgname}%{?_isa} = %{pkgver}-%{release}\
+Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\
+Requires(postun): %{ghc_prefix}-compiler = %{ghc_version}\
+Requires:       %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\
 %{?ghc_pkg_c_deps:Requires:       %{ghc_pkg_c_deps}}\
 %{-c:Requires:       %{-c*}}\
 %{?ghc_pkg_obsoletes:Obsoletes:      %{ghc_pkg_obsoletes}}\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.4.8/tests/test-rebuild.sh 
new/ghc-rpm-macros-1.4.93/tests/test-rebuild.sh
--- old/ghc-rpm-macros-1.4.8/tests/test-rebuild.sh      2015-01-16 
10:21:27.000000000 +0100
+++ new/ghc-rpm-macros-1.4.93/tests/test-rebuild.sh     1970-01-01 
01:00:00.000000000 +0100
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-# for testing updates to ghc-rpm-macros etc
-# In a pkg dir run
-#   $ ./test-rebuild.sh
-# or clone a pkg branch:
-#   $ ./test-rebuild.sh [pkg]
-
-set -e
-
-PKG=${1:-$(fedpkg gimmespec | sed -e "s/.spec//")}
-
-[ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG
-
-[ -d "$PKG" ] && cd $PKG
-
-ARCH=$(arch)
-
-#if [ -d $ARCH ]; then
-#  echo Please move existing $ARCH/
-#  exit 1
-#fi
-
-if [ -f /etc/os-release ]; then
-    eval $(grep VERSION_ID /etc/os-release)
-    case $VERSION_ID in
-        21) BRANCH=master ;;
-        7.*) BRANCH=el7 ;;
-        *) BRANCH="f$VERSION_ID" ;;
-    esac
-else
-# assume RHEL6
-    BRANCH=el6
-fi
-
-fedpkg switch-branch $BRANCH
-
-if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then
-  echo "Git branch does not match Fedora installation!"
-  exit 1
-fi
-
-git pull
-
-sudo yum-builddep $PKG.spec
-
-fedpkg local
-
-VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//")
-
-TMP=test-tmp
-
-mkdir -p $TMP/
-
-PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm))
-
-for i in $PKGS; do
-  # FIXME: should check NVR is same before building
-  rpm -q --quiet $i || sudo yum install -q $i
-  for k in list requires provides scripts; do
-    rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || :
-    rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || :
-    diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || :
-  done
-done

++++++ remove-flags.patch ++++++
Index: ghc-rpm-macros-1.4.93/macros.ghc
===================================================================
--- ghc-rpm-macros-1.4.93.orig/macros.ghc
+++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -26,9 +26,7 @@ fi
 %cabal_configure\
 %ghc_check_bootstrap\
 %global _hardened_ldflags %{nil}\
-CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
-LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' 
--ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / 
-optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" 
%{?cabal_configure_options} $cabal_configure_extra_options
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} 
--libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc 
%{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} %{?cabal_configure_options} 
$cabal_configure_extra_options
 
 # install
 %cabal_install %cabal copy --destdir=%{buildroot} -v
++++++ suse-disable-debug-packages.patch ++++++
--- /var/tmp/diff_new_pack.w0gHID/_old  2015-08-28 08:27:56.000000000 +0200
+++ /var/tmp/diff_new_pack.w0gHID/_new  2015-08-28 08:27:56.000000000 +0200
@@ -1,7 +1,8 @@
-Index: ghc-rpm-macros-1.3.91/macros.ghc
---- ghc-rpm-macros-1.3.91.orig/macros.ghc
-+++ ghc-rpm-macros-1.3.91/macros.ghc
-@@ -157,3 +157,13 @@ done\
+Index: ghc-rpm-macros-1.4.93/macros.ghc
+===================================================================
+--- ghc-rpm-macros-1.4.93.orig/macros.ghc
++++ ghc-rpm-macros-1.4.93/macros.ghc
+@@ -186,3 +186,13 @@ done\
  %global without_prof 1\
  %global without_haddock 1\
  %global without_manual 1

++++++ suse-docdir.patch ++++++
--- /var/tmp/diff_new_pack.w0gHID/_old  2015-08-28 08:27:56.000000000 +0200
+++ /var/tmp/diff_new_pack.w0gHID/_new  2015-08-28 08:27:56.000000000 +0200
@@ -1,8 +1,8 @@
-Index: ghc-rpm-macros-1.3.91/macros.ghc
+Index: ghc-rpm-macros-1.4.93/macros.ghc
 ===================================================================
---- ghc-rpm-macros-1.3.91.orig/macros.ghc
-+++ ghc-rpm-macros-1.3.91/macros.ghc
-@@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea
+--- ghc-rpm-macros-1.4.93.orig/macros.ghc
++++ ghc-rpm-macros-1.4.93/macros.ghc
+@@ -19,6 +19,9 @@ proceeding, to avoid dependency ABI brea
  %endif\
  fi
  
@@ -12,12 +12,15 @@
  # configure
  %cabal_configure\
  %ghc_check_bootstrap\
-@@ -29,7 +32,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}";
- %cabal_install %cabal copy --destdir=%{buildroot} -v
+@@ -40,9 +43,9 @@ tests
+ %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
  
- # root dir for ghc docs
+ # root dir for ghc docs (used by ghc.spec)
+-%ghc_html_dir %{_docdir}/ghc/html
++%ghc_html_dir %{_datadir}/doc/ghc/html
+ # deprecates
 -%ghcdocbasedir %{_docdir}/ghc/html
 +%ghcdocbasedir %{_datadir}/doc/ghc/html
- # libraries doc dir
- %ghclibdocdir %{ghcdocbasedir}/libraries
- # pkg doc dir
+ 
+ # libraries doc dir (internal)
+ %ghc_html_libraries_dir %{ghc_html_dir}/libraries


Reply via email to