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

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

%bcond_with tests

Name:           ghc-%{pkg_name}
Version:        2.5.20180715
Release:        2%{?dist}
Summary:        Type-safe EDSL for SQL queries on persistent backends

License:        BSD
Url:            https://hackage.haskell.org/package/%{pkg_name}
# Begin cabal-rpm sources:
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
# End cabal-rpm sources

# Begin cabal-rpm deps:
BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-rpm-macros
BuildRequires:  ghc-blaze-html-devel
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-conduit-devel
BuildRequires:  ghc-monad-logger-devel
BuildRequires:  ghc-persistent-devel
BuildRequires:  ghc-resourcet-devel
BuildRequires:  ghc-tagged-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-time-devel
BuildRequires:  ghc-transformers-devel
BuildRequires:  ghc-unliftio-devel
BuildRequires:  ghc-unordered-containers-devel
%if %{with tests}
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-hspec-devel
BuildRequires:  ghc-mysql-devel
BuildRequires:  ghc-mysql-simple-devel
BuildRequires:  ghc-persistent-mysql-devel
BuildRequires:  ghc-persistent-postgresql-devel
BuildRequires:  ghc-persistent-sqlite-devel
BuildRequires:  ghc-persistent-template-devel
BuildRequires:  ghc-postgresql-libpq-devel
BuildRequires:  ghc-postgresql-simple-devel
%endif
# End cabal-rpm deps

%description
'esqueleto' is a bare bones, type-safe EDSL for SQL queries that works with
unmodified 'persistent' SQL backends. Its language closely resembles SQL, so
you don't have to learn new concepts, just new syntax, and it's fairly easy to
predict the generated SQL and optimize it for your backend. Most kinds of
errors committed when writing SQL are caught as compile-time errors---although
it is possible to write type-checked 'esqueleto' queries that fail at runtime.

'persistent' is a library for type-safe data serialization. It has many kinds
of backends, such as SQL backends ('persistent-mysql', 'persistent-postgresql',
'persistent-sqlite') and NoSQL backends ('persistent-mongoDB'). While
'persistent' is a nice library for storing and retrieving records, including
with filters, it does not try to support some of the features that are specific
to SQL backends. In particular, 'esqueleto' is the recommended library for
type-safe 'JOIN's on 'persistent' SQL backends. (The alternative is using raw
SQL, but that's error prone and does not offer any composability.)

Currently, 'SELECT's, 'UPDATE's, 'INSERT's and 'DELETE's are supported.
Not all SQL features are available, but most of them can be easily added
(especially functions), so please open an issue or send a pull request if you
need anything that is not covered by 'esqueleto' on
<https://github.com/bitemyapp/esqueleto>.

The name of this library means "skeleton" in Portuguese and contains all three
SQL letters in the correct order =). It was inspired by Scala's Squeryl but
created from scratch.


%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}
# End cabal-rpm setup


%build
# Begin cabal-rpm build:
%ghc_lib_build
# End cabal-rpm build


%install
%ghc_lib_install
# End cabal-rpm install
grep -v "%{_docdir}/ghc/html/libraries/%{pkgver}" %{name}-devel.files > %{name}-devel-nodoc.files
%if %{undefined without_haddock}
grep "%{_docdir}/ghc/html/libraries/%{pkgver}" %{name}-devel.files > %{name}-devel-doc.files
%endif


%check
%cabal_test


%post devel
%ghc_pkg_recache


%postun devel
%ghc_pkg_recache


%files -f %{name}.files
# Begin cabal-rpm files:
%license LICENSE
# End cabal-rpm files


%files devel -f %{name}-devel-nodoc.files


%if %{undefined without_haddock}
%files devel-doc -f %{name}-devel-doc.files
%endif


%changelog
* Tue Oct 23 2018 Jens Petersen <petersen@redhat.com> - 2.5.20180715-2
- refresh to cabal-rpm-0.13

* Mon Jul 23 2018 Jens Petersen <petersen@redhat.com> - 2.5.20180715-1
- update to latest snapshot from github (eb76fde)

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

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

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

* Tue Nov 07 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.5.3-6
- rebuilt

* Sat Nov 04 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.5.3-5
- rebuilt

* Sat Nov 04 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.5.3-4
- rebuilt

* Mon Oct 23 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.5.3-3
- rebuilt

* Wed Sep 06 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 2.5.3-2
- Split documentation into separate subpackage.
- Update to latest spec template.

* Fri Jul 21 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 2.5.3-1
- Update to latest release.

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

* Sat Dec 17 2016 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.4.3-4
- Update release to be newer than previous builds

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