1 # Build recipe for wget.
3 # Copyright (C) 2017 Matias A. Fonzo, selk@dragora.org.
5 # This recipe is free software: you have unlimited permission
6 # to copy, distribute and modify it.
12 tarname=${program}-${version}.tar.gz
15 fetch=ftp://ftp.gnu.org/gnu/wget/$tarname
18 The non-interactive network downloader.
20 GNU Wget is a free software package for retrieving files using HTTP,
21 HTTPS, FTP and FTPS the most widely-used Internet protocols. It is a
22 non-interactive commandline tool, so it may easily be called from
23 scripts, cron jobs, terminals without X-Windows support, etc.
26 homepage=http://www.gnu.org/software/wget
29 # Source documentation
30 docs="AUTHORS COPYING ChangeLog NEWS README"
31 docsdir="${docdir}/${program}-${version}"
37 unpack "${tardir}/$tarname"
41 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
43 --libdir=/usr/lib${libSuffix} \
47 --enable-threads=posix \
49 --build="$(cc -dumpmachine)"
52 make -j${jobs} DESTDIR="$destdir" install
54 # To handle config file on post-installation
55 touch "${destdir}/etc/.graft-config"
57 # Remove generated charset.alias
58 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
59 rmdir "${destdir}/usr/lib${libSuffix}" || true
61 # Compress info documents deleting index file for the package
62 if test -d "${destdir}/$infodir"
64 rm -f "${destdir}/${infodir}/dir"
65 lzip -9 "${destdir}/${infodir}"/*
68 # Compress and link man pages (if needed)
69 if test -d "${destdir}/$mandir"
72 cd "${destdir}/$mandir"
73 find . -type f -exec lzip -9 '{}' +
74 find . -type l | while read -r file
76 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
83 mkdir -p "${destdir}${docsdir}"
84 cp -p $docs "${destdir}${docsdir}"