From: Daniel Kahn Gillmor Date: Mon, 20 Dec 2010 17:34:03 +0000 (-0500) Subject: automatically update the internal versioning of MSVA.pm from the X-Git-Tag: msva-perl_debian/0.8-1~1^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84558147cb31670f6bd425b8a6c858c5908cd40f;p=monkeysphere-validation-agent.git automatically update the internal versioning of MSVA.pm from the Changelog. This is a little crufty (it might trip up people the first time they bump versions directly from within a git repo, and cause a spurious commit or two), but it has a few advantages: 0) it is a simple, small change to make right now, and 1) it means we can leave all the files in place, so the test harness can work in-place. 2) our "upstream tarball" can continue to be cleanly built. Probably the better long-term way to fix this is an "install" target in the Makefile that does this substitution as it transfers the file into place. That target would need to know where to place perl modules, among other things. (see MS # 2684) --- diff --git a/Makefile b/Makefile index 351c049..d3927d7 100755 --- a/Makefile +++ b/Makefile @@ -5,16 +5,19 @@ # © 2010 Daniel Kahn Gillmor # Licensed under GPL v3 or later -VERSION=`dpkg-parsechangelog -lChangelog | grep ^Version: | cut -f2 -d\ ` +VERSION := $(shell dpkg-parsechangelog -lChangelog | grep ^Version: | cut -f2 -d\ ) DEBIAN_VERSION=`dpkg-parsechangelog | grep ^Version: | cut -f2 -d\ ` MANPAGES=msva-perl.1 msva-query-agent.1 -all: $(MANPAGES) +all: $(MANPAGES) Crypt/Monkeysphere/MSVA.pm %.1: % pod2man $< $@ +Crypt/Monkeysphere/MSVA.pm: Changelog + sed -i "s/^ \\\$$VERSION = '[a-z0-9.~A-Z]*';$$/ \$$VERSION = '$(VERSION)';/" $@ + clean: rm -f $(MANPAGES)