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 +- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier + * Sat Mar 7 2015 Jens Petersen - 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