summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-19 19:10:34 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-19 19:10:34 (EDT)
commit402e1a921f248b951f3743661b63415155310a86 (patch)
tree0c0ccaa59613b5fdfc403297a27b95abd01d1b08
parent20c424ca722434a49e109a57e3acf5f56b5e80b2 (diff)
source.mk: Update/rewrite
-rw-r--r--control2
-rw-r--r--source.mk31
2 files changed, 19 insertions, 14 deletions
diff --git a/control b/control
index ec25595..e06587a 100644
--- a/control
+++ b/control
@@ -1,3 +1,3 @@
Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com>
-Build-Depends: opkhelper-3.0
+Build-Depends: opkbuild (>= 4.0.0), gpg, dirmngr, opkhelper-3.0
Homepage: https://www.gnu.org/software/libunistring/
diff --git a/source.mk b/source.mk
index c1d64c7..e6604a1 100644
--- a/source.mk
+++ b/source.mk
@@ -1,18 +1,23 @@
-upstream_archive = libunistring-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz
-upstream_url = http://ftp.gnu.org/pub/gnu/libunistring/$(upstream_archive)
-source_archive = ../libunistring-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
-keys = F059B1D1
+upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.xz
+upstream_url = http://ftp.gnu.org/pub/gnu/$(OPK_SOURCE)/$(upstream_archive)
+source_archive = ../libunistring-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz
+
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ '4622 25C3 B46F 3487 9FC8 496C D605 848E D7E6 9871'
$(source_archive):
- wget '$(upstream_url)'
- set -e; if gpg --version >/dev/null 2>&1; then \
- wget '$(upstream_url).sig'; \
- [ -e ../keyring.gpg ] || \
- gpg --keyring ../keyring.gpg --no-default-keyring \
- --recv-keys $(keys) || true; \
- 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
- mv '$(upstream_archive)' '$(source_archive)'
+ rm -Rf gnupghome/
+ mv '$(upstream_archive)' '$@'
source: $(source_archive)