COMPONENT_TARGETS = $(HARDWARE_NOARCH)
include ../../../../build-system/constants.mk
url = $(DOWNLOAD_SERVER)/sources/packages/n/curl
cacert_url = https://curl.haxx.se/ca
versions = 7.75.0
pkgname = curl
suffix = tar.xz
cacert = cacert.pem.xz
tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
sha1s = $(addsuffix .sha1sum, $(tarballs))
BUILD_TARGETS = $(tarballs) $(sha1s) $(cacert)
include ../../../../build-system/core.mk
.PHONY: download_clean
$(tarballs):
@echo -e "\n======= Downloading source tarballs =======" ; \
for tarball in $(tarballs) ; do \
echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
done ; wait
$(sha1s): $(tarballs)
@for sha in $@ ; do \
echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
touch $$sha ; \
echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
sha1sum --check $$sha ; ret="$$?" ; \
if [ "$$ret" == "1" ]; then \
echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
exit 1 ; \
fi ; \
done
$(cacert):
@echo -e "\n======= Downloading $(cacert) tarball =======\n" ; \
echo "$(cacert_url)/cacert.pem" | xargs wget $(WGET_OPTIONS) ; \
xz -9 cacert.pem ; \
rm -f cacert.pem
download_clean:
@rm -f $(tarballs) $(sha1s) $(cacert)