Name:          wget
Version:       1.20.3
Release:       2
Summary:       A package for retrieving files using HTTP, HTTPS, FTP and FTPS the most widely-used Internet protocols.
License:       GPLv3+
Url:           http://www.gnu.org/software/wget/
Source:        ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.gz

Patch6000:     create_image-Sanitize-input-param-dl_total_time.patch
Patch6001:     allow-const-names-for-set-progress-implementation.patch
Patch6002:     fix-ub-print-row-stats-if-eta-negative.patch
Patch6003:     dot-update-dot-finish-sanitize-input.patch
Patch6004:     fix-segfault-in-progress-bar-in-certain-locales.patch
Patch6005:     fix-buffer-overflows-in-progress-bar-code.patch
Patch6006:     calc_rate-fix-division-by-zero.patch
Patch6007:     print-row-stats-fix-two-integer-overflows.patch
Patch6008:     dot-draw-avoid-integer-overflows.patch
Patch6009:     fix-and-cleanup-progress-bar-code.patch

Patch9000:     avoid-triggering-signed-integer-overflow.patch

Provides:      webclient bundled(gnulib)
BuildRequires: perl-HTTP-Daemon python3 libuuid-devel perl-podlators libpsl-devel libmetalink-devel
BuildRequires: gnutls-devel pkgconfig texinfo gettext autoconf libidn2-devel gpgme-devel zlib-devel

%description
GNU Wget is a free software package for retrieving files using HTTP, HTTPS,
FTP and FTPS the most widely-used Internet protocols. It is a non-interactive
commandline tool, so it may easily be called from scripts, cron jobs, terminals
without X-Windows support, etc.

%package help
Summary: help package for %{name}

%description help
This is the help package for %{name}. It includes some doc
files and man, info files.

%prep
%autosetup -p1

%build
%configure --with-ssl=gnutls --with-libpsl --enable-largefile --enable-opie --enable-digest --enable-ntlm --enable-nls --enable-ipv6 --disable-rpath --with-metalink

%make_build

%install
%make_install CFLAGS="$RPM_OPT_FLAGS"

%find_lang %{name}

rm -f %{buildroot}%{_infodir}/dir

%check
make check

%files -f %{name}.lang
%doc AUTHORS COPYING
%config(noreplace) %{_sysconfdir}/wgetrc
%{_bindir}/wget

%files help
%doc MAILING-LIST NEWS README doc/sample.wgetrc
%{_mandir}/man1/wget.*
%{_infodir}/*

%changelog
* Thu Apr 23 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.20.3-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Sanitize input param dl_total_time

* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.20.3-1
- Type:NA
- ID:NA
- SUG:NA
- DESC:Package upgrade

* Sat Sep 14 2019 huzhiyu<huzhiyu1@huawei.com> - 1.19.5-6
- Package init
