[ghc-rpm-macros] no _pkgdocdir in RHEL7 and docdir path different to F20+

Jens Petersen petersen at fedoraproject.org
Fri Mar 28 08:40:33 UTC 2014


commit 8f2ef1279a0e758d68659792d5fb685116a47762
Author: Jens Petersen <petersen at redhat.com>
Date:   Fri Mar 28 17:40:33 2014 +0900

    no _pkgdocdir in RHEL7 and docdir path different to F20+

 ghc-rpm-macros.ghc  |    7 ++++---
 ghc-rpm-macros.spec |    5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 0cf0f8b..7008bfa 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=%{_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$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} %{?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}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1} %{!?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}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\
 %cabal build\
 %{nil}
 
@@ -133,6 +133,7 @@ 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\
@@ -140,7 +141,7 @@ 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.spec b/ghc-rpm-macros.spec
index f39fca6..53b2a70 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -6,7 +6,7 @@
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        1.2.4
+Version:        1.2.5
 Release:        1%{?dist}
 Summary:        RPM macros for building packages for GHC
 
@@ -90,6 +90,9 @@ EOF
 
 
 %changelog
+* Fri Mar 28 2014 Jens Petersen <petersen at redhat.com> - 1.2.5-1
+- handle no _pkgdocdir in RHEL7 and docdir path different to F20+
+
 * Mon Mar 17 2014 Jens Petersen <petersen at redhat.com> - 1.2.4-1
 - abort ghc_fix_dynamic_rpath if no chrpath
 


More information about the scm-commits mailing list