~doctormo/apt-cat/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/make -f
  
%:
	dh $@

# the following allows for both tarball-less building from the vcs repo,
# and rules on how to handle revisions picked from upstream vcs.

.PHONY: get-orig-source
get-orig-source:
	REV=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*bzr([^-]+).*,\1,p'); \
	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p'); \
	if [ x$$REV = x ]; then \
	 uscan --force-download --rename --repack --download-version=$$VER --destdir=.; \
	else \
	 bzr export -r $$REV apt-cat_$$VER.orig.tar.gz lp:apt-cat; \
	fi