summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick 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)
commit70868aa7b68eadaa8adbac41d7ed81259310e8df (patch)
tree920ee13231744a7553dcc661ec91846afa45a418
parentb94a6feb510d092069f23f9b9097a5a2f67576b9 (diff)
source.mk: Rewrite
-rw-r--r--control2
-rw-r--r--source.mk32
2 files changed, 18 insertions, 16 deletions
diff --git a/control b/control
index 7826848..483abfa 100644
--- a/control
+++ b/control
@@ -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
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)