[med-svn] r6328 - trunk/community/website/docs
Charles Plessy
plessy at alioth.debian.org
Mon Mar 21 08:02:34 UTC 2011
Author: plessy
Date: 2011-03-21 08:02:32 +0000 (Mon, 21 Mar 2011)
New Revision: 6328
Modified:
trunk/community/website/docs/policy.xml
Log:
Tip sent by David Bremner on debian-mentors at lists.debian.org.
Message-ID: <878vw9mopa.fsf at zancas.localnet>
Modified: trunk/community/website/docs/policy.xml
===================================================================
--- trunk/community/website/docs/policy.xml 2011-03-20 05:39:43 UTC (rev 6327)
+++ trunk/community/website/docs/policy.xml 2011-03-21 08:02:32 UTC (rev 6328)
@@ -312,6 +312,21 @@
layout can differ from <command>git-buildpackage</command> conventions.
In that case, look for instance for a branch called <literal>debian</literal>.
</para>
+ <para>
+ If upstream manage his sources with Git, the following makefile
+ script can help producing a version number when no Git tag is
+ available:<programlisting>
+SOURCEPKG=$(shell dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p')
+UPSTREAM=$(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p')
+SHA1=$(lastword $(subst ~g, ,$(UPSTREAM)))
+ORIG=${SOURCEPKG}_${UPSTREAM}.orig.tar.gz
+
+describe-current-version:
+ git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;'
+
+get-orig-source:
+ git archive --format=tar $(SHA1) | gzip -9 > ../$(ORIG)</programlisting>
+ </para>
</sect2>
<sect2 id="subversion-to-git">
More information about the debian-med-commit
mailing list