diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79154a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/cborg-json-0.2.2.0.tar.gz diff --git a/cborg-json-0.2.2.0.cabal b/cborg-json-0.2.2.0.cabal new file mode 100644 index 0000000..08da341 --- /dev/null +++ b/cborg-json-0.2.2.0.cabal @@ -0,0 +1,64 @@ +name: cborg-json +version: 0.2.2.0 +x-revision: 2 +synopsis: A library for encoding JSON as CBOR +description: This package implements the bijection between JSON and + CBOR defined in the CBOR specification, RFC 7049. +homepage: https://github.com/well-typed/cborg +license: BSD3 +license-file: LICENSE.txt +author: Duncan Coutts +maintainer: ben@smart-cactus.org +bug-reports: https://github.com/well-typed/cborg/issues +copyright: 2015-2017 Duncan Coutts, + 2015-2017 Well-Typed LLP, + 2015 IRIS Connect Ltd +category: Codec +build-type: Simple +extra-source-files: ChangeLog.md +cabal-version: >=1.10 +tested-with: + GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC==8.8.1 + +library + exposed-modules: Codec.CBOR.JSON + ghc-options: -Wall + build-depends: + base >=4.7 && < 4.15, + aeson >=0.7 && <1.6, + aeson-pretty >=0.8 && <0.9, + unordered-containers >=0.2 && <0.3, + scientific >=0.3 && <0.4, + text >=1.1 && <1.3, + vector >=0.10 && <0.13, + cborg ==0.2.* + hs-source-dirs: src + default-language: Haskell2010 + + if impl(ghc >= 8.0) + ghc-options: -Wcompat -Wnoncanonical-monad-instances + + + +benchmark bench + type: exitcode-stdio-1.0 + hs-source-dirs: bench + main-is: Main.hs + + default-language: Haskell2010 + ghc-options: + -Wall -rtsopts -fno-cse -fno-ignore-asserts -fno-warn-orphans -O2 + + other-modules: + + build-depends: + base >= 4.6 && < 5.0, + cborg , + cborg-json , + aeson , + bytestring >= 0.10.4 && < 0.11, + criterion >= 1.0 && < 1.6, + deepseq >= 1.0 && < 1.5, + directory, + process, + zlib >= 0.5 && < 0.7 diff --git a/ghc-cborg-json.spec b/ghc-cborg-json.spec new file mode 100644 index 0000000..ef5d005 --- /dev/null +++ b/ghc-cborg-json.spec @@ -0,0 +1,124 @@ +# generated by cabal-rpm-2.0.5 +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ + +%global pkg_name cborg-json +%global pkgver %{pkg_name}-%{version} + +Name: ghc-%{pkg_name} +Version: 0.2.2.0 +Release: 1%{?dist} +Summary: A library for encoding JSON as CBOR + +License: BSD +Url: https://hackage.haskell.org/package/%{pkg_name} +# Begin cabal-rpm sources: +Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal +# End cabal-rpm sources + +# Begin cabal-rpm deps: +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-rpm-macros +BuildRequires: ghc-aeson-prof +BuildRequires: ghc-aeson-pretty-prof +BuildRequires: ghc-base-prof +BuildRequires: ghc-cborg-prof +BuildRequires: ghc-scientific-prof +BuildRequires: ghc-text-prof +BuildRequires: ghc-unordered-containers-prof +BuildRequires: ghc-vector-prof +# End cabal-rpm deps + +%description +This package implements the bijection between JSON and CBOR defined in the CBOR +specification, RFC 7049. + + +%package devel +Summary: Haskell %{pkg_name} library development files +Provides: %{name}-static = %{version}-%{release} +Provides: %{name}-static%{?_isa} = %{version}-%{release} +%if %{defined ghc_version} +Requires: ghc-compiler = %{ghc_version} +%endif +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package provides the Haskell %{pkg_name} library development files. + + +%if %{with haddock} +%package doc +Summary: Haskell %{pkg_name} library documentation +BuildArch: noarch + +%description doc +This package provides the Haskell %{pkg_name} library documentation. +%endif + + +%if %{with ghc_prof} +%package prof +Summary: Haskell %{pkg_name} profiling library +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Supplements: (%{name}-devel and ghc-prof) + +%description prof +This package provides the Haskell %{pkg_name} profiling library. +%endif + + +%prep +# Begin cabal-rpm setup: +%setup -q -n %{pkgver} +cp -bp %{SOURCE1} %{pkg_name}.cabal +# End cabal-rpm setup + + +%build +# Begin cabal-rpm build: +%ghc_lib_build +# End cabal-rpm build + + +%install +# Begin cabal-rpm install +%ghc_lib_install +chmod a-x ChangeLog.md +# End cabal-rpm install + + +%if 0%{?fedora} < 31 || 0%{?rhel} < 8 +%post devel +%ghc_pkg_recache + + +%postun devel +%ghc_pkg_recache +%endif + + +%files -f %{name}.files +# Begin cabal-rpm files: +%license LICENSE.txt +# End cabal-rpm files + + +%files devel -f %{name}-devel.files +%doc ChangeLog.md + + +%if %{with haddock} +%files doc -f %{name}-doc.files +%license LICENSE.txt +%endif + + +%if %{with ghc_prof} +%files prof -f %{name}-prof.files +%endif + + +%changelog +* Sat May 30 2020 Fedora Haskell SIG - 0.2.2.0-1 +- spec file generated by cabal-rpm-2.0.5 diff --git a/sources b/sources new file mode 100644 index 0000000..6a047ee --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cborg-json-0.2.2.0.tar.gz) = d42a7af4bf91ddac496c6e7273aebe4c9062504fa10bcdbb17f9ece851daa343aff5d8790113514fd5833513c56fa4a465ee0734adf71a1540af4b8045dd7c93