upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz source_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION)' | \ sed 's/^\([0-9]*\.[0-9]\)\..*$$/\1/') upstream_url = http://www.cmake.org/files/v$(source_version)/$(upstream_archive) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz $(source_archive): wget -c $(upstream_url) printf '$(source_sha256sum) $(upstream_archive)' | sha256sum -c - mv '$(upstream_archive)' '$@' source: $(source_archive)