upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ tr '~' '-') upstream_archive = $(OPK_SOURCE)-$(upstream_version).tar.gz upstream_url_base = https://download.savannah.gnu.org/releases/$(OPK_SOURCE) upstream_url = $(upstream_url_base)/$(upstream_archive) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz $(source_archive): wget -c -O '$(source_archive)' "$(upstream_url)" source: $(source_archive)