summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: a7a6fc5387d2b3901594505f240e893cc2dbebe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
upstream_svn_branch = trunk
upstream_svn_uri = http://opkg.googlecode.com/svn/$(upstream_svn_branch)/
upstream_svn_rev = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
	sed 's/^.*~r\(.*\)$$/\1/')
source = opkg-$(OPK_SOURCE_VERSION_UPSTREAM)
source_archive = ../$(source).orig.tar.bz2

$(source_archive):
	svn export -r "$(upstream_svn_rev)" '$(upstream_svn_uri)' '$(source)'
	cd '$(source)' && autoreconf -v -i && cd ..
	tar -cjf '$(SOURCE_ARCHIVE)' '$(SOURCE)'
	rm -Rf src
	mv '$(SOURCE)' src

source: $(source_archive)