diff options
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | source.mk | 34 |
2 files changed, 21 insertions, 15 deletions
@@ -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/ @@ -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) |