summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-23 17:35:33 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-23 17:35:33 (EDT)
commitcd1420beb4fd1ee8e0df13d268d0659185d02fa5 (patch)
tree471da11b668ded8c5224dd8c5b915eb5649dc18f
parent6901ac84c1de64015bdc193be0f2bc4027038841 (diff)
source.mk: Rewrite/update
-rw-r--r--control2
-rw-r--r--source.mk33
2 files changed, 19 insertions, 16 deletions
diff --git a/control b/control
index 88f6e0b..a009b61 100644
--- a/control
+++ b/control
@@ -1,3 +1,3 @@
Maintainer: "P. J. McDermott" <pj@pehjota.net>
-Build-Depends: opkhelper-3.0
+Build-Depends: opkhelper-3.0, gpg, dirmngr
Homepage: http://invisible-island.net/ncurses/
diff --git a/source.mk b/source.mk
index 79bff5e..8357921 100644
--- a/source.mk
+++ b/source.mk
@@ -1,20 +1,23 @@
-upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
- sed 's/~/-/')
-upstream_archive = ncurses-$(upstream_version).tgz
-upstream_url = ftp://invisible-island.net/ncurses/current/$(upstream_archive)
-source_archive = ../ncurses-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
-keys = F7E48EDB
+upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz
+upstream_url = http://invisible-mirror.net/archives/ncurses/$(upstream_archive)
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
+
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ 'C520 48C0 C074 8FEE 227D 47A2 7023 53E0 F7E4 8EDB'
$(source_archive):
- wget "$(upstream_url)"
- set -e; if gpg --version >/dev/null 2>&1; then \
- wget "$(upstream_url).asc"; \
- [ -e ../keyring.gpg ] || \
- gpg --keyring ../keyring.gpg --no-default-keyring \
- --recv-keys $(keys) || true; \
- gpg --verify --keyring ../keyring.gpg \
- "$(upstream_archive).asc"; \
+ 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
- mv "$(upstream_archive)" '$(source_archive)'
+ rm -Rf gnupghome/
+ mv '$(upstream_archive)' '$(source_archive)'
source: $(source_archive)