summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: e55a0d381ea9662d95ca5dd7d925f4438a964699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
	sed 's/~/-/')
upstream_archive = ncurses-$(upstream_version).tgz
upstream_url = ftp://invisible-island.net/ncurses/current/$(upstream_archive)
source_archive = ../ncurses-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
keys = F7E48EDB

$(source_archive):
	#wget "$(upstream_url)"
	set -e; if gpg --version >/dev/null 2>&1; then \
		wget "$(upstream_url).asc"; \
		[ -e ../keyring.gpg ] || \
			gpg --keyring ../keyring.gpg --no-default-keyring \
				--recv-keys $(keys) || true; \
		gpg --verify --keyring ../keyring.gpg \
			"$(upstream_archive).asc"; \
	fi
	mv "$(upstream_archive)" '$(source_archive)'

source: $(source_archive)