upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/~/-/') upstream_archive = opkbuild-$(upstream_version).tar.xz upstream_dir_url = http://files.proteanos.com/pub/opkbuild/$(upstream_version) upstream_url = $(upstream_dir_url)/$(upstream_archive) upstream_sum = $(upstream_dir_url)/SHA256SUMS source_archive = ../opkbuild-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz $(source_archive): wget "$(upstream_url)" wget -O - "$(upstream_sum)" | grep -F "$(upstream_archive)" >SHA256SUMS sha256sum -c SHA256SUMS rm -f SHA256SUMS mv "$(upstream_archive)" "$(source_archive)" source: $(source_archive)