Codebase list splix / edc2a8e
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
1 changed file(s) with 15 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
5656 dh_builddeb
5757
5858 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"