I want to describe how to write a nice get-orig-source target for debian/rules in presence of an upstream SVN repository.
Let's first consider that <pkg> is currently in sid with version x.y-z (upstream version = x.y, Debian revision = z).
Choose the right version
There are two differents path here, based on what "version" of the upstream code you're packaging
- the code in the svn is the update for the version x.y but you don't know yet how upstream would call it
- the code in the svn is the preliminary version the new upstream release, be it x.(y+1) or x.y.n
A couple of magic characters you can use in version come in our help here: '~' and '+'; here are how they are interpreted
x.(y+1)-z or > x.y+foo-z > x.y-z > x.y~bar-z x.y.n-1
So, here it is how you have to choose the version number for the svn snapshot:
if x.y-z is in sid and you're packaging the new version "without a name", then go with x.y+svn<rev>-z
if x.y-z is in sid and you're packaging the new version x.(y+1) or x.y.n, then go with x.(y+1)~svn<rev>-1 or x.y.n~svn<rev>-1