summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authordamiano1999-03-03 15:47:24 +0000
committerdamiano1999-03-03 15:47:24 +0000
commit4ebda522e35e16f7e7cc4fe14a9fdfb2d6bcd605 (patch)
treeaf49e2b2a9149974789f91464d96fdcb31848279 /debian
parenta3b6b3a2edee7bb9a66a0623e0736af5c8c684ec (diff)
downloadivy-c-4ebda522e35e16f7e7cc4fe14a9fdfb2d6bcd605.zip
ivy-c-4ebda522e35e16f7e7cc4fe14a9fdfb2d6bcd605.tar.gz
ivy-c-4ebda522e35e16f7e7cc4fe14a9fdfb2d6bcd605.tar.bz2
ivy-c-4ebda522e35e16f7e7cc4fe14a9fdfb2d6bcd605.tar.xz
check cvs tag in debian/rules
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules28
1 files changed, 25 insertions, 3 deletions
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