diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-30 16:29:29 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-30 16:29:29 (EDT) |
commit | e202555ba20bdee56b4c14ae92f88f7ddec7c535 (patch) | |
tree | 6777435d77c2b6920e435f212a37d43a8677e87e | |
parent | a8b1af20b3399eef7c1ea701b4e8e96ca70a4120 (diff) |
source.mk: Rewrite gpg code
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | source.mk | 22 |
2 files changed, 12 insertions, 12 deletions
@@ -1,3 +1,3 @@ Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com> -Build-Depends: libz.1-dev, opkhelper-3.0, gettext, dejagnu +Build-Depends: gpg, dirmngr, libz.1-dev, opkhelper-3.0, gettext, dejagnu Homepage: https://www.gnu.org/software/binutils/ @@ -1,19 +1,19 @@ upstream_archive = binutils-$(OPK_SOURCE_VERSION_UPSTREAM).tar.bz2 upstream_url = http://ftp.gnu.org/pub/gnu/binutils/$(upstream_archive) source_archive = ../binutils-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2 + +gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg keys = 4AE55E93 $(source_archive): - wget -c '$(upstream_url)' - set -e; if gpg --version >/dev/null 2>&1; then \ - wget -c '$(upstream_url).sig'; \ - [ -e ../keyring.gpg ] || \ - gpg --keyring ../keyring.gpg --no-default-keyring \ - --recv-keys $(keys) || true; \ - rm -f ../keyring.gpg~; \ - gpg --verify --keyring ../keyring.gpg \ - '$(upstream_archive).sig'; \ - fi - mv '$(upstream_archive)' '$(source_archive)' + wget -c '$(upstream_url)' '$(upstream_url).sig' + install -m 0700 -d gnupghome/ + [ -e ../keyring.gpg ] || \ + $(gpg) --keyserver hkp://pool.sks-keyservers.net \ + --recv-keys $(keys); \ + rm -f ../keyring.gpg~; \ + $(gpg) --verify '$(upstream_archive).sig' && \ + mv '$(upstream_archive)' '$(source_archive)' + rm -Rf gnupghome/ source: $(source_archive) |