diff --git a/.gitignore b/.gitignore index e69de29..aa8275c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/aeson-pretty-0.7.1.tar.gz diff --git a/ghc-aeson-pretty.spec b/ghc-aeson-pretty.spec new file mode 100644 index 0000000..eec9ee3 --- /dev/null +++ b/ghc-aeson-pretty.spec @@ -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 - 0.7.1-1 +- package the tool in devel subpackage +- simpler summary and description + +* Mon Jan 27 2014 Fedora Haskell SIG - 0.7.1 +- spec file generated by cabal-rpm-0.8.8 diff --git a/sources b/sources index e69de29..59ec5c1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +557a22907c3454f974add938241a9339 aeson-pretty-0.7.1.tar.gz