add ghc_pkgdocdir for RHEL compatibility
no _pkgdocdir in current RHEL
This commit is contained in:
parent
d1251119aa
commit
cfbdfc60ac
@ -112,6 +112,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Mar 20 2015 Jens Petersen <petersen@redhat.com>
|
||||
- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
|
||||
|
||||
* Sat Mar 7 2015 Jens Petersen <petersen@fedoraproject.org> - 1.4.12-1
|
||||
- allow overriding ghc- prefix with ghc_name (for ghc784 etc)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user