Browse Source

* perl-Crypt-DSA: update to 1.17
* perl-Math-BigInt-GMP: new package


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5888 ec354946-7b23-47d6-9f5a-488ba84defc7

shaolin 12 years ago
parent
commit
59784586ea

+ 37 - 16
p/perl-Crypt-DSA/perl-Crypt-DSA-vl.spec

@@ -1,6 +1,6 @@
 %define	module	Crypt-DSA
 %define name	perl-%{module}
-%define	version	0.14
+%define	version	1.17
 %define	release	1%{_dist_release}
 
 Name:		%{name}
@@ -11,15 +11,31 @@ Group:		Development/Languages
 License:	GPL or Artistic
 Url:		http://search.cpan.org/dist/%{module}/
 Source:         http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/%{module}-%{version}.tar.gz
-Requires:       perl-Digest-SHA1, perl(Math::BigInt)
-Requires:       perl-Convert-PEM
-Requires:       perl-Data-Buffer
-
 BuildArch:	noarch
-BuildRoot:	%{_tmppath}/%{name}-%{version}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 BuildRequires:  perl-Digest-SHA1, perl(Math::BigInt)
-BuildRequires:  perl-Convert-PEM
-BuildRequires:  perl-Data-Buffer
+BuildRequires:  perl(Carp)
+BuildRequires:  perl(Convert::PEM)
+BuildRequires:  perl(Crypt::DES_EDE3)
+BuildRequires:  perl(Data::Buffer) >= 0.01
+BuildRequires:  perl(Digest::SHA1)
+BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(File::Spec)
+BuildRequires:  perl(File::Which) >= 0.05
+BuildRequires:  perl(IPC::Open3)
+BuildRequires:  perl(Math::BigInt) >= 1.78
+BuildRequires:  perl(Math::BigInt::GMP)
+BuildRequires:  perl(Perl::MinimumVersion) >= 1.20
+BuildRequires:  perl(Test::CPAN::Meta) >= 0.12
+BuildRequires:  perl(Test::More) >= 0.42
+BuildRequires:  perl(Test::MinimumVersion) >= 0.008
+BuildRequires:  perl(Test::Pod) >= 1.26
+BuildRequires:  openssl
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+# Crypt::DSA::Keychain calls openssl for DSA parameter generation
+Requires:       openssl
+# Some operations are really slow without GMP (or Pari, but we test with GMP)
+Requires:       perl(Math::BigInt::GMP)
 
 Vendor:         Project Vine
 Distribution:   Vine Linux
@@ -37,20 +53,22 @@ and key generation.
 %setup -q -n %{module}-%{version}
 
 %build
-CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"
+CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS="vendor"
 %{__make} 
 
 %check
-echo " "
-echo "Several Minutes is needed for test. Please wait."
-echo " "
+echo -e "\n\nWill take several minutes for the tests. Please wait.\n\n"
+## WARNING: you'll need many hardware input / network traffic
+## to keep the 'entropy pool' filled with random bits - 
+## otherwise the test will take enormous amount of time (shaolin)
 %{__make} test
+%{__make} test AUTOMATED_TESTING=1 TEST_FILES="xt/*.t"
 
 %install
-rm -rf %{buildroot}
-%makeinstall
-# rm -f %{buildroot}%{perl_archlib}/perllocal.pod
-# rm -rf %{buildroot}%{perl_vendorarch}
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
+%{_fixperms} %{buildroot}
 
 %clean
 rm -rf %{buildroot}
@@ -62,6 +80,9 @@ rm -rf %{buildroot}
 %{perl_vendorlib}/Crypt/*
 
 %changelog
+* Mon Mar 12 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.17-1
+- updated to 1.17
+
 * Fri May 02 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.14-1vl5
 - rebuild with perl 5.10
 - new versioning policy

+ 58 - 0
p/perl-Math-BigInt-GMP/perl-Math-BigInt-GMP-vl.spec

@@ -0,0 +1,58 @@
+Name:           perl-Math-BigInt-GMP
+Version:        1.24
+Release:        1%{?_dist_release}
+Summary:        Math::BigInt::GMP Perl module
+License:        GPL+ or Artistic
+Group:          Development/Libraries
+URL:            http://search.cpan.org/dist/Math-BigInt-GMP/
+Source0:        http://search.cpan.org/CPAN/authors/id/P/PJ/PJACKLAM/Math-BigInt-GMP-%{version}.tar.gz
+BuildRequires:  gmp-devel
+BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(Math::BigInt) >= 1.87
+BuildRequires:  perl(Test::More)
+BuildRequires:  perl(Test::Pod)
+BuildRequires:  perl(Test::Pod::Coverage) >= 1.08
+BuildRequires:  perl(YAML)
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+%{?perl_default_filter}
+
+Vendor:         Project Vine
+Distribution:   Vine Linux
+Packager:       shaolin
+
+%description
+This package contains a replacement (drop-in) module for Math::BigInt's
+core, Math::BigInt::Calc.pm. It needs the new versions of Math::BigInt and
+Math::BigFloat as they are from Perl 5.7.x onwards.
+
+%prep
+%setup -q -n Math-BigInt-GMP-%{version}
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+make %{?_smp_mflags}
+
+%install
+make pure_install PERL_INSTALL_ROOT=%{buildroot}
+
+find %{buildroot} -type f -name .packlist -exec rm -f {} \;
+find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} %{buildroot}/*
+
+%check
+make test
+
+%files
+%doc BUGS CHANGES CREDITS LICENSE README TODO
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/Math*
+%{_mandir}/man3/*
+
+%changelog
+* Mon Mar 12 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.24-1
+- initial build for Vine Linux
+- the newest upstream so far is 1.37 that needs perl(Math::BigInt) >= 1.993,
+  better consider upgrading to 1.37 after we upgrade perl to 5.14.x