cabal-rpm-1.0.0: add doc and prof subpkgs

This commit is contained in:
Jens Petersen 2019-07-25 04:20:56 +00:00
parent 08d6d324cb
commit c88be75a1f
1 changed files with 40 additions and 13 deletions

View File

@ -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 cpphs
@ -6,7 +6,7 @@
Name: %{pkg_name}
Version: 1.20.8
Release: 8%{?dist}
Release: 9%{?dist}
Summary: A liberalised C pre-processor for Haskell
License: GPL+ and LGPLv2+
@ -17,6 +17,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-directory-devel
BuildRequires: ghc-old-locale-devel
@ -47,11 +53,8 @@ This package provides the Haskell %{name} shared library.
Summary: Haskell %{name} library development files
License: LGPLv2+
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}
@ -59,6 +62,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
@ -82,14 +104,6 @@ install -D -p -m 0644 docs/cpphs.1 %{buildroot}%{_mandir}/man1/%{name}.1
rm %{buildroot}%{_defaultlicensedir}/%{name}/LICENCE-LGPL
%post -n ghc-%{name}-devel
%ghc_pkg_recache
%postun -n ghc-%{name}-devel
%ghc_pkg_recache
%files
# Begin cabal-rpm files:
%license LICENCE-GPL
@ -110,7 +124,20 @@ rm %{buildroot}%{_defaultlicensedir}/%{name}/LICENCE-LGPL
%doc CHANGELOG README
%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 Aug 01 2019 Jens Petersen <petersen@redhat.com> - 1.20.8-9
- add doc and prof subpackages (cabal-rpm-1.0.0)
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild