[ghc-rpm-macros/epel7] merge latest f20 changes

Jens Petersen petersen at fedoraproject.org
Sat May 17 08:17:44 UTC 2014


commit 16381a38a3e9398c4a0ac5388b4f74ecc3b0196a
Author: Jens Petersen <petersen at redhat.com>
Date:   Sat May 17 17:17:26 2014 +0900

    merge latest f20 changes
    
    - do bcond cabal configure --enable-tests also for Bin packages
    - enable configure bcond check for tests
    - use -O2 also for executable (Bin) packages and allow it to be overrided
    - set Url field when generating subpackages
    - update license tag to GPLv3+
    - handle no _pkgdocdir in RHEL7 and docdir path different to F20+
    - abort ghc_fix_dynamic_rpath if no chrpath
    - Install macros to %%{_rpmconfigdir}/macros.d.
    - set datasubdir in cabal_configure for ghc-7.8
    
    now identical to f20 1.0.7.4

 ghc-rpm-macros.ghc       |    8 +++++---
 ghc-rpm-macros.ghc-extra |    1 +
 ghc-rpm-macros.spec      |   24 +++++++++++++++++++-----
 3 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 5d41dc8..8c415ec 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -21,7 +21,7 @@ fi
 # configure
 %cabal_configure\
 %ghc_check_bootstrap\
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?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} --ghc-option=-O2 %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options
 
 # install
 %cabal_install %cabal copy --destdir=%{buildroot} -v
@@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.
 # ghc_lib_build_without_haddock [name] [version]
 %ghc_lib_build_without_haddock()\
 %global debug_package %{nil}\
-%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\
+%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-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}
 
@@ -133,13 +133,15 @@ fi
 %{nil}
 
 # ghc_fix_dynamic_rpath prog ...
+# (assumes cwd = pkg_name!)
 %ghc_fix_dynamic_rpath()\
 %if %{undefined ghc_without_dynamic}\
+if ! type chrpath > /dev/null; then exit 1; fi\
 PDIR=$(cd ..; pwd)\
 for i in %*; do\
   PROG=%{buildroot}%{_bindir}/$i\
   if [ -x "$PROG" ]; then\
-    RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
+    RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\
     case $RPATH in\
          *$PDIR*)\
          NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra
index 3cfc35a..554c57d 100644
--- a/ghc-rpm-macros.ghc-extra
+++ b/ghc-rpm-macros.ghc-extra
@@ -11,6 +11,7 @@
 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")}\
 \
 %description -n %{basepkg}\
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index ffecb8d..b9e647d 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -1,16 +1,16 @@
 %global debug_package %{nil}
 
-%global macros_dir %{_sysconfdir}/rpm
+%global macros_dir %{_rpmconfigdir}/macros.d
 
 # uncomment to bootstrap without hscolour
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        1.0.4.1
+Version:        1.0.4.2
 Release:        1%{?dist}
 Summary:        RPM macros for building packages for GHC
 
-License:        GPLv3
+License:        GPLv3+
 URL:            https://fedoraproject.org/wiki/Packaging:Haskell
 
 # This is a Fedora maintained package, originally made for
@@ -40,10 +40,12 @@ these macros.
 
 
 %package extra
-Summary:        Extra RPM macros for building Haskell packages with several libs
+Summary:        Extra RPM macros for building Haskell library subpackages
 Requires:       %{name} = %{version}-%{release}
 
 %description extra
+Extra macros used for subpackaging of Haskell libraries,
+for example in ghc and haskell-platform.
 
 
 %prep
@@ -89,9 +91,21 @@ EOF
 
 
 %changelog
+* Sat May 17 2014 Jens Petersen <petersen at redhat.com> - 1.0.4.2-1
+- do bcond cabal configure --enable-tests also for Bin packages
+- enable configure bcond check for tests
+- use -O2 also for executable (Bin) packages and allow it to be overrided
+- set Url field when generating subpackages
+- update license tag to GPLv3+
+- handle no _pkgdocdir in RHEL7 and docdir path different to F20+
+- abort ghc_fix_dynamic_rpath if no chrpath
+- Install macros to %%{_rpmconfigdir}/macros.d.
+- set datasubdir in cabal_configure for ghc-7.8
+
 * Fri Mar 28 2014 Jens Petersen <petersen at redhat.com> - 1.0.4.1-1
 - backport recent changes from F20:
-- ghc_fix_dynamic_rpath: abort for non-existent executable name with error msg
+- quote the ghc_fix_dynamic_rpath error message
+- ghc_fix_dynamic_rpath: abort for non-existent executable name
 - cabal-tweak-flag: add manual field to enforce flag changes
 - ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version
 - fix ghc-deps.sh when bootstrapping a new ghc version


More information about the scm-commits mailing list