From 737f571da672d81f66295c5d00b1654b76d277d4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Jul 2019 04:27:23 +0000 Subject: [PATCH] refresh to cabal-rpm-1.0.0: lib doc/prof subpkgs and bin static BRs --- hledger.spec | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/hledger.spec b/hledger.spec index 686ee6e..f8f5c36 100644 --- a/hledger.spec +++ b/hledger.spec @@ -1,4 +1,4 @@ -# generated by cabal-rpm-0.13 +# generated by cabal-rpm-1.0.0 --subpackage # https://fedoraproject.org/wiki/Packaging:Haskell %global pkg_name hledger @@ -28,6 +28,12 @@ Source3: https://hackage.haskell.org/package/%{lucid}/%{lucid}.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-extra BuildRequires: chrpath BuildRequires: ghc-Decimal-devel @@ -99,11 +105,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} @@ -111,6 +114,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 + + %global main_version %{version} %if %{defined ghclibdir} @@ -151,14 +173,6 @@ install -Dp -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %cabal_test -%post -n ghc-%{name}-devel -%ghc_pkg_recache - - -%postun -n ghc-%{name}-devel -%ghc_pkg_recache - - %files # Begin cabal-rpm files: %license LICENSE @@ -178,6 +192,16 @@ install -Dp -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %doc CHANGES README.md +%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 * Thu Jul 25 2019 Fedora Release Engineering - 1.10-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild