diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-24 23:24:26 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-24 23:24:26 (EDT) |
commit | d5a3b97a656f67fdddf013a76d28d64e46ec284c (patch) | |
tree | dfc20d7ca3d92e59d70085f04095b9dcbcb36ed5 | |
parent | bd66de044fb01a83cfc633c6a518db0ca7a5a69e (diff) |
source.mk: Rewrite
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | source.mk | 32 |
2 files changed, 19 insertions, 15 deletions
@@ -1,5 +1,5 @@ Maintainer: "P. J. McDermott" <pj@pehjota.net> -Build-Depends: opkhelper-3.0, +Build-Depends: opkbuild (>= 4.0.0), opkhelper-3.0, gpg, dirmngr, libgmp-dev, libmpfr-dev, libreadline-dev, libtinfo-dev, libsigsegv-dev, @@ -1,19 +1,23 @@ -upstream_archive = gawk-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz -upstream_url = http://ftp.gnu.org/pub/gnu/gawk/$(upstream_archive) -source_archive = ../gawk-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz -keys = 937EC0D2 +upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.xz +upstream_url = http://ftp.gnu.org/pub/gnu/$(OPK_SOURCE)/$(upstream_archive) +source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz + +gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg +keys = \ + 'D196 7C63 7887 1317 7D86 1ED7 DF59 7815 937E C0D2' $(source_archive): - wget -c '$(upstream_url)' - set -e; if gpg --version >/dev/null 2>&1; then \ - wget -c '$(upstream_url).sig'; \ - [ -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).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) |