summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: 81f822b8424ef7b6d93ca6d6eb1d361aa3cf4ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
upstream_archive = busybox-$(OPK_SOURCE_VERSION_UPSTREAM).tar.bz2
upstream_url = http://www.busybox.net/downloads/$(upstream_archive)
source_archive = ../busybox-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2

gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
keys = \
	'C9E9 416F 76E6 10DB D09D  040F 47B7 0C55 ACC9 965B'

$(source_archive):
	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
	rm -Rf gnupghome/
	mv "$(upstream_archive)" "$(source_archive)"

source: $(source_archive)