[yat] 01/01: add a get-orig-source to checkout from the svn

Frédéric-Emmanuel Picca picca at alioth.debian.org
Thu Sep 19 19:56:50 UTC 2013


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to branch master
in repository yat.

commit 8ed9f978c33a12caa826309cda2660d2c063ebd5
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Thu Sep 19 21:56:38 2013 +0200

    add a get-orig-source to checkout from the svn
---
 debian/rules |   38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/debian/rules b/debian/rules
index db87f12..a1a467c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,3 +14,41 @@
 
 override_dh_strip:
 	dh_strip -plibyat1 --dbg-package=libyat1-dbg
+
+
+PKD   = $(abspath $(dir $(MAKEFILE_LIST)))
+PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
+UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
+DTYPE = 
+VER  ?= $(subst $(DTYPE),,$(UVER))
+
+## http://wiki.debian.org/onlyjob/get-orig-source
+.PHONY: get-orig-source
+get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
+	@
+
+## checkout from subversion (add "subversion, svn2cl | subversion-tools (<< 1.7.5)" to Build-Depends)
+UURL = svn://svn.code.sf.net/p/tango-cs/code/share/yat/tags/YAT-$(VER)
+REV   = $(shell echo YAT-$(VER))
+$(PKG)_$(VER)$(DTYPE).orig.tar.xz: $(info I: REV=$(REV))
+	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
+	svn checkout --config-option config:miscellany:use-commit-times=yes \
+	    $(UURL) $(PKG)-$(VER) \
+	|| $(RM) -r $(PKG)-$(VER)
+	@echo "Generate the autotools files."
+	-cd $(PKG)-$(VER) \
+	&& ./autogen.sh
+	@echo "Clean-up..."
+	cd $(PKG)-$(VER) \
+	&& $(RM) -r -v \
+		macosx \
+		msvc \
+		*.cache \
+	&& [ -s ChangeLog ] || ( echo "# Generating ChangeLog..." \
+	    ; svn2cl --break-before-msg --include-rev \
+	    | perl -0pi -e 's{(\d+\])[^:]+?:\s+}{$$1 }sgm;' ChangeLog) \
+	&& find . -depth -name ".svn" -exec $(RM) -r '{}' \;
+	@echo "# Packing..."
+	find -L $(PKG)-$(VER) -xdev -type f -print | sort \
+	| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+	&& $(RM) -r "$(PKG)-$(VER)"
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/yat.git



More information about the debian-science-commits mailing list