From 5829516633279dc87a3c5fb7ff8e59e1e286c9a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Tue, 25 Apr 2017 13:37:37 +0200
Subject: Introduce build conditions
---
perl-Net-HTTP.spec | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/perl-Net-HTTP.spec b/perl-Net-HTTP.spec
index dae0f5a..a4bffa0 100644
--- a/perl-Net-HTTP.spec
+++ b/perl-Net-HTTP.spec
@@ -1,5 +1,9 @@
+# Add support for IPv6
+%{bcond_without perl_Net_HTTP_enables_ipv6}
# Do not run network tests accessing Internet
%{bcond_with perl_Net_HTTP_enables_network_test}
+# Add support for TLS/SSL
+%{bcond_without perl_Net_HTTP_enables_ssl}
Name: perl-Net-HTTP
Version: 6.14
@@ -21,8 +25,14 @@ BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl(Compress::Raw::Zlib)
# Prefer IO::Socket::IP over IO::Socket::INET and IO::Socket::INET6
+%if %{with perl_Net_HTTP_enables_ipv6}
BuildRequires: perl(IO::Socket::IP)
+%else
+BuildRequires: perl(IO::Socket)
+%endif
+%if %{with perl_Net_HTTP_enables_ssl}
BuildRequires: perl(IO::Socket::SSL) >= 1.38
+%endif
BuildRequires: perl(IO::Uncompress::Gunzip)
BuildRequires: perl(Symbol)
BuildRequires: perl(URI)
@@ -39,10 +49,15 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl
-V:version`"; echo $version))
Requires: perl(Compress::Raw::Zlib)
Requires: perl(IO::Uncompress::Gunzip)
# Prefer IO::Socket::IP over IO::Socket::INET and IO::Socket::INET6
+%if %{with perl_Net_HTTP_enables_ipv6}
Requires: perl(IO::Socket::IP)
+%else
+Requires: perl(IO::Socket)
+%endif
Requires: perl(Symbol)
-# Recommended
+%if %{with perl_Net_HTTP_enables_ssl}
Requires: perl(IO::Socket::SSL) >= 1.38
+%endif
Conflicts: perl-libwww-perl < 6
%description
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Net-HTTP.git/commit/?h=f25&id=5829516633279dc87a3c5fb7ff8e59e1e286c9a8
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]