ghc-free/ghc-free.spec
2018-02-04 01:02:32 +09:00

133 lines
3.9 KiB
RPMSpec

# generated by cabal-rpm-0.12.1
# https://fedoraproject.org/wiki/Packaging:Haskell
%global pkg_name free
%global pkgver %{pkg_name}-%{version}
Name: ghc-%{pkg_name}
Version: 4.12.4
Release: 6%{?dist}
Summary: Monads for free
License: BSD
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires: ghc-bifunctors-devel
BuildRequires: ghc-comonad-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-distributive-devel
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-prelude-extras-devel
BuildRequires: ghc-profunctors-devel
BuildRequires: ghc-semigroupoids-devel
BuildRequires: ghc-semigroups-devel
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-transformers-devel
# End cabal-rpm deps
%description
Free monads are useful for many tree-like structures and domain specific
languages.
If 'f' is a 'Functor' then the free 'Monad' on 'f' is the type of trees whose
nodes are labeled with the constructors of 'f'. The word "free" is used in the
sense of "unrestricted" rather than "zero-cost": 'Free f' makes no constraining
assumptions beyond those given by 'f' and the definition of 'Monad'.
As used here it is a standard term from the mathematical theory of adjoint
functors.
Cofree comonads are dual to free monads. They provide convenient ways to talk
about branching streams and rose-trees, and can be used to annotate syntax
trees. The cofree comonad can be seen as a stream parameterized by a 'Functor'
that controls its branching factor.
More information on free monads, including examples, can be found in the
following blog posts: <http://comonad.com/reader/2008/monads-for-free/>
<http://comonad.com/reader/2011/free-monads-for-less/>.
%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} library development
documentation.
%prep
%setup -q -n %{pkgver}
%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.markdown README.markdown doc examples
%files devel-doc -f %{name}-devel-doc.files
%doc CHANGELOG.markdown README.markdown doc examples
%changelog
* Fri Jan 26 2018 Jens Petersen <petersen@redhat.com> - 4.12.4-6
- rebuild
* Wed Sep 20 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 4.12.4-5
- Update to latest spec template.
- Split documentation into separate subpackage.
* Fri Jul 21 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 4.12.4-4
- Bump for Fedora 26.
* Sat Dec 17 2016 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.12.4-3
- Bump to rebuild against new dependencies
* Sat Dec 17 2016 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.12.4-2
- Update release to be newer than previous builds
* Sat Dec 17 2016 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 4.12.4-1
- spec file generated by cabal-rpm-0.10.0