name=wget
version=1.25.0
release=2
replaces="busybox"
desc="Network downloader"
url="https://www.gnu.org/software/wget/"
license="GPL-3.0-or-later"
depend="glibc libressl zlib pcre2 libpsl"
makedepend=""
source="https://ftp.gnu.org/gnu/wget/wget-1.25.0.tar.gz"
sha256="SKIP"

build() {
	cd "wget-1.25.0"
	_opts="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib"
	_help=$(./configure --help 2>/dev/null)
	case "$_help" in *--disable-static*)  _opts="$_opts --disable-static" ;; esac
	case "$_help" in *--disable-nls*)     _opts="$_opts --disable-nls" ;; esac
	./configure $_opts
	make -j"$JOBS"
}

package() {
	cd "wget-1.25.0"
	make DESTDIR="$pkgdir" install
}
