summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-06 23:19:18 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-06 23:19:18 (EDT)
commit7321bc1849acdaa5d836cd0b9b3f6e3117c2ee2d (patch)
tree964fed6ae6895d8bc06bbda51f4733e3a5384952
parentaee6db17af9141efed7ec59750c46fdfbabcee87 (diff)
source.mk: Update and use xz
And B-D on gpg and dirmngr.
-rw-r--r--control2
-rw-r--r--source.mk34
2 files changed, 21 insertions, 15 deletions
diff --git a/control b/control
index 91b02da..60871b4 100644
--- a/control
+++ b/control
@@ -1,3 +1,3 @@
Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com>
-Build-Depends: opkhelper-3.0, libz.1-dev
+Build-Depends: gpg, dirmngr, opkbuild (>= 4.0.0), opkhelper-3.0, libz.1-dev
Homepage: https://mj.ucw.cz/sw/pciutils/
diff --git a/source.mk b/source.mk
index ab88767..c2d06d0 100644
--- a/source.mk
+++ b/source.mk
@@ -1,19 +1,25 @@
-upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz
-upstream_url = ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/$(upstream_archive)
-source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
-keys = '5558 F939 9CD7 8368 5055 3C6E C28E 7847 ED70 F82D'
+upstream_archive_base = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar
+upstream_mirror = http://mirrors.edge.kernel.org/pub/software/utils/pciutils
+upstream_url = $(upstream_mirror)/$(upstream_archive_base)
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz
+
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ '5558 F939 9CD7 8368 5055 3C6E C28E 7847 ED70 F82D'
$(source_archive):
- wget -c '$(upstream_url)'
- set -e; if gpg --version >/dev/null 2>&1; then \
- wget -c '$(upstream_url).sign'; \
- [ -e ../keyring.gpg ] || \
- gpg --keyring ../keyring.gpg --no-default-keyring \
- --recv-keys $(keys) || true; \
- rm -f ../keyring.gpg~; \
- gpg --verify --keyring ../keyring.gpg \
- '$(upstream_archive).sign'; \
+ wget -c '$(upstream_url).xz' '$(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 ! unxz -c '$(upstream_archive_base).xz' | \
+ $(gpg) --verify '$(upstream_archive_base).sign' -; then\
+ rm -Rf gnupghome/; \
+ exit 1; \
fi
- mv '$(upstream_archive)' '$@'
+ rm -Rf gnupghome/
+ mv '$(upstream_archive_base).xz' '$@'
source: $(source_archive)