upstream_base_name = $(upstream_source)-$(OPK_SOURCE_VERSION_UPSTREAM) upstream_dir = http://www.freedesktop.org/software/$(upstream_source) upstream_base_ver = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/^\([0-9]*\.[0-9]*\)\..*$$/\1/') upstream_base_url = $(upstream_dir)/release/$(upstream_base_name) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz $(source_archive): wget -c "$(upstream_base_url).tar.bz2" wget -O - "$(upstream_base_url).tar.bz2.sha256" | grep -F .tar.bz2 >sha256sum sha256sum -c sha256sum rm sha256sum tar -xjf '$(upstream_base_name).tar.bz2' rm '$(upstream_base_name).tar.bz2' tar -czf '$(source_archive)' $(upstream_source)-* mv $(upstream_source)-*/ src/ source: $(source_archive)