diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-23 16:57:28 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-23 16:57:28 (EDT) |
commit | 70868aa7b68eadaa8adbac41d7ed81259310e8df (patch) | |
tree | 920ee13231744a7553dcc661ec91846afa45a418 | |
parent | b94a6feb510d092069f23f9b9097a5a2f67576b9 (diff) |
source.mk: Rewrite
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | source.mk | 32 |
2 files changed, 18 insertions, 16 deletions
@@ -1,3 +1,3 @@ Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com> -Build-Depends: opkhelper-3.0 +Build-Depends: opkhelper-3.0, gpg, dirmngr Homepage: http://tiswww.cwru.edu/php/chet/readline/rltop.html @@ -1,21 +1,23 @@ -upstream_archive = readline-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz -upstream_url = http://ftp.gnu.org/pub/gnu/readline/$(upstream_archive) -source_archive = ../readline-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz +upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz +upstream_url = http://ftp.gnu.org/pub/gnu/$(OPK_SOURCE)/$(upstream_archive) +source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz + +gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg +keys = \ + '7C01 35FB 088A AF6C 66C6 50B9 BB58 69F0 64EA 74AB' $(source_archive): - wget -c '$(upstream_url)' - set -e; if gpg --version >/dev/null 2>&1; then \ - wget -c '$(upstream_url).sig'; \ - if [ ! -e ../keyring.gpg ]; then \ - wget -c -O chet.asc \ - http://cnswww.cns.cwru.edu/~chet/gpgkey.asc; \ - gpg --keyring ../keyring.gpg --no-default-keyring \ - --import chet.asc; \ - rm -f ../keyring.gpg~; \ - fi; \ - gpg --verify --keyring ../keyring.gpg \ - '$(upstream_archive).sig'; \ + 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~; \ + if ! $(gpg) --verify '$(upstream_archive).sig'; then \ + rm -Rf gnupghome/; \ + exit 1; \ fi + rm -Rf gnupghome/ mv '$(upstream_archive)' '$(source_archive)' source: $(source_archive) |