upstream_commit = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/^.*~git........\.\([0-9a-f]*\).*$$/\1/') upstream_git_uri = git://git.sv.gnu.org/libreboot.git source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2 $(source_archive): git clone '$(upstream_git_uri)' libreboot/ (cd libreboot/ && git checkout "$(upstream_commit)") mv libreboot/resources/utilities/ich9deblob/ ich9deblob/ tar -cjf '$@' ich9deblob/ rm -Rf src/ mv ich9deblob/ src/ rm -Rf libreboot/ source: $(source_archive)