petersen pushed to ghc-rpm-macros (f22). "add ghc_pkgdocdir for RHEL compatibility (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Mar 30 03:43:37 UTC 2015
>From cfbdfc60ac5fb1e09db2c973455100efd67b8f8a Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen at redhat.com>
Date: Fri, 20 Mar 2015 17:39:03 +0900
Subject: add ghc_pkgdocdir for RHEL compatibility
no _pkgdocdir in current RHEL
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 61560a5..e923541 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -112,6 +112,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
%changelog
+* Fri Mar 20 2015 Jens Petersen <petersen at redhat.com>
+- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
+
* Sat Mar 7 2015 Jens Petersen <petersen at fedoraproject.org> - 1.4.12-1
- allow overriding ghc- prefix with ghc_name (for ghc784 etc)
diff --git a/macros.ghc b/macros.ghc
index 01eb1f3..574af6f 100644
--- a/macros.ghc
+++ b/macros.ghc
@@ -24,7 +24,7 @@ fi
%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
@@ -35,6 +35,9 @@ 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
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/ghc-rpm-macros.git/commit/?h=f22&id=cfbdfc60ac5fb1e09db2c973455100efd67b8f8a
More information about the scm-commits
mailing list