From f0f6b5560d52e8f92846c65a6c1759ca4ff4a1b9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 7 Mar 2015 22:38:07 +0900 Subject: [PATCH] allow overriding ghc- prefix with %ghc_name (for ghc784 etc) --- ghc-rpm-macros.spec | 9 ++++++--- macros.ghc | 2 +- macros.ghc-extra | 11 ++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6c0f59b..61560a5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.11 -Release: 2%{?dist} +Version: 1.4.12 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -57,7 +57,7 @@ for example in ghc and haskell-platform. # this is a last resort when there is no such appropriate package %package -n ghc-obsoletes Summary: Dummy package to obsolete deprecated Haskell packages -# 3 no longer build with ghc-7.8 (F22) +# these 3 no longer build with ghc-7.8 (F22) Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2 Obsoletes: ghc-parameterized-data < 0.1.6 Obsoletes: ghc-parameterized-data-devel < 0.1.6 @@ -112,6 +112,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Sat Mar 7 2015 Jens Petersen - 1.4.12-1 +- allow overriding ghc- prefix with ghc_name (for ghc784 etc) + * Fri Mar 6 2015 Jens Petersen - 1.4.11-2 - add ghc-obsoletes dummy subpackage for obsoleting deprecated packages - initially: ForSyDe, parameterized-data, type-level, and cgi for F22 diff --git a/macros.ghc b/macros.ghc index 8486cfa..88d0450 100644 --- a/macros.ghc +++ b/macros.ghc @@ -58,7 +58,7 @@ tests %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ -%define basepkg ghc-%{pkgname}\ +%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ diff --git a/macros.ghc-extra b/macros.ghc-extra index ae9e87b..7828c36 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -5,13 +5,14 @@ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ -%define basepkg ghc-%{pkgname}\ +%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc} +%define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Url: http://hackage.haskell.org/package/%{pkgname}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(%{ghc_prefix}-[^, ]*\\)-devel/\\1/g")}\ \ %description -n %{basepkg}\ This package provides the Haskell %{pkgname} library.\ @@ -20,9 +21,9 @@ This package provides the Haskell %{pkgname} library.\ Summary: Haskell %{pkgname} library development files\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -Requires(post): ghc-compiler = %{ghc_version}\ -Requires(postun): ghc-compiler = %{ghc_version}\ -Requires: ghc-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ +Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\ +Requires(postun): %{ghc_prefix}-compiler = %{ghc_version}\ +Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\