allow overriding ghc- prefix with %ghc_name (for ghc784 etc)

epel9
Jens Petersen 10 years ago
parent 53322a25a5
commit f0f6b5560d

@ -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 <petersen@fedoraproject.org> - 1.4.12-1
- allow overriding ghc- prefix with ghc_name (for ghc784 etc)
* Fri Mar 6 2015 Jens Petersen <petersen@redhat.com> - 1.4.11-2
- add ghc-obsoletes dummy subpackage for obsoleting deprecated packages
- initially: ForSyDe, parameterized-data, type-level, and cgi for F22

@ -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\

@ -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}}\

Loading…
Cancel
Save