From 70868aa7b68eadaa8adbac41d7ed81259310e8df Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 23 Jun 2019 16:57:28 -0400 Subject: source.mk: Rewrite --- diff --git a/control b/control index 7826848..483abfa 100644 --- a/control +++ b/control @@ -1,3 +1,3 @@ Maintainer: Patrick McDermott -Build-Depends: opkhelper-3.0 +Build-Depends: opkhelper-3.0, gpg, dirmngr Homepage: http://tiswww.cwru.edu/php/chet/readline/rltop.html diff --git a/source.mk b/source.mk index 2381762..f7457bf 100644 --- a/source.mk +++ b/source.mk @@ -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) -- cgit v0.9.1