1 | %{bcond_with perl_Net_SSLeay_enables_optional_test}
|
---|
2 |
|
---|
3 | # Provides/Requires filtering is different from rpm 4.9 onwards
|
---|
4 | %global rpm49 %(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e' 2>/dev/null || echo 0)
|
---|
5 |
|
---|
6 | Name: perl-Net-SSLeay
|
---|
7 | Version: 1.84
|
---|
8 | Release: 1%{?dist}
|
---|
9 | Summary: Perl extension for using OpenSSL
|
---|
10 | License: Artistic 2.0
|
---|
11 | URL: http://search.cpan.org/dist/Net-SSLeay/
|
---|
12 | Vendor: bww bitwise works GmbH
|
---|
13 | Source0: http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-%{version}.tar.gz
|
---|
14 | # =========== Module Build ===========================
|
---|
15 | BuildRequires: coreutils
|
---|
16 | BuildRequires: findutils
|
---|
17 | BuildRequires: gcc
|
---|
18 | BuildRequires: make
|
---|
19 | BuildRequires: openssl
|
---|
20 | BuildRequires: openssl-devel
|
---|
21 | BuildRequires: perl-devel
|
---|
22 | BuildRequires: perl-generators
|
---|
23 | #BuildRequires: perl-interpreter
|
---|
24 | BuildRequires: perl(Cwd)
|
---|
25 | BuildRequires: perl(ExtUtils::MakeMaker)
|
---|
26 | BuildRequires: perl(File::Path)
|
---|
27 | BuildRequires: perl(lib)
|
---|
28 | # =========== Module Runtime =========================
|
---|
29 | BuildRequires: perl(AutoLoader)
|
---|
30 | BuildRequires: perl(Carp)
|
---|
31 | BuildRequires: perl(Exporter)
|
---|
32 | BuildRequires: perl(MIME::Base64)
|
---|
33 | BuildRequires: perl(Socket)
|
---|
34 | BuildRequires: perl(XSLoader)
|
---|
35 | # =========== Test Suite =============================
|
---|
36 | BuildRequires: perl(Config)
|
---|
37 | BuildRequires: perl(File::Spec)
|
---|
38 | BuildRequires: perl(HTTP::Tiny)
|
---|
39 | BuildRequires: perl(IO::Handle)
|
---|
40 | BuildRequires: perl(IO::Socket::INET)
|
---|
41 | BuildRequires: perl(strict)
|
---|
42 | BuildRequires: perl(Test::More) >= 0.61
|
---|
43 | BuildRequires: perl(threads)
|
---|
44 | BuildRequires: perl(warnings)
|
---|
45 | # =========== Optional Test Suite ====================
|
---|
46 | %if %{with perl_Net_SSLeay_enables_optional_test}
|
---|
47 | BuildRequires: perl(Test::Exception)
|
---|
48 | BuildRequires: perl(Test::NoWarnings)
|
---|
49 | BuildRequires: perl(Test::Pod) >= 1.0
|
---|
50 | BuildRequires: perl(Test::Warn)
|
---|
51 | %endif
|
---|
52 | # =========== Module Runtime =========================
|
---|
53 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
---|
54 | Requires: perl(MIME::Base64)
|
---|
55 | Requires: perl(XSLoader)
|
---|
56 |
|
---|
57 | # Don't "provide" private Perl libs or the redundant unversioned perl(Net::SSLeay) provide
|
---|
58 | %global __provides_exclude ^(perl\\(Net::SSLeay\\)$|SSLeay\\.so)
|
---|
59 |
|
---|
60 | %description
|
---|
61 | This module offers some high level convenience functions for accessing
|
---|
62 | web pages on SSL servers (for symmetry, same API is offered for
|
---|
63 | accessing http servers, too), a sslcat() function for writing your own
|
---|
64 | clients, and finally access to the SSL API of SSLeay/OpenSSL package
|
---|
65 | so you can write servers or clients for more complicated applications.
|
---|
66 |
|
---|
67 | %prep
|
---|
68 | %setup -q -n Net-SSLeay-%{version}
|
---|
69 |
|
---|
70 | # Fix permissions in examples to avoid bogus doc-file dependencies
|
---|
71 | chmod -c 644 examples/*
|
---|
72 |
|
---|
73 | # Remove redundant unversioned provide if we don't have rpm 4.9 or later
|
---|
74 | %if ! %{rpm49}
|
---|
75 | %global provfilt /bin/sh -c "%{__perl_provides} | grep -Fvx 'perl(Net::SSLeay)'"
|
---|
76 | %global __perl_provides %{provfilt}
|
---|
77 | %endif
|
---|
78 |
|
---|
79 | %build
|
---|
80 | PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
|
---|
81 | INSTALLDIRS=vendor \
|
---|
82 | OPTIMIZE="%{optflags}"
|
---|
83 | make %{?_smp_mflags}
|
---|
84 | make manifypods
|
---|
85 |
|
---|
86 | %install
|
---|
87 | make pure_install DESTDIR=%{buildroot}
|
---|
88 | find %{buildroot} -type f -name .packlist -delete
|
---|
89 | find %{buildroot} -type f -name '*.bs' -empty -delete
|
---|
90 | %{_fixperms} -c %{buildroot}
|
---|
91 |
|
---|
92 | # Remove script we don't want packaged
|
---|
93 | rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl
|
---|
94 |
|
---|
95 | %check
|
---|
96 | #make test
|
---|
97 |
|
---|
98 | # Check for https://bugzilla.redhat.com/show_bug.cgi?id=1222521
|
---|
99 | #perl -Iblib/{arch,lib} -MNet::SSLeay -e 'Net::SSLeay::CTX_v3_new()'
|
---|
100 |
|
---|
101 | %files
|
---|
102 | %if 0%{?_licensedir:1}
|
---|
103 | %license LICENSE
|
---|
104 | %else
|
---|
105 | %doc LICENSE
|
---|
106 | %endif
|
---|
107 | %doc Changes Credits QuickRef README examples/
|
---|
108 | %{perl_vendorarch}/auto/Net/
|
---|
109 | %dir %{perl_vendorarch}/Net/
|
---|
110 | %{perl_vendorarch}/Net/SSLeay/
|
---|
111 | %{perl_vendorarch}/Net/SSLeay.pm
|
---|
112 | %doc %{perl_vendorarch}/Net/SSLeay.pod
|
---|
113 | %{_mandir}/man3/Net.SSLeay.3*
|
---|
114 | %{_mandir}/man3/Net.SSLeay.Handle.3*
|
---|
115 |
|
---|
116 | %changelog
|
---|
117 | * Fri Feb 23 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.84-1
|
---|
118 | - initial version
|
---|