diff options
author | Peter Palfrader <peter@palfrader.org> | 2009-09-21 14:51:26 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2009-09-21 14:51:26 +0200 |
commit | 6332c51f73e3722d899792fa5212befaf28be3b2 (patch) | |
tree | 4fc292bf1f6312e536ee7717a1a9ad5d16aac02d /debian/rules | |
parent | 06211f2b9027b1a898c6de67468f1c627a281ca3 (diff) | |
download | tor-6332c51f73e3722d899792fa5212befaf28be3b2.tar.gz tor-6332c51f73e3722d899792fa5212befaf28be3b2.zip |
Build debian's micro-revision into the binary
If we have a debian/micro-revision.i, replace the one in src/or
with our copy so that this will be the revision that ends up in
the binary. This is an informational only version string, but
it'd be kinda nice if it was (more) accurate nonetheless.
Of course this won't help if people manually patch around but
it's still preferable to claiming we are exactly upstream's source.
If we are building directly out of a git tree, update
debian/micro-revision.i in the clean target.
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules index 5b393484bf..0de4103742 100755 --- a/debian/rules +++ b/debian/rules @@ -82,6 +82,7 @@ build: build-stamp build-stamp: config.status dh_testdir + ! [ debian/micro-revision.i ] || cp debian/micro-revision.i src/or/micro-revision.i $(MAKE) @echo @@ -130,9 +131,15 @@ clean: unpatch dh_testroot rm -f build-stamp rm -f src/common/common_sha1.i src/or/or_sha1.i + rm -f src/or/micro-revision.i [ ! -f Makefile ] || $(MAKE) distclean + # Normally the .deb wouldn't ship with a ../.git + if [ -d .git ] && which git >/dev/null; then \ + echo "\"`git rev-parse --short=16 HEAD`\"" > "debian/micro-revision.i" ; \ + fi + dh_clean install: build |