upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/+/-/') upstream_archive = linux-libre-$(upstream_version).tar.xz upstream_releases = http://linux-libre.fsfla.org/pub/linux-libre/releases upstream_url = $(upstream_releases)/$(upstream_version)/$(upstream_archive) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg keys = \ '4744 02C8 C582 DAFB E389 C427 BCB7 CF87 7E7D 47A7' $(source_archive): wget -c "$(upstream_url)" "$(upstream_url).sign" install -m 0700 -d gnupghome/ [ -e ../keyring.gpg ] || \ $(gpg) --keyserver hkp://pool.sks-keyservers.net \ --recv-keys $(keys); \ rm -f ../keyring.gpg~; \ if ! $(gpg) --verify "$(upstream_archive).sign"; then \ rm -Rf gnupghome/; \ exit 1; \ fi rm -Rf gnupghome/ mv "$(upstream_archive)" '$@' source: $(source_archive)