From d571a54f9df16f1260ad53b221d0f1907c8ba122 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Jul 2019 04:27:25 +0000 Subject: [PATCH] cabal-rpm-1.0.0: add doc and prof subpkgs --- hscolour.spec | 55 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/hscolour.spec b/hscolour.spec index 4e0c80d..ea28edf 100644 --- a/hscolour.spec +++ b/hscolour.spec @@ -1,4 +1,4 @@ -# generated by cabal-rpm-0.13 +# generated by cabal-rpm-1.0.0 # https://fedoraproject.org/wiki/Packaging:Haskell %global pkg_name hscolour @@ -15,7 +15,7 @@ Name: %{pkg_name} Version: 1.24.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Colorize Haskell code # the source does not state intended GPL version @@ -27,6 +27,12 @@ Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel +%if %{with haddock} +BuildRequires: ghc-doc +%endif +%if %{with ghc_prof} +BuildRequires: ghc-prof +%endif BuildRequires: ghc-rpm-macros BuildRequires: ghc-containers-devel Requires: %{name}-common = %{version}-%{release} @@ -58,11 +64,8 @@ This package provides the Haskell %{name} shared library. %package -n ghc-%{name}-devel Summary: Haskell %{name} library development files Provides: ghc-%{name}-static = %{version}-%{release} -Provides: ghc-%{name}-doc = %{version}-%{release} %if %{defined ghc_version} Requires: ghc-compiler = %{ghc_version} -Requires(post): ghc-compiler = %{ghc_version} -Requires(postun): ghc-compiler = %{ghc_version} %endif Requires: ghc-%{name}%{?_isa} = %{version}-%{release} @@ -70,6 +73,25 @@ Requires: ghc-%{name}%{?_isa} = %{version}-%{release} This package provides the Haskell %{name} library development files. +%if %{with haddock} +%package -n ghc-%{name}-doc +Summary: Haskell %{name} library documentation + +%description -n ghc-%{name}-doc +This package provides the Haskell %{name} library documentation. +%endif + + +%if %{with ghc_prof} +%package -n ghc-%{name}-prof +Summary: Haskell %{name} profiling library +Requires: ghc-%{name}-devel%{?_isa} = %{version}-%{release} + +%description -n ghc-%{name}-prof +This package provides the Haskell %{name} profiling library. +%endif + + %prep # Begin cabal-rpm setup: %setup -q @@ -89,14 +111,6 @@ mv %{buildroot}%{_ghcdocdir}{,-common} # End cabal-rpm install -%post -n ghc-%{name}-devel -%ghc_pkg_recache - - -%postun -n ghc-%{name}-devel -%ghc_pkg_recache - - %files # Begin cabal-rpm files: %{_bindir}/HsColour @@ -111,14 +125,25 @@ mv %{buildroot}%{_ghcdocdir}{,-common} %files -n ghc-%{name} -f ghc-%{name}.files -# Begin cabal-rpm files: -# End cabal-rpm files %files -n ghc-%{name}-devel -f ghc-%{name}-devel.files +%if %{with haddock} +%files -n ghc-%{name}-doc -f ghc-%{name}-doc.files +%endif + + +%if %{with ghc_prof} +%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files +%endif + + %changelog +* Fri Aug 02 2019 Jens Petersen - 1.24.4-5 +- add doc and prof subpackages (cabal-rpm-1.0.0) + * Thu Jul 25 2019 Fedora Release Engineering - 1.24.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild