diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-01 10:49:43 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-01 10:49:43 (EDT) |
commit | 4ce2fb976da1ee13ecbc63301ac03e081b21255d (patch) | |
tree | 8869c2d00ef0e13c8b0480a372b709f04268110e | |
parent | 5f52257727d6fe308dd0b6ddd0b518d204bf0a12 (diff) |
source.mk: Use gpg
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | control | 7 | ||||
-rw-r--r-- | source.mk | 21 |
3 files changed, 25 insertions, 4 deletions
@@ -6,6 +6,7 @@ Session.vim # Source archives *-*.orig.tar.* +keyring.gpg # Work area tmp/ @@ -1,3 +1,8 @@ Maintainer: "P. J. McDermott" <pj@pehjota.net> -Build-Depends: opkhelper-3.0, libz.1-dev, libtommath-dev, libtomcrypt-dev +Build-Depends: + gpg, dirmngr, + opkhelper-3.0, + libz.1-dev, + libtommath-dev, + libtomcrypt-dev, Homepage: https://matt.ucc.asn.au/dropbear/dropbear.html @@ -1,8 +1,23 @@ -upstream_archive = dropbear-$(OPK_SOURCE_VERSION_UPSTREAM).tar.bz2 -upstream_url = https://matt.ucc.asn.au/dropbear/releases/$(upstream_archive) +upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.bz2 +upstream_url = http://matt.ucc.asn.au/dropbear/releases/$(upstream_archive) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2 +gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg +keys = \ + 'F734 7EF2 EE2E 07A2 6762 8CA9 4493 1494 F29C 6773' + $(source_archive): - wget -O '$@' '$(upstream_url)' + wget -c '$(upstream_url)' '$(upstream_url).asc' + 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).asc'; then \ + rm -Rf gnupghome/; \ + exit 1; \ + fi + rm -Rf gnupghome/ + mv '$(upstream_archive)' '$(source_archive)' source: $(source_archive) |