From 4887078b3406da2a9ba7aab56dc20a2ca7daf03f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 5 Apr 2018 18:33:56 +0900 Subject: [PATCH] use pkgid for libexecsubdir and libsubdir (#1563863) libexecsubdir is only available in Cabal 2 --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2bc5656..fbffa6f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.8.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -165,6 +165,10 @@ EOF %changelog +* Thu Apr 5 2018 Jens Petersen - 1.8.7-4 +- configure libexecsubdir (Cabal-2 only) (#1563863) +- change drop hash from libsubdir + * Tue Mar 6 2018 Jens Petersen - 1.8.7-3 - obsolete ghc-ltk diff --git a/macros.ghc b/macros.ghc index d9f3015..13ff6ff 100644 --- a/macros.ghc +++ b/macros.ghc @@ -39,7 +39,7 @@ export CFLAGS\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options}