Blob Blame History Raw
# To skip the lengthy test suite, use:
# rpmbuild --without checks

Summary:	Perl module implementing the Diffie-Hellman key exchange system
Name:		perl-Crypt-DH
Version:	0.06
Release:	11%{?dist}
License:	GPL+ or Artistic
Group:		Development/Libraries
Url:		http://search.cpan.org/dist/Crypt-DH/
Source0:	http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Crypt-DH-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch:	noarch
BuildRequires:	perl(ExtUtils::MakeMaker), perl(Test::More)

# Pull in Math::BigInt::GMP for GMP support for suitably recent versions of Math::BigInt
# else use Math::GMP
%if %(%{__perl} -MMath::BigInt -e 'use Math::BigInt 1.87;' 2>/dev/null && echo 1 || echo 0)
BuildRequires:	perl(Math::BigInt::GMP)
Requires:	perl(Math::BigInt::GMP)
%else
BuildRequires:	perl(Math::GMP)
Requires:	perl(Math::GMP)
%endif

%description
Crypt::DH is a Perl implementation of the Diffie-Hellman key exchange system.
Diffie-Hellman is an algorithm by which two parties can agree on a shared
secret key, known only to them. The secret is negotiated over an insecure
network without the two parties ever passing the actual shared secret, or their
private keys, between them.

%prep
%setup -q -n Crypt-DH-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{!?_without_checks:%{__make} test}

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null
%{__chmod} -R u+w %{buildroot}

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes ToDo
%{perl_vendorlib}/Crypt/
%{_mandir}/man3/Crypt::DH.3pm*

%changelog
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.06-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.06-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Nov  4 2008 Paul Howarth <paul@city-fan.org> 0.06-9
- BuildRequire and Require a GMP support module, either Math::GMP or
  Math::BigInt::GMP depending on how recent Math::BigInt is

* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.06-8
- Rebuild for new perl

* Sat Aug 11 2007 Paul Howarth <paul@city-fan.org> 0.06-7
- Clarify license as GPL v1 or later, or Artistic (same as perl)
- Add buildreq perl(Test::More)

* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 0.06-6
- Buildrequire perl(ExtUtils::MakeMaker)
- Fix argument order for find with -depth

* Tue Aug 29 2006 Paul Howarth <paul@city-fan.org> 0.06-5
- FE6 mass rebuild

* Thu Feb 16 2006 Paul Howarth <paul@city-fan.org> 0.06-4
- Simplify conditional build by not using %%bcond_* macros

* Mon Dec 12 2005 Paul Howarth <paul@city-fan.org> 0.06-3
- Add support for FC-3, which doesn't have %%bcond_with{,out} predefined

* Fri Dec  9 2005 Paul Howarth <paul@city-fan.org> 0.06-2
- Add facility to skip test suite at build time if desired

* Tue Nov 29 2005 Paul Howarth <paul@city-fan.org> 0.06-1
- Initial build