From bb7f5f93f91f612b154f78e4feea61cf55944984 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 4 Aug 2021 22:29:12 +0800 Subject: [PATCH] revise .cabal --- ghc-th-abstraction.spec | 3 +++ th-abstraction-0.4.2.0.cabal | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 th-abstraction-0.4.2.0.cabal diff --git a/ghc-th-abstraction.spec b/ghc-th-abstraction.spec index 0d46406..1206a4b 100644 --- a/ghc-th-abstraction.spec +++ b/ghc-th-abstraction.spec @@ -13,9 +13,11 @@ License: ISC 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-base-prof @@ -68,6 +70,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/th-abstraction-0.4.2.0.cabal b/th-abstraction-0.4.2.0.cabal new file mode 100644 index 0000000..7a9387f --- /dev/null +++ b/th-abstraction-0.4.2.0.cabal @@ -0,0 +1,50 @@ +name: th-abstraction +version: 0.4.2.0 +x-revision: 1 +synopsis: Nicer interface for reified information about data types +description: This package normalizes variations in the interface for + inspecting datatype information via Template Haskell + so that packages and support a single, easier to use + informational datatype while supporting many versions + of Template Haskell. +license: ISC +license-file: LICENSE +author: Eric Mertens +maintainer: emertens@gmail.com +copyright: 2017 Eric Mertens +homepage: https://github.com/glguy/th-abstraction +bug-reports: https://github.com/glguy/th-abstraction/issues +category: Development +build-type: Simple +extra-source-files: ChangeLog.md README.md +cabal-version: >=1.10 +tested-with: GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4 + +source-repository head + type: git + location: https://github.com/glguy/th-abstraction.git + +library + exposed-modules: Language.Haskell.TH.Datatype + Language.Haskell.TH.Datatype.TyVarBndr + other-modules: Language.Haskell.TH.Datatype.Internal + build-depends: base >=4.3 && <5, + ghc-prim, + template-haskell >=2.5 && <2.19, + containers >=0.4 && <0.7 + hs-source-dirs: src + default-language: Haskell2010 + + if impl(ghc >= 9.0) + -- these flags may abort compilation with GHC-8.10 + -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295 + ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode + +test-suite unit-tests + other-modules: Harness + Types + type: exitcode-stdio-1.0 + main-is: Main.hs + build-depends: th-abstraction, base, containers, template-haskell <2.18 + hs-source-dirs: test + default-language: Haskell2010