upstream_base_name = $(upstream_source)-$(OPK_SOURCE_VERSION_UPSTREAM) upstream_dir = http://ftp.gnome.org/pub/gnome/sources/$(upstream_source) upstream_base_ver = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/^\([0-9]*\.[0-9]*\)\..*$$/\1/') upstream_base_url = $(upstream_dir)/$(upstream_base_ver)/$(upstream_base_name) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz $(source_archive): wget -c "$(upstream_base_url).tar.xz" wget -O - "$(upstream_base_url).sha256sum" | grep -F .tar.xz >sha256sum sha256sum -c sha256sum rm sha256sum unxz -c '$(upstream_base_name).tar.xz' | tar -x tar -czf '$(source_archive)' $(upstream_source)-*/ mv $(upstream_source)-*/ src/ source: $(source_archive)