ca741d9
# generated by cabal-rpm-2.1.0
b624c55
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
30a140f
30a140f
%global pkg_name aeson-pretty
aa290ae
%global pkgver %{pkg_name}-%{version}
30a140f
30a140f
Name:           ghc-%{pkg_name}
1bed890
Version:        0.8.9
e9e7c44
Release:        %autorelease
30a140f
Summary:        JSON pretty-printing library
30a140f
ca741d9
License:        BSD-3-Clause
3f55f0a
Url:            https://hackage.haskell.org/package/%{pkg_name}
17e7df3
# Begin cabal-rpm sources:
aa290ae
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
1bed890
Source1:        https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
17e7df3
# End cabal-rpm sources
30a140f
17e7df3
# Begin cabal-rpm deps:
1bed890
BuildRequires:  dos2unix
30a140f
BuildRequires:  ghc-Cabal-devel
30a140f
BuildRequires:  ghc-rpm-macros
ca741d9
BuildRequires:  ghc-aeson-devel
ca741d9
BuildRequires:  ghc-attoparsec-devel
ca741d9
BuildRequires:  ghc-base-devel
ca741d9
BuildRequires:  ghc-base-compat-devel
ca741d9
BuildRequires:  ghc-bytestring-devel
ca741d9
BuildRequires:  ghc-cmdargs-devel
ca741d9
BuildRequires:  ghc-scientific-devel
ca741d9
BuildRequires:  ghc-text-devel
ca741d9
BuildRequires:  ghc-unordered-containers-devel
ca741d9
BuildRequires:  ghc-vector-devel
ca741d9
%if %{with ghc_prof}
e4b26d6
BuildRequires:  ghc-aeson-prof
e4b26d6
BuildRequires:  ghc-attoparsec-prof
e4b26d6
BuildRequires:  ghc-base-prof
e4b26d6
BuildRequires:  ghc-base-compat-prof
e4b26d6
BuildRequires:  ghc-bytestring-prof
e4b26d6
BuildRequires:  ghc-cmdargs-prof
e4b26d6
BuildRequires:  ghc-scientific-prof
e4b26d6
BuildRequires:  ghc-text-prof
e4b26d6
BuildRequires:  ghc-unordered-containers-prof
e4b26d6
BuildRequires:  ghc-vector-prof
ca741d9
%endif
30a140f
# End cabal-rpm deps
30a140f
30a140f
%description
30a140f
A JSON pretty-printing library compatible with aeson as well as a command-line
30a140f
tool to improve readabilty of streams of JSON data.
30a140f
30a140f
The library provides the function "encodePretty". It is a drop-in replacement
30a140f
for aeson's "encode" function, producing JSON-ByteStrings for human readers.
30a140f
30a140f
The command-line tool reads JSON from stdin and writes prettified JSON to
30a140f
stdout. It also offers a complementary "compact"-mode, essentially the opposite
30a140f
of pretty-printing.
30a140f
30a140f
30a140f
%package devel
30a140f
Summary:        Haskell %{pkg_name} library development files
30a140f
Provides:       %{name}-static = %{version}-%{release}
e4b26d6
Provides:       %{name}-static%{?_isa} = %{version}-%{release}
313bf4a
%if %{defined ghc_version}
30a140f
Requires:       ghc-compiler = %{ghc_version}
313bf4a
%endif
30a140f
Requires:       %{name}%{?_isa} = %{version}-%{release}
30a140f
30a140f
%description devel
30a140f
This package provides the Haskell %{pkg_name} library development files.
30a140f
30a140f
155c07d
%if %{with haddock}
155c07d
%package doc
155c07d
Summary:        Haskell %{pkg_name} library documentation
d9c109f
BuildArch:      noarch
22b63eb
Requires:       ghc-filesystem
155c07d
155c07d
%description doc
155c07d
This package provides the Haskell %{pkg_name} library documentation.
155c07d
%endif
155c07d
155c07d
155c07d
%if %{with ghc_prof}
155c07d
%package prof
155c07d
Summary:        Haskell %{pkg_name} profiling library
155c07d
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
d9c109f
Supplements:    (%{name}-devel and ghc-prof)
155c07d
155c07d
%description prof
155c07d
This package provides the Haskell %{pkg_name} profiling library.
155c07d
%endif
155c07d
155c07d
30a140f
%prep
17e7df3
# Begin cabal-rpm setup:
aa290ae
%setup -q -n %{pkgver}
1bed890
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
17e7df3
# End cabal-rpm setup
30a140f
30a140f
30a140f
%build
17e7df3
# Begin cabal-rpm build:
30a140f
%ghc_lib_build
17e7df3
# End cabal-rpm build
30a140f
30a140f
30a140f
%install
17e7df3
# Begin cabal-rpm install
30a140f
%ghc_lib_install
17e7df3
# End cabal-rpm install
30a140f
30a140f
30a140f
%files -f %{name}.files
17e7df3
# Begin cabal-rpm files:
7d97ae8
%license LICENSE
17e7df3
# End cabal-rpm files
30a140f
30a140f
30a140f
%files devel -f %{name}-devel.files
1bed890
%doc CHANGELOG.markdown README.markdown
3f55f0a
%{_bindir}/%{pkg_name}
30a140f
30a140f
155c07d
%if %{with haddock}
155c07d
%files doc -f %{name}-doc.files
d9c109f
%license LICENSE
155c07d
%endif
155c07d
155c07d
155c07d
%if %{with ghc_prof}
155c07d
%files prof -f %{name}-prof.files
155c07d
%endif
155c07d
155c07d
30a140f
%changelog
e9e7c44
%autochangelog