summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: 32eeb26165c937fb87a471ac24afef3e8f7360d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
	sed 's/~/-/')
upstream_archive = opkbuild-$(upstream_version).tar.xz
upstream_dir_url = http://files.proteanos.com/pub/opkbuild/$(upstream_version)
upstream_url = $(upstream_dir_url)/$(upstream_archive)
upstream_sum = $(upstream_dir_url)/SHA256SUMS
source_archive = ../opkbuild-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz

$(source_archive):
	wget "$(upstream_url)"
	wget -O - "$(upstream_sum)" | grep -F "$(upstream_archive)" >SHA256SUMS
	sha256sum -c SHA256SUMS
	rm -f SHA256SUMS
	mv "$(upstream_archive)" "$(source_archive)"

source: $(source_archive)