Blob Blame History Raw
# generated by cabal-rpm-0.12.5
# https://fedoraproject.org/wiki/Packaging:Haskell

%global pkg_name generics-sop
%global pkgver %{pkg_name}-%{version}

Name:           ghc-%{pkg_name}
Version:        0.3.2.0
Release:        1%{?dist}
Summary:        Generic Programming using True Sums of Products

License:        BSD
Url:            https://hackage.haskell.org/package/%{pkg_name}
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
Source1:        https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal

BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires:  ghc-deepseq-devel
BuildRequires:  ghc-template-haskell-devel
# End cabal-rpm deps

%description
A library to support the definition of generic functions. Datatypes are viewed
in a uniform, structured way: the choice between constructors is represented
using an n-ary sum, and the arguments of each constructor are represented using
an n-ary product.

The module "Generics.SOP" is the main module of this library and contains more
detailed documentation.

Examples of using this library are provided by the following packages:

* '<https://hackage.haskell.org/package/basic-sop basic-sop>' basic examples,

* '<https://hackage.haskell.org/package/pretty-sop pretty-sop>' generic pretty
printing,

* '<https://hackage.haskell.org/package/lens-sop lens-sop>' generically
computed lenses,

* '<https://hackage.haskell.org/package/json-sop json-sop>' generic JSON
conversions.

A detailed description of the ideas behind this library is provided by the
paper:

* Edsko de Vries and Andres Löh.
<http://www.andres-loeh.de/TrueSumsOfProducts True Sums of Products>.
Workshop on Generic Programming (WGP) 2014. .


%package devel
Summary:        Haskell %{pkg_name} library development files
Provides:       %{name}-static = %{version}-%{release}
Provides:       %{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:       %{name}%{?_isa} = %{version}-%{release}

%description devel
This package provides the Haskell %{pkg_name} library development files.


%package devel-doc
Summary:        Haskell %{pkg_name} library development documentation
BuildArch:      noarch

%description devel-doc
This package provides the Haskell %{pkg_name} development documentation.


%prep
%setup -q -n %{pkgver}
cp -p %{SOURCE1} %{pkg_name}.cabal


%build
%ghc_lib_build


%install
%ghc_lib_install
grep -v "%{_docdir}/ghc/html/libraries/%{pkgver}" %{name}-devel.files > %{name}-devel-nodoc.files
grep "%{_docdir}/ghc/html/libraries/%{pkgver}" %{name}-devel.files > %{name}-devel-doc.files


%post devel
%ghc_pkg_recache


%postun devel
%ghc_pkg_recache


%files -f %{name}.files
%license LICENSE


%files devel -f %{name}-devel-nodoc.files
%doc CHANGELOG.md


%files devel-doc -f %{name}-devel-doc.files
%doc CHANGELOG.md

%changelog
* Sun Jul 22 2018 Jens Petersen <petersen@redhat.com> - 0.3.2.0-1
- update to 0.3.2.0

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Fri Jan 26 2018 Jens Petersen <petersen@redhat.com> - 0.3.1.0-2
- rebuild

* Thu Nov 16 2017 David Shea <dshea@redhat.com> - 0.3.1.0-2
- Move the API docs to a separate package
- spec file generated by cabal-rpm-0.11.2