wget2, new recipe (#7484)

This commit is contained in:
Schrijvers Luc
2022-12-06 15:17:13 +01:00
committed by GitHub
parent 4c6a67c5c8
commit 5ba95e7626

View File

@@ -0,0 +1,145 @@
SUMMARY="A tool for downloading files from the internet"
DESCRIPTION="wget is a tool that can download files from the internet through \
protocols such as HTTP, HTTPS and FTP. wget is non-interactive, so it can be \
called from scripts."
HOMEPAGE="https://gitlab.com/gnuwget/wget2"
COPYRIGHT="2012-2015 Tim Ruehsen
2015-2022 Free Software Foundation, Inc."
LICENSE="GNU GPL v3
GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://ftpmirror.gnu.org/wget/wget2-$portVersion.tar.gz"
CHECKSUM_SHA256="0bb7fa03697bb5b8d05e1b5e15b863440826eb845874c4ffb5e32330f9845db1"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="1.0.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
GLOBAL_WRITABLE_FILES="
settings/wgetrc keep-old
"
USER_SETTINGS_FILES="
settings/wgetrc
"
PROVIDES="
wget2$secondaryArchSuffix = $portVersion
cmd:wget2$commandSuffix = $portVersion
lib:libwget$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbrotlidec$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libgpgme$secondaryArchSuffix
lib:libgnutls$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libidn2$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libmicrohttpd$secondaryArchSuffix
lib:libnghttp2$secondaryArchSuffix
lib:libpcre2_8$secondaryArchSuffix
lib:libpsl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libzstd$secondaryArchSuffix
"
PROVIDES_devel="
wget2${secondaryArchSuffix}_devel = $portVersion
devel:libwget$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
wget2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbrotlidec$secondaryArchSuffix
devel:libbz2$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libgpgme$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libidn2$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:liblzma$secondaryArchSuffix
devel:libmicrohttpd$secondaryArchSuffix
devel:libnghttp2$secondaryArchSuffix
devel:libpcre2_8$secondaryArchSuffix
devel:libpsl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libzip$secondaryArchSuffix
devel:libzstd$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:doxygen
cmd:find
cmd:gcc$secondaryArchSuffix
# cmd:gettext
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:makeinfo
cmd:pkg_config$secondaryArchSuffix
# cmd:pod2man
"
defineDebugInfoPackage wget2$secondaryArchSuffix \
"$commandBinDir"/wget2 \
"$libDir"/libwget.so.$libVersion
BUILD()
{
AUTOPOINT=true autoreconf -fi
runConfigure --omit-dirs binDir ./configure \
--bindir="$commandBinDir" \
--with-ssl=openssl \
--with-bzip2 \
--with-lzma
make
}
INSTALL()
{
make install
# Tells wget where to find certificates
echo "ca_certificate=/boot/system/data/ssl/CARootCertificates.pem" > $settingsDir/wgetrc
rm -f "$infoDir"/dir
rm -f "$libDir"/charset.alias
# remove libtool file
rm "$libDir"/libwget.la
# rename wget2_noinstall to wget2
rm "$commandBinDir"/wget2
mv "$commandBinDir"/wget2_noinstall "$commandBinDir"/wget2
# install manpages
mkdir -p "$manDir"
cp -r docs/man/* "$manDir"
prepareInstalledDevelLib libwget
fixPkgconfig
packageEntries devel \
"$developDir" \
"$manDir"/man3
}
TEST()
{
make check
}