From 97922d41b74407f0f5efbfc711a0efdcff40c41e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 14 Nov 2017 19:22:31 +0900 Subject: [PATCH] for rhel > 7 noarch and no license dir version --- ghc-rpm-macros.spec | 8 ++++++-- macros.ghc | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 97dbb2d..674c5e4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 5%{?dist} +Release: 6%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -36,7 +36,7 @@ Requires: ghc-compiler Requires: hscolour %endif %endif -%if 0%{?fedora} >= 27 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildArch: noarch %endif @@ -161,6 +161,10 @@ EOF %changelog +* Tue Nov 14 2017 Jens Petersen - 1.6.50-6 +- make package noarch RHEL > 7 +- only version license dir for RHEL <= 7 + * Fri Nov 10 2017 Jens Petersen - 1.6.50-5 - -Werror=format-security fails without -Wall diff --git a/macros.ghc b/macros.ghc index 90a540d..978c471 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,7 +128,10 @@ 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} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%if 0%{?rhel} && 0%{?rhel} < 8\ +%define licenseversioned 1\ +%endif\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{?licenseversioned:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil}