%global debug_package %{nil} %global name_compat wget1 %global name_orig wget Summary: A utility for retrieving files using the HTTP or FTP protocols Name: %{name_compat} Version: 1.25.0 Release: 2%{?dist} License: GPL-3.0-or-later AND LGPL-2.1-or-later Url: https://www.gnu.org/software/wget/ Source: https://ftp.gnu.org/gnu/wget/%{name_orig}-%{version}.tar.gz # Patch1: https://git.savannah.gnu.org/cgit/wget.git/patch/?id=ed0c7c7e0e8f7298352646b2fd6e06a11e242ace#/CVE-2024-38428.patch Provides: webclient Provides: bundled(gnulib) # needed for test suite BuildRequires: make BuildRequires: perl(lib) BuildRequires: perl(English) BuildRequires: perl(HTTP::Daemon) BuildRequires: python3 BuildRequires: gnutls-devel BuildRequires: pkgconfig BuildRequires: texinfo BuildRequires: gettext BuildRequires: autoconf BuildRequires: libidn2-devel BuildRequires: libuuid-devel BuildRequires: perl-podlators BuildRequires: libpsl-devel BuildRequires: gpgme-devel BuildRequires: gcc BuildRequires: zlib-devel BuildRequires: devscripts bash-completion %description GNU Wget is a file retrieval utility which can use either the HTTP or FTP protocols. Wget features include the ability to work in the background while you are logged out, recursive retrieval of directories, file name wildcard matching, remote file timestamp storage and comparison, use of Rest with FTP servers and Range with HTTP servers to retrieve files over slow or unstable connections, support for Proxy servers, and configurability. %prep %autosetup -p1 -n %{name_orig}-%{version} # modify the package string sed -i "s|\(PACKAGE_STRING='wget .*\)'|\1 (Red Hat modified)'|" configure grep "PACKAGE_STRING='wget .* (Red Hat modified)'" configure || exit 1 # change docs relating /etc/wgetrc sed -i 's|/usr/local/etc|/etc|' NEWS sed -i 's|/usr/local/lib/wgetrc|/etc/wgetrc|' NEWS sed -i 's|/usr/local/etc/wgetrc|/etc/wgetrc|' README doc/sample.wgetrc doc/sample.wgetrc.munged_for_texi_inclusion doc/wget.texi sed -i 's|/usr/local|/etc|' doc/wget.texi # copy and fix bash completion cp -p %{_datadir}/bash-completion/completions/%{name_orig} . mv -f %{name_orig} %{name_compat} sed -i 's|wget|wget1|g' %{name_compat} %build %configure \ --with-ssl=gnutls \ --with-libpsl \ --without-metalink \ --enable-largefile \ --enable-opie \ --enable-digest \ --enable-ntlm \ --enable-nls \ --enable-ipv6 \ --disable-rpath \ --disable-debug \ --disable-year2038 %{make_build} %install %{make_install} # compatibility with wget2 package mv %{buildroot}%{_bindir}/%{name_orig} %{buildroot}%{_bindir}/%{name_compat} mv %{buildroot}%{_mandir}/man1/%{name_orig}.1 %{buildroot}%{_mandir}/man1/%{name_compat}.1 # bash completion mkdir -p %{buildroot}%{_datadir}/bash-completion/completions cp -p %{name_compat} %{buildroot}%{_datadir}/bash-completion/completions/%{name_compat} rm -f %{buildroot}%{_infodir}/dir %find_lang %{name_orig} %find_lang %{name_orig}-gnulib %check hardening-check -v %{buildroot}%{_bindir}/%{name_compat} make check %files -f %{name_orig}.lang -f %{name_orig}-gnulib.lang %doc AUTHORS MAILING-LIST NEWS README COPYING doc/sample.wgetrc %config(noreplace) %{_sysconfdir}/wgetrc %{_mandir}/man1/%{name_compat}.* %{_bindir}/%{name_compat} %{_infodir}/%{name_orig}.* %{_datadir}/bash-completion/completions/%{name_compat} %changelog * Sun Nov 17 2024 samoht0 1.25.0 - remove libmetalink (abandoned) - update 1.25.0 * Wed Sep 25 2024 samoht0 1.24.5 - add bash completion * Sat Jun 08 2024 samoht0 1.24.5 - based on F39 package