blob: da0904c8687ffe24af9668a192c6f9af8731cf61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
z = gz
keys = \
'3AB0 57B7 E78D 945C 8C55 91FB D36F 769B C118 04F0'
upstream_sf_base = https://downloads.sourceforge.net/project/$(OPK_SOURCE)
upstream_path = $(OPK_SOURCE)/v$(OPK_SOURCE_VERSION_UPSTREAM)
upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.$(z)
upstream_url = $(upstream_sf_base)/$(upstream_path)/$(upstream_archive)
source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.$(z)
GNUPGHOME = gnupghome
# TODO: When GnuPG is built with TLS support, delete the second "keyserver" line
# to switch to a non-SKS keyserver. We can't switch yet, because the Web server
# at keys.openpgp.org redirects (HTTP 301) to HTTPS (and enforces it with HSTS).
keyserver = hkps://keys.openpgp.org
keyserver = hkp://pool.sks-keyservers.net
keyring = ../keyring.gpg
cleanup = gpgconf --kill all; rm -Rf '$(GNUPGHOME)'; sleep 5
$(keyring):
gpg --recv-keys $(keys) || { rm -Rf '$@'; exit 1; }
rm -f '$@~'
$(source_archive): $(keyring)
wget -c '$(upstream_url)' '$(upstream_url).asc'
gpg --verify '$(upstream_archive).asc'
mv '$(upstream_archive)' '$(source_archive)'
source:
install -m 0700 -d '$(GNUPGHOME)'
umask 0177; printf 'keyserver $(keyserver)\n' \
1>'$(GNUPGHOME)/dirmngr.conf'
umask 0177; printf 'no-default-keyring\nkeyring $(keyring)\nverbose\n' \
1>'$(GNUPGHOME)/gpg.conf'
GNUPGHOME='$(GNUPGHOME)' $(MAKE) -f ../source.mk '$(source_archive)' \
|| { $(cleanup); exit 1; }
$(cleanup)
|