From 19b33cde07fbe86f3b08d8237580edea5e63c08abef6e43d3b85f1325cfb8d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sun, 21 Nov 2021 11:20:44 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-8.10.x package:ghc-generic-random revision:4, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-generic-random?expand=0&rev=6 --- generic-random.cabal | 105 +++++++++++++++++++++++++++++++++++++ ghc-generic-random.changes | 6 +++ ghc-generic-random.spec | 2 + 3 files changed, 113 insertions(+) create mode 100644 generic-random.cabal diff --git a/generic-random.cabal b/generic-random.cabal new file mode 100644 index 0000000..2305988 --- /dev/null +++ b/generic-random.cabal @@ -0,0 +1,105 @@ +name: generic-random +version: 1.5.0.0 +x-revision: 1 +synopsis: Generic random generators for QuickCheck +description: + Derive instances of @Arbitrary@ for QuickCheck, + with various options to customize implementations. + . + For more information + . + - See the README + . + - "Generic.Random.Tutorial" + . + - http://blog.poisson.chat/posts/2018-01-05-generic-random-tour.html + +homepage: http://github.com/lysxia/generic-random +license: MIT +license-file: LICENSE +stability: Stable +author: Li-yao Xia +maintainer: lysxia@gmail.com +category: Generics, Testing +build-type: Simple +extra-source-files: README.md CHANGELOG.md +cabal-version: >=1.10 +tested-with: GHC == 8.4.1, GHC == 8.6.1, GHC == 8.8.4, GHC == 8.10.5, GHC == 9.0.1 + +library + hs-source-dirs: src + exposed-modules: + Generic.Random + Generic.Random.DerivingVia + Generic.Random.Internal.BaseCase + Generic.Random.Internal.Generic + Generic.Random.Tutorial + build-depends: + base >= 4.11 && < 4.16, + QuickCheck >= 2.14 + -- exports RecursivelyShrink + default-language: Haskell2010 + ghc-options: -Wall -fno-warn-name-shadowing + +source-repository head + type: git + location: https://github.com/lysxia/generic-random + +test-suite unit + hs-source-dirs: test + main-is: Unit.hs + build-depends: + base, + deepseq, + QuickCheck, + generic-random + type: exitcode-stdio-1.0 + default-language: Haskell2010 + +test-suite coherence + hs-source-dirs: test + main-is: coherence.hs + build-depends: + base, + deepseq, + QuickCheck, + generic-random + type: exitcode-stdio-1.0 + default-language: Haskell2010 + +test-suite inspect + hs-source-dirs: test + main-is: Inspect.hs + build-depends: + base, + QuickCheck, + inspection-testing, + generic-random + type: exitcode-stdio-1.0 + default-language: Haskell2010 + if !flag(enable-inspect) + buildable: False + else + build-depends: random < 1.2 + -- TODO: this test fails with newer versions of random + +test-suite inspect-derivingvia + hs-source-dirs: test + main-is: Inspect/DerivingVia.hs + build-depends: + base, + QuickCheck, + inspection-testing, + generic-random + type: exitcode-stdio-1.0 + default-language: Haskell2010 + if !flag(enable-inspect) + buildable: False + else + build-depends: random < 1.2 + -- TODO: this test fails with newer versions of random + +flag enable-inspect + description: Enable inspection tests + default: False + manual: True diff --git a/ghc-generic-random.changes b/ghc-generic-random.changes index fe74be1..7204247 100644 --- a/ghc-generic-random.changes +++ b/ghc-generic-random.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 15 06:59:51 UTC 2021 - psimons@suse.com + +- Update generic-random to version 1.5.0.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + ------------------------------------------------------------------- Thu Jul 15 16:15:26 UTC 2021 - psimons@suse.com diff --git a/ghc-generic-random.spec b/ghc-generic-random.spec index d5d575c..3827e9d 100644 --- a/ghc-generic-random.spec +++ b/ghc-generic-random.spec @@ -25,6 +25,7 @@ Summary: Generic random generators for QuickCheck License: MIT URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-rpm-macros @@ -57,6 +58,7 @@ This package provides the Haskell %{pkg_name} library development files. %prep %autosetup -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build