Blame perl-CryptX.spec

a31df49
# Enable JSON support
a31df49
%bcond_without perl_CryptX_enables_json
a31df49
# Run optional test
a31df49
%bcond_without perl_CryptX_enables_optional_test
a31df49
a31df49
Name:           perl-CryptX
a31df49
Version:        0.053
1611b9a
Release:        13%{?dist}
a31df49
Summary:        Cryptographic toolkit
a31df49
# Other file:   GPL+ or Artistic
a31df49
## Unbundled
a31df49
# src/ltc/hashes/blake2s.c: CC0 or OpenSSL or ASL 2.0
a31df49
# src/ltc/stream/rc4/rc4.c: Public Domain
a31df49
# src/ltm/bncore.c:         Public Domain
a31df49
License:        GPL+ or Artistic
7ee12ba
URL:            https://metacpan.org/release/CryptX
7ee12ba
Source0:        https://cpan.metacpan.org/authors/id/M/MI/MIK/CryptX-%{version}.tar.gz
a31df49
# Unbundle libtomcrypt,
bb9e0d2
# libtomcrypt-1.8.2 is missing features needed by CryptX.
bb9e0d2
# CryptX-0.057 is incompatible with libtomcrypt-1.8.2, it requires
bb9e0d2
# <https://github.com/libtom/libtomcrypt/commit/24c0eb84f989de52c53f7129704dd7322296f3be>
bb9e0d2
# to be merged from a "develop" branch into a "master" libtomcrypt branch and
bb9e0d2
# to be released.
a31df49
Patch0:         CryptX-0.053-Disable-ECC-and-unbundle-libtomcrypt.patch
b19c9e5
# Validate decode_b58b input properly, in upstream 0.058
b19c9e5
Patch1:         CryptX-0.053-bug-decode_b58b-invalid-input.patch
40907c4
# Adapt tests to changes in Math::BigInt 1.999813, in upstream 0.060
40907c4
Patch2:         CryptX-0.059-remove-buggy-Math-BigInt-related-tests.patch
e6d1806
# Adapt to changes in libtomcrypt 1.18.2, bug #1605403, in upstream after 0.060
e6d1806
Patch3:         CryptX-0.053-adopt-to-the-new-libtomcrypt.patch
db2bb57
# Adapt to changes in Math-BigInt 1.999815, in upstream after 0.062,
db2bb57
# <https://github.com/DCIT/perl-CryptX/issues/46>
db2bb57
Patch4:         CryptX-0.053-Math-BigInt-LTM-proper-fix-for-46.patch
db2bb57
# Adapt to changes in Math-BigInt 1.999815, in upstream after 0.062,
db2bb57
# <https://github.com/DCIT/perl-CryptX/issues/46>
db2bb57
Patch5:         CryptX-0.062-HACK-needed-for-MBI-1.999715-compatibility.patch
05b63a3
# Adapt to changes in Math-BigInt 1.999817, bug #1769850,
05b63a3
# in upstream after 0.064, <https://github.com/DCIT/perl-CryptX/issues/56>
05b63a3
Patch6:         CryptX-0.064-fix-56-Math-BigInt-1.999817-breaks-the-tests-of-Cryp.patch
a31df49
BuildRequires:  findutils
a31df49
BuildRequires:  gcc
489a636
BuildRequires:  libtomcrypt-devel
489a636
BuildRequires:  libtommath-devel
a31df49
BuildRequires:  make
a31df49
BuildRequires:  perl-devel
a31df49
BuildRequires:  perl-generators
a31df49
BuildRequires:  perl-interpreter
a31df49
BuildRequires:  perl(Config)
a31df49
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
a31df49
BuildRequires:  perl(strict)
a31df49
BuildRequires:  perl(warnings)
a31df49
# Run-time:
a31df49
BuildRequires:  perl(base)
a31df49
BuildRequires:  perl(Carp)
a31df49
BuildRequires:  perl(Exporter)
a31df49
BuildRequires:  perl(overload)
a31df49
BuildRequires:  perl(Scalar::Util)
a31df49
BuildRequires:  perl(XSLoader)
a31df49
# Optional run-time:
a31df49
%if %{with perl_CryptX_enables_json}
a31df49
# Cpanel::JSON::XS or JSON::XS or JSON::PP
a31df49
BuildRequires:  perl(Cpanel::JSON::XS)
a31df49
%endif
a31df49
# Tests:
a31df49
BuildRequires:  perl(Data::Dumper)
a31df49
BuildRequires:  perl(Test)
a31df49
BuildRequires:  perl(Test::More)
a31df49
%if %{with perl_CryptX_enables_optional_test}
a31df49
# Optional tests:
a31df49
BuildRequires:  perl(File::Find)
a31df49
BuildRequires:  perl(Math::BigFloat) >= 1.999715
a31df49
BuildRequires:  perl(Math::BigInt)
b4597ab
BuildRequires:  perl(Math::Complex)
a31df49
BuildRequires:  perl(Storable) >= 2.0
a31df49
BuildRequires:  perl(Test::Pod)
a31df49
%endif
a31df49
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
a31df49
%if %{with perl_CryptX_enables_json}
a31df49
# Cpanel::JSON::XS or JSON::XS or JSON::PP
a31df49
Recommends:     perl(Cpanel::JSON::XS)
a31df49
%endif
a31df49
a31df49
%description
a31df49
This Perl library provides a cryptography based on LibTomCrypt library.
a31df49
a31df49
ECC support is disabled because it's not yet fully supported by LibTomCrypt.
a31df49
a31df49
%prep
a31df49
%setup -q -n CryptX-%{version}
a31df49
# Unbundle libtomcrypt and libtommath
a31df49
%patch0 -p1
a31df49
rm -rf ./src
b19c9e5
%patch1 -p1
40907c4
%patch2 -p1
e6d1806
%patch3 -p1
db2bb57
%patch4 -p1
db2bb57
%patch5 -p1
05b63a3
%patch6 -p1
a31df49
a31df49
%build
a1d4c40
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
a1d4c40
%{make_build}
a31df49
a31df49
%install
a1d4c40
%{make_install}
d0d5c6a
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
a31df49
%{_fixperms} $RPM_BUILD_ROOT/*
a31df49
a31df49
%check
a31df49
make test
a31df49
a31df49
%files
a31df49
%license LICENSE
a31df49
%doc Changes README.md
a31df49
%{perl_vendorarch}/auto/*
a31df49
%{perl_vendorarch}/Crypt
a31df49
%{perl_vendorarch}/CryptX.pm
a31df49
%{perl_vendorarch}/Math
a31df49
%{_mandir}/man3/*
a31df49
a31df49
%changelog
1611b9a
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.053-13
1611b9a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1611b9a
05b63a3
* Thu Nov 07 2019 Petr Pisar <ppisar@redhat.com> - 0.053-12
05b63a3
- Adapt to changes in Math-BigInt 1.999817 (bug #1769850)
05b63a3
deecb81
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.053-11
deecb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
deecb81
b4597ab
* Mon Jul 01 2019 Petr Pisar <ppisar@redhat.com> - 0.053-10
b4597ab
- Require Math::Complex for running tests
b4597ab
23e080e
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.053-9
23e080e
- Perl 5.30 rebuild
23e080e
6727a17
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.053-8
6727a17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
6727a17
e6d1806
* Thu Nov 29 2018 Petr Pisar <ppisar@redhat.com> - 0.053-7
e6d1806
- Adapt to changes in libtomcrypt-1.18.2 (bug #1605403)
db2bb57
- Adapt to changes in Math-BigInt-1.999815
e6d1806
edde958
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.053-6
edde958
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
edde958
d8b3f4d
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.053-5
d8b3f4d
- Perl 5.28 rebuild
d8b3f4d
40907c4
* Thu May 03 2018 Petr Pisar <ppisar@redhat.com> - 0.053-4
40907c4
- Adapt tests to changes in Math::BigInt 1.999813
40907c4
6f92703
* Thu Mar  1 2018 Florian Weimer <fweimer@redhat.com> - 0.053-3
6f92703
- Rebuild with new redhat-rpm-config/perl build flags
6f92703
b19c9e5
* Wed Feb 28 2018 Petr Pisar <ppisar@redhat.com> - 0.053-2
b19c9e5
- Validate decode_b58b input properly
b19c9e5
a31df49
* Thu Feb 15 2018 Petr Pisar <ppisar@redhat.com> 0.053-1
a31df49
- Specfile autogenerated by cpanspec 1.78.