From dec1265943aa006c54b0957bc5c991a765644a6a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 18 Jun 2022 00:21:41 +0800 Subject: [PATCH] revise .cabal --- ghc-htoml.spec | 3 ++ htoml-1.0.0.3.cabal | 90 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 htoml-1.0.0.3.cabal diff --git a/ghc-htoml.spec b/ghc-htoml.spec index c69f0ad..1055982 100644 --- a/ghc-htoml.spec +++ b/ghc-htoml.spec @@ -15,9 +15,11 @@ 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: dos2unix BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-aeson-prof @@ -76,6 +78,7 @@ This package provides the Haskell %{pkg_name} profiling library. %prep # Begin cabal-rpm setup: %setup -q -n %{pkgver} +dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal # End cabal-rpm setup diff --git a/htoml-1.0.0.3.cabal b/htoml-1.0.0.3.cabal new file mode 100644 index 0000000..e54769a --- /dev/null +++ b/htoml-1.0.0.3.cabal @@ -0,0 +1,90 @@ +name: htoml +version: 1.0.0.3 +x-revision: 1 +synopsis: Parser for TOML files +description: TOML is an obvious and minimal format for config files. + . + This package provides a TOML parser, + build with the Parsec library. It exposes a JSON + interface using the Aeson library. +homepage: https://github.com/cies/htoml +bug-reports: https://github.com/cies/htoml/issues +license: BSD3 +license-file: LICENSE +copyright: (c) 2013-2016 Cies Breijs +author: Cies Breijs +maintainer: Cies Breijs +category: Data, Text, Parser, Configuration, JSON, Language +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + , CHANGES.md + , test/BurntSushi/fetch-toml-tests.sh + , test/BurntSushi/valid/*.toml + , test/BurntSushi/valid/*.json + , test/BurntSushi/invalid/*.toml + , benchmarks/example.toml + , benchmarks/repeated.toml + +source-repository head + type: git + location: https://github.com/cies/htoml.git + +library + exposed-modules: Text.Toml + , Text.Toml.Parser + , Text.Toml.Types + ghc-options: -Wall + hs-source-dirs: src + default-language: Haskell2010 + build-depends: base >= 4.3 && < 5 + , parsec >= 3.1.2 && < 4 + , containers >= 0.5 + , unordered-containers >= 0.2 + , vector >= 0.10 + , aeson >= 0.8 && < 2 + , text >= 1.0 && < 2 + , time -any + , old-locale -any + +test-suite htoml-test + hs-source-dirs: test + ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N + main-is: Test.hs + other-modules: BurntSushi + , Text.Toml.Parser.Spec + type: exitcode-stdio-1.0 + default-language: Haskell2010 + build-depends: base + , parsec + , containers + , unordered-containers + , vector + , aeson + , text + , time + -- from here non-lib deps + , htoml + , bytestring + , file-embed + , tasty + , tasty-hspec < 1.2 + , tasty-hunit + +benchmark benchmarks + hs-source-dirs: benchmarks . + ghc-options: -O2 -Wall -threaded -rtsopts -with-rtsopts=-N + main-is: Benchmarks.hs + type: exitcode-stdio-1.0 + default-language: Haskell2010 + build-depends: base + , parsec + , containers + , unordered-containers + , vector + , aeson + , text + , time + -- from here non-lib deps + , htoml + , criterion