Add get-orig-source target to fetch recreate the tarball from upstream SVN.
Signed-off-by: Luca Niccoli <lultimouomo@gmail.com>
Luca Niccoli
10 years ago
56 | 56 | dh_builddeb |
57 | 57 | |
58 | 58 | binary: binary-indep binary-arch |
59 | .PHONY: build clean binary-indep binary-arch binary install configure | |
59 | .PHONY: build clean binary-indep binary-arch binary install configure get-orig-source | |
60 | ||
61 | # Adapted from http://wiki.debian.org/SandroTosi/Svn_get-orig-source | |
62 | PACKAGE = splix | |
63 | SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p') | |
64 | SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' ) | |
65 | TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz | |
66 | get-orig-source: | |
67 | rm -rf get-orig-source $(TARBALL) | |
68 | mkdir get-orig-source | |
69 | svn export -r $(SVN_REVISION) svn://svn.code.sf.net/p/splix/code/splix \ | |
70 | get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig | |
71 | GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig | |
72 | rm -rf get-orig-source | |
73 | echo " "$(TARBALL)" created; move it to the right destination to build the package" |