summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: 38fa1bdefa5fcf5575f78e692f4ce35565fb6fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Reference only -- requires git, not yet in ProteanOS

upstream_commit = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
	sed 's/^.*+git........\.\([0-9a-f]*\).*$$/\1/')
upstream_git_uri = https://git.openwrt.org/project/$(OPK_SOURCE).git
source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz

$(source_archive):
	git clone $(upstream_git_uri) $(OPK_SOURCE)/
	(cd $(OPK_SOURCE)/ && git archive --format=tar --prefix=$(OPK_SOURCE)/ \
		"$(upstream_commit)") | xz >$@

source: $(source_archive)