diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-28 19:26:23 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-28 19:36:56 (EDT) |
commit | e1c3db7911ed6d2db0d5d187d01d05fbfbe636a7 (patch) | |
tree | 4087ba6335bd0c1f40669f4ababbbf5ac658df25 | |
parent | 1bd32b41f7748ce57c7fcfb64e76c8352e5c9bdb (diff) |
source.mk: Update, rewrite gpg code, switch to xz
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | source.mk | 31 |
2 files changed, 19 insertions, 14 deletions
@@ -1,4 +1,4 @@ Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com> -Build-Depends: opkbuild (>= 4.0.0), opkhelper-3.0, +Build-Depends: opkbuild (>= 4.0.0), opkhelper-3.0, gpg, dirmngr, config-linux-libre-${Host-Plat}, bc, xz Homepage: https://www.fsfla.org/ikiwiki/selibre/linux-libre/ @@ -1,21 +1,26 @@ upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ - sed 's/~/-/') -upstream_archive = linux-libre-$(upstream_version).tar.bz2 + 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 = ../linux-libre-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2 -keys = 7E7D47A7 +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 "$(upstream_url)" - set -e; if gpg --version >/dev/null 2>&1; then \ - wget "$(upstream_url).sign"; \ - [ -e ../keyring.gpg ] || \ - gpg --keyring ../keyring.gpg --no-default-keyring \ - --recv-keys $(keys) || true; \ - gpg --verify --keyring ../keyring.gpg \ - "$(upstream_archive).sign"; \ + 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 - mv "$(upstream_archive)" "$(source_archive)" + rm -Rf gnupghome/ + mv "$(upstream_archive)" '$@' source: $(source_archive) |