From a2dfa340f9923d249aa48e7922c408ff0ae12cca Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 17 Feb 2019 22:46:47 +0800 Subject: [PATCH] refresh to cabal-rpm-0.13 --- ghc-random.spec | 21 ++++++++++++-- random-1.1.cabal | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 random-1.1.cabal diff --git a/ghc-random.spec b/ghc-random.spec index 2fc216f..5f4175a 100644 --- a/ghc-random.spec +++ b/ghc-random.spec @@ -1,4 +1,4 @@ -# generated by cabal-rpm-0.12.1 +# generated by cabal-rpm-0.13 # https://fedoraproject.org/wiki/Packaging:Haskell %global pkg_name random @@ -6,16 +6,19 @@ Name: ghc-%{pkg_name} Version: 1.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Random number library 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 -# Begin cabal-rpm deps: BuildRequires: ghc-time-devel # End cabal-rpm deps @@ -40,15 +43,22 @@ This package provides the Haskell %{pkg_name} library development files. %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 +# End cabal-rpm install %post devel @@ -60,7 +70,9 @@ This package provides the Haskell %{pkg_name} library development files. %files -f %{name}.files +# Begin cabal-rpm files: %license LICENSE +# End cabal-rpm files %files devel -f %{name}-devel.files @@ -68,6 +80,9 @@ This package provides the Haskell %{pkg_name} library development files. %changelog +* Sun Feb 17 2019 Jens Petersen - 1.1-10 +- refresh to cabal-rpm-0.13 + * Thu Jan 31 2019 Fedora Release Engineering - 1.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/random-1.1.cabal b/random-1.1.cabal new file mode 100644 index 0000000..020800c --- /dev/null +++ b/random-1.1.cabal @@ -0,0 +1,71 @@ +name: random +version: 1.1 +x-revision: 1 + + + + +license: BSD3 +license-file: LICENSE +maintainer: carter dot schonwald at google mail dot com +bug-reports: https://github.com/haskell/random/issues +synopsis: random number library +category: System +description: + This package provides a basic random number generation + library, including the ability to split random number + generators. + +extra-source-files: + .travis.yml + README.md + CHANGELOG.md + .gitignore + .darcs-boring + + + +build-type: Simple +-- cabal-version 1.8 needed because "the field 'build-depends: random' refers +-- to a library which is defined within the same package" +cabal-version: >= 1.8 + + + +Library + exposed-modules: + System.Random + extensions: CPP + GHC-Options: -O2 + build-depends: base >= 3 && < 5, time + +source-repository head + type: git + location: http://git.haskell.org/packages/random.git + +-- To run the Test-Suite: +-- $ cabal configure --enable-tests +-- $ cabal test --show-details=always --test-options="+RTS -M1M -RTS" + +Test-Suite T7936 + type: exitcode-stdio-1.0 + main-is: T7936.hs + hs-source-dirs: tests + build-depends: base >= 3 && < 5, random + ghc-options: -rtsopts -O2 + +Test-Suite TestRandomRs + type: exitcode-stdio-1.0 + main-is: TestRandomRs.hs + hs-source-dirs: tests + build-depends: base >= 3 && < 5, random + ghc-options: -rtsopts -O2 + -- TODO. Why does the following not work? + --test-options: +RTS -M1M -RTS + +Test-Suite TestRandomIOs + type: exitcode-stdio-1.0 + main-is: TestRandomIOs.hs + hs-source-dirs: tests + build-depends: base >= 3 && < 5, random + ghc-options: -rtsopts -O2