From 4ebda522e35e16f7e7cc4fe14a9fdfb2d6bcd605 Mon Sep 17 00:00:00 2001 From: damiano Date: Wed, 3 Mar 1999 15:47:24 +0000 Subject: check cvs tag in debian/rules --- debian/rules | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 39d777a..ac3b1dc 100755 --- a/debian/rules +++ b/debian/rules @@ -7,35 +7,40 @@ package=ivy-c SED_COMMAND='s/.*(\([^)]*\)).*/\1/p' MAJOR := $(shell sed -n $(SED_COMMAND) debian/changelog | head -1 | sed -n 's/\([0-9]*\)\..*/\1/p') MINOR := $(shell sed -n $(SED_COMMAND) debian/changelog | head -1 | sed -n 's/[0-9]*\.\([0-9\.]*\).*/\1/p') +VERSION = $(MAJOR).$(MINOR) +CVS_TAG := $(shell echo -n $(VERSION) | sed -n 's/\./_/gp') build: $(checkdir) - + $(checkversion) cd src && make all MAJOR=$(MAJOR) MINOR=$(MINOR) touch build clean: $(checkdir) + $(checkversion) -rm -f build -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core -rm -f debian/*substvars binary-indep: checkroot build $(checkdir) + $(checkversion) # There are no architecture-independent files to be uploaded # generated by this package. If there were any they would be # made here. -binary-arch: checkroot build +binary-arch: checkroot build $(checkdir) + $(checkversion) -rm -rf debian/tmp `find debian/* -type d ! -name CVS` install -d debian/tmp cd debian/tmp && install -d `cat ../dirs` cd src && make install PREFIX=`pwd`/../debian/tmp MAJOR=$(MAJOR) MINOR=$(MINOR) - debstd + debstd -p -rmdir debian/tmp/usr/include dpkg-gencontrol -p$(package) @@ -55,4 +60,21 @@ checkroot: $(checkdir) test root = "`whoami`" +define checkversion + -@echo $(VERSION) + -@echo $(CVS_TAG) + -@if (test -d CVS); then \ + if (cvs status -v debian/changelog | grep --silent $(CVS_TAG)); then \ + echo "cvs tag $(CVS_TAG) matches package version $(VERSION)"; \ + else \ + echo "debian/rules: *** Warning : No cvs tag $(CVS_TAG) matches package version $(VERSION) for file changelog. You can tag your cvs module by doing debian/rules tag"; \ + echo -n "debian/rules: *** Existing tags are : "; \ + cvs status -v debian/changelog | sed -n 's/.*\(V.*_[0-9]\).*/\1/p'; \ + fi \ + fi +endef + +tag: + -@if (test -x cvs); then cvs tag $(CVS_TAG) .; fi + .PHONY: binary binary-arch binary-indep clean checkroot -- cgit v1.1