summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--control2
-rw-r--r--source.mk31
2 files changed, 19 insertions, 14 deletions
diff --git a/control b/control
index 725c199..084303c 100644
--- a/control
+++ b/control
@@ -1,4 +1,4 @@
Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com>
-Build-Depends: opkbuild (>= 4.0.0), opkhelper-3.0,
+Build-Depends: opkbuild (>= 4.0.0), opkhelper-3.0, gpg, dirmngr,
config-linux-libre-${Host-Plat}, bc, xz
Homepage: https://www.fsfla.org/ikiwiki/selibre/linux-libre/
diff --git a/source.mk b/source.mk
index 819b8ef..514c2eb 100644
--- a/source.mk
+++ b/source.mk
@@ -1,21 +1,26 @@
upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
- sed 's/~/-/')
-upstream_archive = linux-libre-$(upstream_version).tar.bz2
+ sed 's/+/-/')
+upstream_archive = linux-libre-$(upstream_version).tar.xz
upstream_releases = http://linux-libre.fsfla.org/pub/linux-libre/releases
upstream_url = $(upstream_releases)/$(upstream_version)/$(upstream_archive)
-source_archive = ../linux-libre-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2
-keys = 7E7D47A7
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz
+
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ '4744 02C8 C582 DAFB E389 C427 BCB7 CF87 7E7D 47A7'
$(source_archive):
- wget "$(upstream_url)"
- set -e; if gpg --version >/dev/null 2>&1; then \
- wget "$(upstream_url).sign"; \
- [ -e ../keyring.gpg ] || \
- gpg --keyring ../keyring.gpg --no-default-keyring \
- --recv-keys $(keys) || true; \
- gpg --verify --keyring ../keyring.gpg \
- "$(upstream_archive).sign"; \
+ wget -c "$(upstream_url)" "$(upstream_url).sign"
+ 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).sign"; then \
+ rm -Rf gnupghome/; \
+ exit 1; \
fi
- mv "$(upstream_archive)" "$(source_archive)"
+ rm -Rf gnupghome/
+ mv "$(upstream_archive)" '$@'
source: $(source_archive)