--rebuild \
--define "_topdir $(RPMDIR)" \
--target `uname -m` \
- $(SRPM)/$(APPN)-$(VERSION).$(RELEASE)-*.src.rpm
+ $(SRPM)/$(APPN)-$(DISTVER).$(DISTREL)-*.src.rpm
@ echo "'$(APLV)' RPM binary file, ready"
rpm : cleanrpm tarfile spec
@ sed \
-e 's/@@DIST@@/dvl/g' \
-e 's/@@APPN@@/$(APPN)/g' \
- -e 's/@@VERSION@@/$(VERSION).$(RELEASE)/g' \
+ -e 's/@@VERSION@@/$(DISTVER).$(DISTREL)/g' \
-e 's/@@RELEASE@@//g' \
< $< > $@
SRC = $(RPMDIR)/SOURCES
SRPM = $(RPMDIR)/SRPMS
#====================================================================
-VERSION = $(shell echo `grep VERSION lib/numver.h | cut -d '"' -f2`)
-RELEASE = $(shell echo `grep RELEASE lib/numver.h | cut -d '"' -f2`)
-APPV = $(VERSION).$(RELEASE)
+DISTVER = $(shell echo `grep VERSION lib/numver.h | cut -d '"' -f2`)
+DISTREL = $(shell echo `grep RELEASE lib/numver.h | cut -d '"' -f2`)
+APPV = $(DISTVER).$(DISTREL)
APLV = $(APPN)-$(APPV)
#====================================================================
#version change
CURTAG = $(shell git rev-parse --abbrev-ref HEAD)
BRANCH = $(shell echo $(CURTAG) | cut -d '-' -f3)
+VERSION = $(shell echo $(CURTAG) | cut -d '-' -f2)
RELEASE = $(shell git rev-list --count $(CURTAG) ^tag-$(VERSION))
-VERSION = $(shell echo $(CURTAG) | cut -d'-' -f2)
NEXTREL = $(shell echo $(RELEASE) + 1 |bc)
MAILREL = $(shell echo $(VERSION)-$(NEXTREL)-$(BRANCH))
#--------------------------------------------------------------------
+xxx :
+ @ echo $(CURTAG)
+ @ echo $(BRANCH)
+ @ echo MA-0.19-dvl | cut -d '-' -f2
+ @ echo $(VERSION)
+
+#--------------------------------------------------------------------
+#to check if git find difference
github :
@ (cd pub-mailleur ; git push --tags $@ $(BR):$(BR))
./www/release.in \
) > ./www/release.php
-#to check if git find difference
PUB=mailleurXXXXX
NEWGIT = $(shell cd mailleur ; git diff --exit-code > /dev/null; echo $$?)
#--------------------------------------------------------------------