cabal-rpm-1.0.0: add doc and prof subpkgs

This commit is contained in:
Jens Petersen 2019-07-25 04:27:31 +00:00
parent 1504b75fd8
commit 8a578f4b3a
1 changed files with 40 additions and 16 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 xmonad
@ -8,7 +8,7 @@
Name: %{pkg_name}
Version: 0.15
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A tiling window manager
License: BSD
@ -25,6 +25,12 @@ Source7: xmonad.hs
# 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-X11-devel
BuildRequires: ghc-containers-devel
@ -71,11 +77,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}
@ -154,6 +157,25 @@ so that xmonad can be started easily from GDM to run
in a MATE session.
%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
@ -185,14 +207,6 @@ install -p -m 0644 -D %SOURCE7 %{buildroot}%{_datadir}/xmonad/xmonad.hs
%cabal_test
%post -n ghc-%{name}-devel
%ghc_pkg_recache
%postun -n ghc-%{name}-devel
%ghc_pkg_recache
%files
@ -219,16 +233,26 @@ install -p -m 0644 -D %SOURCE7 %{buildroot}%{_datadir}/xmonad/xmonad.hs
%files -n ghc-%{name} -f ghc-%{name}.files
# Begin cabal-rpm files:
%license LICENSE
# End cabal-rpm files
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%doc CONFIG STYLE
%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 <petersen@redhat.com> - 0.15-3
- add doc and prof subpackages (cabal-rpm-1.0.0)
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild