741dc5e
# generated by cabal-rpm-2.1.0
9e6b1b5
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
c1d9507
c1d9507
%global pkg_name mockery
c1d9507
%global pkgver %{pkg_name}-%{version}
c1d9507
c1d9507
%bcond_without tests
c1d9507
c1d9507
Name:           ghc-%{pkg_name}
c1d9507
Version:        0.3.5
c5736bf
Release:        %autorelease
c1d9507
Summary:        Support functions for automated testing
c1d9507
c1d9507
License:        MIT
c1d9507
Url:            https://hackage.haskell.org/package/%{pkg_name}
0389e74
# Begin cabal-rpm sources:
c1d9507
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
0389e74
# End cabal-rpm sources
c1d9507
0389e74
# Begin cabal-rpm deps:
c1d9507
BuildRequires:  ghc-Cabal-devel
c1d9507
BuildRequires:  ghc-rpm-macros
741dc5e
BuildRequires:  ghc-base-devel
741dc5e
BuildRequires:  ghc-base-compat-devel
741dc5e
BuildRequires:  ghc-bytestring-devel
741dc5e
BuildRequires:  ghc-directory-devel
741dc5e
BuildRequires:  ghc-filepath-devel
741dc5e
BuildRequires:  ghc-logging-facade-devel
741dc5e
BuildRequires:  ghc-temporary-devel
741dc5e
%if %{with ghc_prof}
faf4416
BuildRequires:  ghc-base-prof
faf4416
BuildRequires:  ghc-base-compat-prof
faf4416
BuildRequires:  ghc-bytestring-prof
faf4416
BuildRequires:  ghc-directory-prof
faf4416
BuildRequires:  ghc-filepath-prof
faf4416
BuildRequires:  ghc-logging-facade-prof
faf4416
BuildRequires:  ghc-temporary-prof
741dc5e
%endif
c1d9507
%if %{with tests}
c1d9507
BuildRequires:  ghc-hspec-devel
c1d9507
%endif
c1d9507
# End cabal-rpm deps
c1d9507
c1d9507
%description
c1d9507
Support functions for automated testing.
c1d9507
c1d9507
c1d9507
%package devel
c1d9507
Summary:        Haskell %{pkg_name} library development files
c1d9507
Provides:       %{name}-static = %{version}-%{release}
faf4416
Provides:       %{name}-static%{?_isa} = %{version}-%{release}
c1d9507
%if %{defined ghc_version}
c1d9507
Requires:       ghc-compiler = %{ghc_version}
c1d9507
%endif
c1d9507
Requires:       %{name}%{?_isa} = %{version}-%{release}
c1d9507
c1d9507
%description devel
c1d9507
This package provides the Haskell %{pkg_name} library development files.
c1d9507
c1d9507
7c10119
%if %{with haddock}
7c10119
%package doc
7c10119
Summary:        Haskell %{pkg_name} library documentation
bb2352b
BuildArch:      noarch
e23eefe
Requires:       ghc-filesystem
7c10119
7c10119
%description doc
7c10119
This package provides the Haskell %{pkg_name} library documentation.
7c10119
%endif
7c10119
7c10119
7c10119
%if %{with ghc_prof}
7c10119
%package prof
7c10119
Summary:        Haskell %{pkg_name} profiling library
7c10119
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
bb2352b
Supplements:    (%{name}-devel and ghc-prof)
7c10119
7c10119
%description prof
7c10119
This package provides the Haskell %{pkg_name} profiling library.
7c10119
%endif
7c10119
7c10119
c1d9507
%prep
0389e74
# Begin cabal-rpm setup:
c1d9507
%setup -q -n %{pkgver}
0389e74
# End cabal-rpm setup
c1d9507
c1d9507
c1d9507
%build
0389e74
# Begin cabal-rpm build:
c1d9507
%ghc_lib_build
0389e74
# End cabal-rpm build
c1d9507
c1d9507
c1d9507
%install
0389e74
# Begin cabal-rpm install
c1d9507
%ghc_lib_install
0389e74
# End cabal-rpm install
c1d9507
c1d9507
c1d9507
%check
e23eefe
%if %{with tests}
c1d9507
%cabal_test
e23eefe
%endif
c1d9507
c1d9507
c1d9507
%files -f %{name}.files
0389e74
# Begin cabal-rpm files:
c1d9507
%license LICENSE
0389e74
# End cabal-rpm files
c1d9507
c1d9507
c1d9507
%files devel -f %{name}-devel.files
c1d9507
c1d9507
7c10119
%if %{with haddock}
7c10119
%files doc -f %{name}-doc.files
bb2352b
%license LICENSE
7c10119
%endif
7c10119
7c10119
7c10119
%if %{with ghc_prof}
7c10119
%files prof -f %{name}-prof.files
7c10119
%endif
7c10119
7c10119
c1d9507
%changelog
c5736bf
%autochangelog