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

%global pkg_name lens
%global pkgver %{pkg_name}-%{version}

%bcond_with tests

Name:           ghc-%{pkg_name}
Version:        4.15.4
Release:        2.git.0.09c2a5e%{?dist}
Summary:        Lenses, Folds and Traversals

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-array-devel
BuildRequires:  ghc-base-orphans-devel
BuildRequires:  ghc-bifunctors-devel
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-cabal-doctest-devel
BuildRequires:  ghc-call-stack-devel
BuildRequires:  ghc-comonad-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-contravariant-devel
BuildRequires:  ghc-distributive-devel
BuildRequires:  ghc-exceptions-devel
BuildRequires:  ghc-filepath-devel
BuildRequires:  ghc-free-devel
BuildRequires:  ghc-generic-deriving-devel
BuildRequires:  ghc-hashable-devel
BuildRequires:  ghc-kan-extensions-devel
BuildRequires:  ghc-mtl-devel
BuildRequires:  ghc-parallel-devel
BuildRequires:  ghc-profunctors-devel
BuildRequires:  ghc-reflection-devel
BuildRequires:  ghc-semigroupoids-devel
BuildRequires:  ghc-semigroups-devel
BuildRequires:  ghc-tagged-devel
BuildRequires:  ghc-template-haskell-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-th-abstraction-devel
BuildRequires:  ghc-transformers-compat-devel
BuildRequires:  ghc-transformers-devel
BuildRequires:  ghc-unordered-containers-devel
BuildRequires:  ghc-vector-devel
BuildRequires:  ghc-void-devel
%if %{with tests}
BuildRequires:  ghc-HUnit-devel
BuildRequires:  ghc-QuickCheck-devel
BuildRequires:  ghc-deepseq-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-doctest-devel
BuildRequires:  ghc-nats-devel
BuildRequires:  ghc-simple-reflect-devel
BuildRequires:  ghc-test-framework-devel
BuildRequires:  ghc-test-framework-hunit-devel
BuildRequires:  ghc-test-framework-quickcheck2-devel
BuildRequires:  ghc-test-framework-th-devel
%endif
# End cabal-rpm deps

%description
This package comes "Batteries Included" with many useful lenses for the types
commonly used from the Haskell Platform, and with tools for automatically
generating lenses and isomorphisms for user-supplied data types.

The combinators in 'Control.Lens' provide a highly generic toolbox for
composing families of getters, folds, isomorphisms, traversals, setters and
lenses and their indexed variants.

An overview, with a large number of examples can be found in the README at
https://github.com/ekmett/lens#lens-lenses-folds-and-traversals.


%package devel
Summary:        Haskell %{pkg_name} library development files
Provides:       %{name}-static = %{version}-%{release}
Requires:       ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
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


%check
%cabal_test


%post devel
%ghc_pkg_recache


%postun devel
%ghc_pkg_recache


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


%files devel -f %{name}-devel-nodoc.files
%doc AUTHORS.markdown CHANGELOG.markdown README.markdown


%files devel-doc -f %{name}-devel-doc.files
%doc AUTHORS.markdown CHANGELOG.markdown README.markdown examples


%changelog
* Sun Oct 01 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 4.15.4-2
- Split apart documentation.

* Sat Sep 30 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 4.15.4-1
- Update to latest spec template.
- Update to latest version.
- Shorten description.

* Fri Jul 21 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 4.14-2
- Bump for Fedora 26.

* Sat Dec 17 2016 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 4.14-1
- spec file generated by cabal-rpm-0.10.0