034e045
# To skip the lengthy test suite, use:
034e045
# rpmbuild --without checks
034e045
ab93e4c
Summary:	Perl module implementing the Diffie-Hellman key exchange system
ab93e4c
Name:		perl-Crypt-DH
ab93e4c
Version:	0.06
b248af6
Release:	9%{?dist}
c4f0092
License:	GPL+ or Artistic
ab93e4c
Group:		Development/Libraries
ab93e4c
Url:		http://search.cpan.org/dist/Crypt-DH/
ab93e4c
Source0:	http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Crypt-DH-%{version}.tar.gz
ab93e4c
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ab93e4c
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
ab93e4c
BuildArch:	noarch
c4f0092
BuildRequires:	perl(ExtUtils::MakeMaker), perl(Test::More)
ab93e4c
b248af6
# Pull in Math::BigInt::GMP for GMP support for suitably recent versions of Math::BigInt
b248af6
# else use Math::GMP
b248af6
%if %(%{__perl} -MMath::BigInt -e 'use Math::BigInt 1.87;' 2>/dev/null && echo 1 || echo 0)
b248af6
BuildRequires:	perl(Math::BigInt::GMP)
b248af6
Requires:	perl(Math::BigInt::GMP)
b248af6
%else
b248af6
BuildRequires:	perl(Math::GMP)
b248af6
Requires:	perl(Math::GMP)
b248af6
%endif
b248af6
ab93e4c
%description
ab93e4c
Crypt::DH is a Perl implementation of the Diffie-Hellman key exchange system.
ab93e4c
Diffie-Hellman is an algorithm by which two parties can agree on a shared
ab93e4c
secret key, known only to them. The secret is negotiated over an insecure
ab93e4c
network without the two parties ever passing the actual shared secret, or their
ab93e4c
private keys, between them.
ab93e4c
ab93e4c
%prep
ab93e4c
%setup -q -n Crypt-DH-%{version}
ab93e4c
ab93e4c
%build
ab93e4c
%{__perl} Makefile.PL INSTALLDIRS=vendor
ab93e4c
%{__make} %{?_smp_mflags}
ab93e4c
ab93e4c
%check
3cde639
%{!?_without_checks:%{__make} test}
ab93e4c
ab93e4c
%install
ab93e4c
%{__rm} -rf %{buildroot}
ab93e4c
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
ab93e4c
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
45c82a1
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';'
ab93e4c
%{__chmod} -R u+w %{buildroot}/*
ab93e4c
ab93e4c
%clean
ab93e4c
%{__rm} -rf %{buildroot}
ab93e4c
ab93e4c
%files
45c82a1
%defattr(-,root,root,-)
ab93e4c
%doc Changes ToDo
ab93e4c
%{perl_vendorlib}/Crypt/
ab93e4c
%{_mandir}/man3/Crypt::DH.3pm*
ab93e4c
ab93e4c
%changelog
b248af6
* Tue Nov  4 2008 Paul Howarth <paul@city-fan.org> 0.06-9
b248af6
- BuildRequire and Require a GMP support module, either Math::GMP or
b248af6
  Math::BigInt::GMP depending on how recent Math::BigInt is
b248af6
d3b263e
* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.06-8
b248af6
- Rebuild for new perl
d3b263e
c4f0092
* Sat Aug 11 2007 Paul Howarth <paul@city-fan.org> 0.06-7
c4f0092
- Clarify license as GPL v1 or later, or Artistic (same as perl)
c4f0092
- Add buildreq perl(Test::More)
c4f0092
07d8403
* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 0.06-6
07d8403
- Buildrequire perl(ExtUtils::MakeMaker)
45c82a1
- Fix argument order for find with -depth
45c82a1
28be230
* Tue Aug 29 2006 Paul Howarth <paul@city-fan.org> 0.06-5
28be230
- FE6 mass rebuild
28be230
3cde639
* Thu Feb 16 2006 Paul Howarth <paul@city-fan.org> 0.06-4
3cde639
- Simplify conditional build by not using %%bcond_* macros
3cde639
852c2e8
* Mon Dec 12 2005 Paul Howarth <paul@city-fan.org> 0.06-3
852c2e8
- Add support for FC-3, which doesn't have %%bcond_with{,out} predefined
852c2e8
034e045
* Fri Dec  9 2005 Paul Howarth <paul@city-fan.org> 0.06-2
034e045
- Add facility to skip test suite at build time if desired
034e045
ab93e4c
* Tue Nov 29 2005 Paul Howarth <paul@city-fan.org> 0.06-1
ab93e4c
- Initial build