refresh to cabal-rpm-0.13

This commit is contained in:
Jens Petersen 2019-02-17 22:44:10 +08:00
parent 5f60deb333
commit 2039380ea0
2 changed files with 60 additions and 23 deletions

View File

@ -1,21 +1,47 @@
cabal-version: >=1.10
name: cryptohash-sha1
version: 0.11.100.1
x-revision: 2
description:
A practical incremental and one-pass, pure API to the
<https://en.wikipedia.org/wiki/SHA-1 SHA-1 hash algorithm>
(including <https://en.wikipedia.org/wiki/HMAC HMAC> support)
with performance close to the fastest implementations available in other languages.
.
The implementation is made in C with a haskell FFI wrapper that hides the C implementation.
.
NOTE: This package has been forked off @cryptohash-0.11.7@ because the @cryptohash@ package has been
deprecated and so this package continues to satisfy the need for a lightweight package
providing the SHA1 hash algorithm without any dependencies on packages other than
@base@ and @bytestring@.
.
Consequently, this package can be used as a drop-in replacement for @cryptohash@'s
"Crypto.Hash.SHA1" module, though with a clearly smaller footprint.
x-revision: 3
synopsis: Fast, pure and practical SHA-1 implementation
description: {
A practical incremental and one-pass, pure API to
the [SHA-1 cryptographic hash algorithm](https://en.wikipedia.org/wiki/SHA-1) according
to [FIPS 180-4](http://dx.doi.org/10.6028/NIST.FIPS.180-4)
with performance close to the fastest implementations available in other languages.
.
The core SHA-1 algorithm is implemented in C and is thus expected
to be as fast as the standard [sha1sum(1) tool](https://linux.die.net/man/1/sha1sum).
(If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [SHA package](https://hackage.haskell.org/package/SHA).)
.
Additionally, this package provides support for
.
- HMAC-SHA-1: SHA-1-based [Hashed Message Authentication Codes](https://en.wikipedia.org/wiki/HMAC) (HMAC)
.
conforming to [RFC6234](https://tools.ietf.org/html/rfc6234), [RFC4231](https://tools.ietf.org/html/rfc4231), [RFC5869](https://tools.ietf.org/html/rfc5869), et al..
.
=== Packages in the @cryptohash-*@ family
.
- <https://hackage.haskell.org/package/cryptohash-md5 cryptohash-md5>
- <https://hackage.haskell.org/package/cryptohash-sha1 cryptohash-sha1>
- <https://hackage.haskell.org/package/cryptohash-sha256 cryptohash-sha256>
- <https://hackage.haskell.org/package/cryptohash-sha512 cryptohash-sha512>
.
=== Relationship to the @cryptohash@ package and its API
.
This package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@
package had been deprecated and so this package continues to satisfy the need for a
lightweight package providing the SHA-1 hash algorithm without any dependencies on packages
other than @base@ and @bytestring@. The API exposed by @cryptohash-sha1-0.11.*@'s
"Crypto.Hash.SHA1" module is guaranteed to remain a compatible superset of the API provided
by the @cryptohash-0.11.7@'s module of the same name.
.
Consequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s
"Crypto.Hash.SHA1" module, though with
a [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).
}
license: BSD3
license-file: LICENSE
@ -23,10 +49,8 @@ copyright: Vincent Hanquez, Herbert Valerio Riedel
maintainer: Herbert Valerio Riedel <hvr@gnu.org>
homepage: https://github.com/hvr/cryptohash-sha1
bug-reports: https://github.com/hvr/cryptohash-sha1/issues
synopsis: Fast, pure and practical SHA-1 implementation
category: Data, Cryptography
build-type: Simple
cabal-version: >=1.10
tested-with: GHC == 7.4.2
, GHC == 7.6.3
, GHC == 7.8.4
@ -42,7 +66,7 @@ source-repository head
library
default-language: Haskell2010
build-depends: base >= 4.5 && < 4.12
build-depends: base >= 4.5 && < 4.13
, bytestring >= 0.9.2 && < 0.11
hs-source-dirs: src

View File

@ -1,4 +1,4 @@
# generated by cabal-rpm-0.12.5
# generated by cabal-rpm-0.13
# https://fedoraproject.org/wiki/Packaging:Haskell
%global pkg_name cryptohash-sha1
@ -8,17 +8,19 @@
Name: ghc-%{pkg_name}
Version: 0.11.100.1
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Fast, pure and practical SHA-1 implementation
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-bytestring-devel
%if %{with tests}
BuildRequires: ghc-SHA-devel
@ -61,16 +63,22 @@ files.
%prep
# Begin cabal-rpm setup:
%setup -q -n %{pkgver}
cp -p %{SOURCE1} %{pkg_name}.cabal
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
%check
@ -86,7 +94,9 @@ cp -p %{SOURCE1} %{pkg_name}.cabal
%files -f %{name}.files
# Begin cabal-rpm files:
%license LICENSE
# End cabal-rpm files
%files devel -f %{name}-devel.files
@ -94,6 +104,9 @@ cp -p %{SOURCE1} %{pkg_name}.cabal
%changelog
* Sun Feb 17 2019 Jens Petersen <petersen@redhat.com> - 0.11.100.1-10
- refresh to cabal-rpm-0.13
* Sat Feb 16 2019 Jens Petersen <petersen@redhat.com> - 0.11.100.1-9
- use revised .cabal file