diff --git a/Net-SSLeay-1.90-pkgconfig.patch b/Net-SSLeay-1.90-pkgconfig.patch new file mode 100644 index 0000000000000000000000000000000000000000..5cefe3561689a7673a4f2c6b52c45aa495768c4d --- /dev/null +++ b/Net-SSLeay-1.90-pkgconfig.patch @@ -0,0 +1,16 @@ +--- Makefile.PL ++++ Makefile.PL +@@ -209,7 +209,12 @@ EOM + @{ $opts->{lib_links} } = map { $_ =~ s/32\b//g } @{ $opts->{lib_links} } if $Config{use64bitall}; + } + else { +- push @{ $opts->{lib_links} }, qw( ssl crypto z ); ++ if ( eval { require ExtUtils::PkgConfig; ExtUtils::PkgConfig->VERSION('1.16') } && ExtUtils::PkgConfig->exists('openssl') ) { ++ push @{ $opts->{lib_links} }, map { s/^-l//; $_ } split(' ', ExtUtils::PkgConfig->libs_only_l('openssl')); ++ } ++ else { ++ push @{ $opts->{lib_links} }, qw( ssl crypto z ); ++ } + + if (($Config{cc} =~ /aCC/i) && $^O eq 'hpux') { + print "*** Enabling HPUX aCC options (+e)\n"; diff --git a/Net-SSLeay-1.92.tar.gz b/Net-SSLeay-1.92.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b95d2662a7d07a62a68137aaa43ae72c557dc76a Binary files /dev/null and b/Net-SSLeay-1.92.tar.gz differ diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec new file mode 100644 index 0000000000000000000000000000000000000000..ed56a3ac9a7bad022ee1c844d94253975e396efa --- /dev/null +++ b/perl-Net-SSLeay.spec @@ -0,0 +1,119 @@ +%define anolis_release 1 + +Name: perl-Net-SSLeay +Version: 1.92 +Release: %{anolis_release}%{?dist} +Summary: Perl extension for using OpenSSL +License: Artistic 2.0 +URL: https://metacpan.org/release/Net-SSLeay +Source0: https://cpan.metacpan.org/modules/by-module/Net/Net-SSLeay-%{version}.tar.gz +Patch10: Net-SSLeay-1.90-pkgconfig.patch +# =========== Module Build =========================== +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: openssl +BuildRequires: openssl-devel +BuildRequires: perl-srpm-macros +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(constant) +BuildRequires: perl(English) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(ExtUtils::PkgConfig) +BuildRequires: perl(ExtUtils::MM) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(Symbol) +BuildRequires: perl(Text::Wrap) +BuildRequires: perl(utf8) +# =========== Module Runtime ========================= +BuildRequires: perl(AutoLoader) +BuildRequires: perl(Carp) +BuildRequires: perl(Errno) +BuildRequires: perl(Exporter) +BuildRequires: perl(MIME::Base64) +BuildRequires: perl(Socket) +BuildRequires: perl(vars) +BuildRequires: perl(XSLoader) +# =========== Test Suite ============================= +BuildRequires: perl(base) +BuildRequires: perl(Config) +BuildRequires: perl(Cwd) +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(HTTP::Tiny) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IO::Socket::INET) +BuildRequires: perl(lib) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(SelectSaver) +BuildRequires: perl(Storable) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) >= 0.61 +BuildRequires: perl(threads) +BuildRequires: perl(warnings) +# =========== Module Runtime ========================= +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(MIME::Base64) +Requires: perl(XSLoader) + +# Don't "provide" private Perl libs or the redundant unversioned perl(Net::SSLeay) provide +%global __provides_exclude ^(perl\\(Net::SSLeay\\)$|SSLeay\\.so) + +%description +This module offers some high level convenience functions for accessing +web pages on SSL servers (for symmetry, same API is offered for +accessing http servers, too), a sslcat() function for writing your own +clients, and finally access to the SSL API of SSLeay/OpenSSL package +so you can write servers or clients for more complicated applications. + +%prep +%setup -q -n Net-SSLeay-%{version} + +# Get libraries to link against from pkg-config +# https://github.com/radiator-software/p5-net-ssleay/pull/127 +%patch10 + +# Fix permissions in examples to avoid bogus doc-file dependencies +chmod -c 644 examples/* + +%build +unset OPENSSL_PREFIX +PERL_MM_USE_DEFAULT=1 perl Makefile.PL \ + INSTALLDIRS=vendor \ + NO_PACKLIST=1 \ + NO_PERLLOCAL=1 \ + OPTIMIZE="%{optflags}" < /dev/null +%{make_build} + +%install +%{make_install} +find %{buildroot} -type f -name '*.bs' -empty -delete +%{_fixperms} -c %{buildroot} + +# Remove script we don't want packaged +rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl + +%check +unset RELEASE_TESTING +make test + +%files +%license LICENSE +%doc Changes CONTRIBUTING.md Credits QuickRef README examples/ +%{perl_vendorarch}/auto/Net/ +%dir %{perl_vendorarch}/Net/ +%{perl_vendorarch}/Net/SSLeay/ +%{perl_vendorarch}/Net/SSLeay.pm +%doc %{perl_vendorarch}/Net/SSLeay.pod +%{_mandir}/man3/Net::SSLeay.3* +%{_mandir}/man3/Net::SSLeay::Handle.3* + +%changelog +* Thu Mar 10 2022 Hongwei Qin - 1.92-1 +- Update to 1.92 +- Init for Anolis OS 23