# Use --define 'nossl 0' on the command line to disable SSL detection %{!?nossl:%define SSL 1} %{?nossl:%define SSL 0} # Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} Summary: A utility for retrieving files using the HTTP or FTP protocols Name: wget Version: 1.21.1 Release: 1 License: GPLv3+ Group: Applications/Internet Url: http://www.gnu.org/software/%{name}/ Source0: http://ftp.gnu.org/gnu/wget/wget-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig Patch0: wget-1.21.1-iconv_intl_hardcode.patch Provides: webclient Requires: /sbin/install-info BuildRequires: gettext >= 0.19.8.1 BuildRequires: libiconv >= 1.16 BuildRequires: pcre-devel >= 8.44 BuildRequires: zlib-devel >= 1.2.11 Requires: gettext >= 0.19.8.1 Requires: libiconv >= 1.16 Requires: zlib >= 1.2.11 %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. Install wget if you need to retrieve large numbers of files with HTTP or FTP, or if you need a utility for mirroring web sites or FTP directories. Note: This version is compiled with SSL support. %if %{SSL} == 0 Note: this version is compiled without SSL support. %else Note: this version is compiled with SSL support. %endif %prep %setup -q %patch0 -p1 # Duplicate source for 32 & 64 bits rm -rf /tmp/%{name}-%{version}-32bit mkdir /tmp/%{name}-%{version}-32bit mv * /tmp/%{name}-%{version}-32bit mkdir 32bit mv /tmp/%{name}-%{version}-32bit/* 32bit rm -rf /tmp/%{name}-%{version}-32bit mkdir 64bit cp -rp 32bit/* 64bit/ %build # work around strange libtool error on AIX6.1, see details at: # https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14145662 export RM="rm -f" export AR="/usr/bin/ar -X32_64" # first build the 64-bit version cd 64bit export CC="gcc -maix64 -O2" export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-largefile \ --enable-opie \ --enable-digest \ --enable-nls \ --disable-ipv6 \ --with-ssl=openssl \ --without-libssl-prefix \ --with-libiconv-prefix=%{_prefix} \ --with-libintl-prefix=%{_prefix} \ --with-included-libunistring \ --disable-pcre \ %if %{SSL} == 0 --without-ssl %endif gmake if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi #Now build the 32-bit version cd ../32bit export CC="gcc -maix32 -D_LARGE_FILES -O2" export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-largefile \ --enable-opie \ --enable-digest \ --enable-nls \ --disable-ipv6 \ --with-ssl=openssl \ --without-libssl-prefix \ --with-included-libunistring \ --with-libiconv-prefix=%{_prefix} \ --with-libintl-prefix=%{_prefix} \ --disable-pcre \ %if %{SSL} == 0 --without-ssl %endif gmake if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export AR="/usr/bin/ar -X64" export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * do mv ${f} ${f}_64 done ) cd ../32bit export AR="/usr/bin/ar -X32" export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in wget do mv ${f} ${f}_32 done ) # Make 64bit executable as default ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in wget do ln -sf ${f}_64 ${f} done ) rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*.info %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : echo "From wget-1.21.1 onwards, symbolic link of wget in /usr/bin is removed." echo "The binary is shipped in /opt/freeware/bin. Please use absolute path or " echo "add /opt/freeware/bin in PATH environment variable to use the binary." %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/MAILING-LIST 32bit/NEWS 32bit/README 32bit/COPYING 32bit/doc/sample.wgetrc %config(noreplace) %{_sysconfdir}/wgetrc %{_bindir}/* %{_mandir}/man1/* %{_infodir}/* #%{_datadir}/locale/*/*/* %changelog * Thu Mar 04 2021 Reshma V Kumar - 1.21.1-1 - Update to 1.21.1 - Stop shipping files in /usr directory * Thu Feb 21 2019 Ravi Hirekurabar - 1.20.3 - Updated to version 1.20.3 - This version fixes following CVE's - CVE-2019-5953 CVE-2018-20483 * Tue Oct 03 2017 Sushma M Bhat 1.19.1-1 - Updated to version 1.19.1 and built 64bit version as well * Wed Apr 06 2016 Ravi Hirekurabar 1.17.1-1 - Update to version 1.17.1 * Tue Nov 05 2014 Sangamesh Mallayya 1.9.1-3 - Add CVE-2014-4877 fix. * Mon Jan 21 2008 Reza Arbab 1.9.1-2 - Rebuild using system-provided OpenSSL. * Fri May 13 2005 David Clissold 1.9.1-1 - Update to version 1.9.1 * Wed Jun 09 2004 David Clissold 1.9-2 - Add ability to build with SSL mode. * Tue Nov 25 2003 David Clissold 1.9-1 - Version 1.9; add patch so it builds with vac compiler * Mon Jan 28 2002 David Clissold - Version 1.8.1 * Tue Nov 27 2001 David Clissold - Version 1.7.1 * Thu Jul 05 2001 Marc Stephenson - Version 1.7 * Tue Apr 03 2001 David Clissold - Build with -D_LARGE_FILES enabled (for >2BG files) * Thu Feb 3 2000 Bill Nottingham - handle compressed man pages * Thu Aug 26 1999 Jeff Johnson - don't permit chmod 777 on symlinks (#4725). * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 4) * Fri Dec 18 1998 Bill Nottingham - build for 6.0 tree - add Provides * Sat Oct 10 1998 Cristian Gafton - strip binaries - version 1.5.3 * Sat Jun 27 1998 Jeff Johnson - updated to 1.5.2 * Thu Apr 30 1998 Cristian Gafton - modified group to Applications/Networking * Wed Apr 22 1998 Cristian Gafton - upgraded to 1.5.0 - they removed the man page from the distribution (Duh!) and I added it back from 1.4.5. Hey, removing the man page is DUMB! * Fri Nov 14 1997 Cristian Gafton - first build against glibc