]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Math | |
7 | %define pnam PRSG | |
8 | Summary: Math::PRSG - Perl interface to pseudo random sequence generator function | |
9 | Summary(pl.UTF-8): Math::PRSG - interfejs Perla do funkcji generatora ciągów pseudolosowych | |
10 | Name: perl-Math-PRSG | |
11 | Version: 1.0 | |
12 | Release: 21 | |
13 | # if used in a product, Systemics should be given attribution as the author | |
14 | License: free use, distributable | |
15 | Group: Development/Languages/Perl | |
16 | Source0: http://www.cpan.org/modules/by-module/Math/%{pdir}-%{pnam}-%{version}.tar.gz | |
17 | # Source0-md5: 4f0c32973d5b03d2a665b6ac6ec04b9c | |
18 | Patch0: %{name}-paths.patch | |
19 | URL: http://search.cpan.org/dist/Math-PRSG/ | |
20 | BuildRequires: perl-devel >= 1:5.8.0 | |
21 | BuildRequires: rpm-perlprov >= 4.1-13 | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Math::PRSG is a Perl interface to pseudo random sequence generator | |
26 | function. It implements a (159, 31, 0) LFSR, giving a period of 160 | |
27 | bits. This can then be used as a RNG if seeded well (ie. with 160 bits | |
28 | of entropy) and if the output is fed through a message digest function | |
29 | (in order to prevent any prediction). | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Math::PRSG to perlowy interfejs do funkcji generatora ciągów | |
33 | pseudolosowych. Implementuje funkcję LFSR (159, 31, 0) mającą okres | |
34 | 160-bitowy. Może być używany jako generator liczb losowych jeśli | |
35 | zostanie dobrze zasilony (160 bitami entropii), a wyjście jest | |
36 | przekazywane przez funkcję skrótu (w celu uniknięcia | |
37 | przewidywalności). | |
38 | ||
39 | %prep | |
40 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
41 | %patch0 -p1 | |
42 | ||
43 | %build | |
44 | %{__perl} Makefile.PL \ | |
45 | INSTALLDIRS=vendor | |
46 | %{__make} \ | |
47 | CC="%{__cc}" \ | |
48 | OPTIMIZE="%{rpmcflags}" | |
49 | ||
50 | %{?with_tests:%{__make} test} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %{__make} install \ | |
56 | DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %doc examples/prsg_driver.pl | |
64 | %{perl_vendorarch}/Math/PRSG.pm | |
65 | %dir %{perl_vendorarch}/auto/Math/PRSG | |
66 | %attr(755,root,root) %{perl_vendorarch}/auto/Math/PRSG/PRSG.so | |
67 | %{_mandir}/man3/* |