This commit is contained in:
Jens Petersen 2014-03-30 13:59:01 +09:00
parent 0c13215f51
commit 30a140f24c
3 changed files with 90 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/aeson-pretty-0.7.1.tar.gz

88
ghc-aeson-pretty.spec Normal file
View File

@ -0,0 +1,88 @@
# https://fedoraproject.org/wiki/Packaging:Haskell
%global pkg_name aeson-pretty
Name: ghc-%{pkg_name}
Version: 0.7.1
Release: 1%{?dist}
Summary: JSON pretty-printing library
License: BSD
URL: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires: chrpath
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-cmdargs-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-vector-devel
# End cabal-rpm deps
%description
A JSON pretty-printing library compatible with aeson as well as a command-line
tool to improve readabilty of streams of JSON data.
The library provides the function "encodePretty". It is a drop-in replacement
for aeson's "encode" function, producing JSON-ByteStrings for human readers.
The command-line tool reads JSON from stdin and writes prettified JSON to
stdout. It also offers a complementary "compact"-mode, essentially the opposite
of pretty-printing.
%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.
%prep
%setup -q -n %{pkg_name}-%{version}
%build
%ghc_lib_build
%install
%ghc_lib_install
%ghc_fix_dynamic_rpath %{pkg_name}
%post devel
%ghc_pkg_recache
%postun devel
%ghc_pkg_recache
%files -f %{name}.files
%doc LICENSE
%files devel -f %{name}-devel.files
%doc README.markdown
%{_bindir}/aeson-pretty
%changelog
* Mon Jan 27 2014 Jens Petersen <petersen@redhat.com> - 0.7.1-1
- package the tool in devel subpackage
- simpler summary and description
* Mon Jan 27 2014 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.7.1
- spec file generated by cabal-rpm-0.8.8

View File

@ -0,0 +1 @@
557a22907c3454f974add938241a9339 aeson-pretty-0.7.1.tar.gz