46a1949
# generated by cabal-rpm-2.1.2
ab244d2
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
ab244d2
ab244d2
%global pkg_name bugzilla-redhat
ab244d2
%global pkgver %{pkg_name}-%{version}
ab244d2
d309a24
%bcond_without tests
d309a24
ab244d2
Name:           ghc-%{pkg_name}
656e318
Version:        1.0.1
5a2a315
Release:        %autorelease
ab244d2
Summary:        A Haskell interface to the Bugzilla native REST API
ab244d2
86923af
License:        BSD-3-Clause
ab244d2
Url:            https://hackage.haskell.org/package/%{pkg_name}
ab244d2
# Begin cabal-rpm sources:
ab244d2
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
46a1949
Source1:        https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
ab244d2
# End cabal-rpm sources
ab244d2
ab244d2
# Begin cabal-rpm deps:
46a1949
BuildRequires:  dos2unix
ab244d2
BuildRequires:  ghc-Cabal-devel
ab244d2
BuildRequires:  ghc-rpm-macros
86923af
BuildRequires:  ghc-aeson-devel
86923af
BuildRequires:  ghc-base-devel
86923af
BuildRequires:  ghc-blaze-builder-devel
86923af
BuildRequires:  ghc-bytestring-devel
86923af
BuildRequires:  ghc-connection-devel
86923af
BuildRequires:  ghc-containers-devel
86923af
BuildRequires:  ghc-http-conduit-devel
86923af
BuildRequires:  ghc-http-types-devel
86923af
BuildRequires:  ghc-iso8601-time-devel
86923af
BuildRequires:  ghc-resourcet-devel
86923af
BuildRequires:  ghc-text-devel
86923af
BuildRequires:  ghc-time-devel
86923af
BuildRequires:  ghc-transformers-devel
86923af
BuildRequires:  ghc-unordered-containers-devel
86923af
BuildRequires:  ghc-vector-devel
86923af
%if %{with ghc_prof}
ab244d2
BuildRequires:  ghc-aeson-prof
ab244d2
BuildRequires:  ghc-base-prof
ab244d2
BuildRequires:  ghc-blaze-builder-prof
ab244d2
BuildRequires:  ghc-bytestring-prof
ab244d2
BuildRequires:  ghc-connection-prof
ab244d2
BuildRequires:  ghc-containers-prof
ab244d2
BuildRequires:  ghc-http-conduit-prof
ab244d2
BuildRequires:  ghc-http-types-prof
ab244d2
BuildRequires:  ghc-iso8601-time-prof
ab244d2
BuildRequires:  ghc-resourcet-prof
ab244d2
BuildRequires:  ghc-text-prof
ab244d2
BuildRequires:  ghc-time-prof
ab244d2
BuildRequires:  ghc-transformers-prof
ab244d2
BuildRequires:  ghc-unordered-containers-prof
ab244d2
BuildRequires:  ghc-vector-prof
86923af
%endif
d309a24
%if %{with tests}
d309a24
BuildRequires:  ghc-hspec-devel
d309a24
%endif
ab244d2
# End cabal-rpm deps
ab244d2
ab244d2
%description
d309a24
This package is designed to provide an easy-to-use, type-safe interface to
ab244d2
querying Bugzilla from Haskell.
ab244d2
f3fda99
This is a friendly fork of Seth Fowler's library, with updates and API tweaks
f3fda99
needed for bugzilla.redhat.com.
ab244d2
ab244d2
ab244d2
%package devel
ab244d2
Summary:        Haskell %{pkg_name} library development files
ab244d2
Provides:       %{name}-static = %{version}-%{release}
ab244d2
Provides:       %{name}-static%{?_isa} = %{version}-%{release}
ab244d2
%if %{defined ghc_version}
ab244d2
Requires:       ghc-compiler = %{ghc_version}
ab244d2
%endif
ab244d2
Requires:       %{name}%{?_isa} = %{version}-%{release}
ab244d2
ab244d2
%description devel
ab244d2
This package provides the Haskell %{pkg_name} library development
ab244d2
files.
ab244d2
ab244d2
ab244d2
%if %{with haddock}
ab244d2
%package doc
ab244d2
Summary:        Haskell %{pkg_name} library documentation
ab244d2
BuildArch:      noarch
c19f74a
Requires:       ghc-filesystem
ab244d2
ab244d2
%description doc
ab244d2
This package provides the Haskell %{pkg_name} library documentation.
ab244d2
%endif
ab244d2
ab244d2
ab244d2
%if %{with ghc_prof}
ab244d2
%package prof
ab244d2
Summary:        Haskell %{pkg_name} profiling library
ab244d2
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
ab244d2
Supplements:    (%{name}-devel and ghc-prof)
ab244d2
ab244d2
%description prof
ab244d2
This package provides the Haskell %{pkg_name} profiling library.
ab244d2
%endif
ab244d2
ab244d2
ab244d2
%prep
ab244d2
# Begin cabal-rpm setup:
ab244d2
%setup -q -n %{pkgver}
46a1949
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
ab244d2
# End cabal-rpm setup
ab244d2
ab244d2
ab244d2
%build
ab244d2
# Begin cabal-rpm build:
ab244d2
%ghc_lib_build
ab244d2
# End cabal-rpm build
ab244d2
ab244d2
ab244d2
%install
ab244d2
# Begin cabal-rpm install
ab244d2
%ghc_lib_install
ab244d2
# End cabal-rpm install
ab244d2
ab244d2
d309a24
%check
d309a24
%if %{with tests}
d309a24
%cabal_test
d309a24
%endif
d309a24
d309a24
ab244d2
%files -f %{name}.files
ab244d2
# Begin cabal-rpm files:
ab244d2
%license LICENSE
ab244d2
# End cabal-rpm files
ab244d2
ab244d2
ab244d2
%files devel -f %{name}-devel.files
d309a24
%doc ChangeLog.md README.md TODO
ab244d2
ab244d2
ab244d2
%if %{with haddock}
ab244d2
%files doc -f %{name}-doc.files
ab244d2
%license LICENSE
ab244d2
%endif
ab244d2
ab244d2
ab244d2
%if %{with ghc_prof}
ab244d2
%files prof -f %{name}-prof.files
ab244d2
%endif
ab244d2
ab244d2
ab244d2
%changelog
5a2a315
%autochangelog