refresh to cabal-rpm-0.13

This commit is contained in:
Jens Petersen 2019-02-17 22:46:47 +08:00
parent b584300e89
commit a2dfa340f9
2 changed files with 89 additions and 3 deletions

View File

@ -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 <petersen@redhat.com> - 1.1-10
- refresh to cabal-rpm-0.13
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

71
random-1.1.cabal Normal file
View File

@ -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