File wget.spec of Package wget.31872

#
# spec file for package wget
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           wget
Version:        1.14
Release:        0
Summary:        A Tool for Mirroring FTP and HTTP Servers
License:        GPL-3.0-or-later
Group:          Productivity/Networking/Web/Utilities
URL:            http://www.gnu.org/software/wget/
Source:         http://ftp.gnu.org/gnu/wget/%name-%version.tar.xz
Patch0:         wgetrc.patch
# PATCH-FEATURE-UPSTREAM wget-libproxy.patch dimstar@opensuse.org -- Add libproxy support to wget
Patch1:         wget-libproxy.patch
Patch5:         wget-1.14-openssl-no-intern.patch
Patch6:         wget-1.14-no-ssl-comp.patch
# PATCH-FIX-OPENSUSE fix pod syntax for perl 5.18 coolo@suse.de
Patch7:         wget-fix-pod-syntax.diff
Patch8:         wget-CVE-2014-4877.patch
Patch9:         wget-CVE-2016-4971.patch
Patch10:        wget-CVE-2015-2059.patch
Patch11:        wget-basicauth.patch
Patch12:        wget-CVE-2016-7098.patch
Patch13:        wget-dont-free-dcgettext.patch
Patch14:        wget-enforce-tls12.patch
Patch15:        wget-CVE-2017-6508.patch
Patch16:        wget-stack-overflow-on-negative-chunksize-CVE-2017-13089.patch
Patch17:        wget-stack-overflow-on-negative-chunksize-CVE-2017-13090.patch
Patch18:        wget-cookie-injection-CVE-2018-0494.patch
Patch19:        wget-buffer-overflow-CVE-2019-5953.patch
# PATCH-FIX-UPSTREAM
Patch20:        wget-http-specify-Host-when-CONNECT-is-used.patch
# PATCH-FIX-UPSTREAM fix the failure to detect SSL handshake timeout [bsc#1217717]
Patch21:        wget-add-support-for-timeout-with-ssl.patch
Patch22:        wget-gnutls-honor-connect-timeout.patch
BuildRequires:  libpng-devel
%if 0%{suse_version} > 1110
BuildRequires:  libproxy-devel
%endif
BuildRequires:  automake
BuildRequires:  libidn-devel
BuildRequires:  makeinfo
BuildRequires:  openssl-devel
BuildRequires:  pkg-config
BuildRequires:  xz
PreReq:         %install_info_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Wget enables you to retrieve WWW documents or FTP files from a server.
This can be done in script files or via the command line.

%prep
%setup -q
%patch0
%if 0%{suse_version} > 1110
%patch1
%endif
%patch5
%patch6
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1

%build
%if 0%{suse_version} > 1110
# only wget-libproxy.patch needs this
autoreconf --force
%endif
%configure --with-ssl=openssl
make %{?_smp_mflags}

%install
%makeinstall
%find_lang %{name}

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README MAILING-LIST
%doc doc/sample.wgetrc util/rmold.pl
%{_mandir}/*/wget*
%{_infodir}/wget*
%config(noreplace) %{_sysconfdir}/wgetrc
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by