From 99ed66e2d88439c01d2378284cbcad3337948290 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 22 Jun 2020 21:09:43 +0800 Subject: [PATCH] revised .cabal file --- ghc-vector-binary-instances.spec | 2 + vector-binary-instances-0.2.5.1.cabal | 87 +++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 vector-binary-instances-0.2.5.1.cabal diff --git a/ghc-vector-binary-instances.spec b/ghc-vector-binary-instances.spec index 1d1d7ea..6056231 100644 --- a/ghc-vector-binary-instances.spec +++ b/ghc-vector-binary-instances.spec @@ -15,6 +15,7 @@ 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: @@ -76,6 +77,7 @@ library. %prep # Begin cabal-rpm setup: %setup -q -n %{pkgver} +cp -bp %{SOURCE1} %{pkg_name}.cabal # End cabal-rpm setup diff --git a/vector-binary-instances-0.2.5.1.cabal b/vector-binary-instances-0.2.5.1.cabal new file mode 100644 index 0000000..8bb38fd --- /dev/null +++ b/vector-binary-instances-0.2.5.1.cabal @@ -0,0 +1,87 @@ +Name: vector-binary-instances +Version: 0.2.5.1 +x-revision: 2 +Synopsis: Instances of Data.Binary for vector +Description: + Instances for Binary for the types defined in the vector package, + making it easy to serialize vectors to and from disk. We use the + generic interface to vectors, so all vector types are supported. + Specific instances are provided for unboxed, boxed and storable + vectors. + . + To serialize a vector: + . + > *Data.Vector.Binary> let v = Data.Vector.fromList [1..10] + > *Data.Vector.Binary> v + > fromList [1,2,3,4,5,6,7,8,9,10] :: Data.Vector.Vector + > *Data.Vector.Binary> encode v + > Chunk "\NUL\NUL\NUL\NUL\NUL...\NUL\NUL\NUL\t\NUL\NUL\NUL\NUL\n" Empty + . + Which you can in turn compress before writing to disk: + . + > compress . encode $ v + > Chunk "\US\139\b\NUL\NUL\N...\229\240,\254:\NUL\NUL\NUL" Empty + . + Try the cereal-vector package if you are looking for Data.Serialize + instances. + +-- URL for the project homepage or repository. +Homepage: https://github.com/bos/vector-binary-instances +bug-reports: https://github.com/bos/vector-binary-instances/issues +License: BSD3 +License-file: LICENSE +Author: Don Stewart +Maintainer: dons00@gmail.com, bos@serpentine.com, Ben Gamari +Tested-With: GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 + +-- A copyright notice. +-- Copyright: + +-- Stability of the pakcage (experimental, provisional, stable...) +Stability: Experimental +Category: Data +Build-type: Simple + +-- Constraint on the version of Cabal needed to build this package. +Cabal-version: >=1.8 + + +Library + Ghc-options: -Wall + -- Modules exported by the library. + Exposed-modules: + Data.Vector.Binary + + -- Packages needed in order to build this package. + Build-depends: + base > 3 && < 4.15, + vector >= 0.6 && < 0.13, + binary >= 0.5 && < 0.11 + +Benchmark benchmarks + Type: exitcode-stdio-1.0 + Main-is: Benchmarks.hs + Build-depends: + base >= 4.7, + vector-binary-instances, + vector, + bytestring, + binary, + gauge, + deepseq + hs-source-dirs: benchmarks + +Test-Suite tests + Type: exitcode-stdio-1.0 + Main-is: test/Main.hs + Build-depends: + base, + vector-binary-instances, + vector, + binary, + tasty, + tasty-quickcheck + +source-repository head + type: git + location: https://github.com/bos/vector-binary-instances