Commit 8fde8fa41b89d24d45e9487ad49ba5d3c2fa5a76

Dennis Fateyev 2015-12-25T19:23:46

Improve package version assignment

diff --git a/makefile b/makefile
index 432bb7e..15654a8 100644
--- a/makefile
+++ b/makefile
@@ -169,11 +169,12 @@ pre_gen:
 	rm mpi.c
 
 zipup:
-	rm -rf ../libtommath-$(VERSION) && rm -f ../ltm-$(VERSION).zip ../ltm-$(VERSION).tar.bz2
-	git archive HEAD --prefix=libtommath-$(VERSION)/ > ../libtommath-$(VERSION).tar
-	cd .. ; tar xf libtommath-$(VERSION).tar 
-	MAKE=${MAKE} ${MAKE} -C ../libtommath-$(VERSION) clean manual poster docs
-	tar -c ../libtommath-$(VERSION)/* | xz -9 > ../ltm-$(VERSION).tar.xz 
+	rm -rf ../libtommath-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) \
+		&& rm -f ../ltm-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).zip ../ltm-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).tar.bz2
+	git archive HEAD --prefix=libtommath-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)/ > ../libtommath-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).tar
+	cd .. ; tar xf libtommath-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).tar
+	MAKE=${MAKE} ${MAKE} -C ../libtommath-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) clean manual poster docs
+	tar -c ../libtommath-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)/* | xz -9 > ../ltm-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).tar.xz
 
 new_file:
 	bash updatemakes.sh
diff --git a/makefile.include b/makefile.include
index d4e2322..034aa53 100644
--- a/makefile.include
+++ b/makefile.include
@@ -3,8 +3,9 @@
 #
 
 #version of library
-VERSION=0.43.0
-VERSION_SO=0:43
+VER_MAJOR=0
+VER_MINOR=43
+VER_PATCH=0
 
 # default make target
 default: ${LIBNAME}
diff --git a/makefile.shared b/makefile.shared
index 559720e..eee35c7 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -48,7 +48,7 @@ objs: $(OBJECTS)
 	$(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
 
 $(LIBNAME):  $(OBJECTS)
-	$(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO)
+	$(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VER_MAJOR):$(VER_MINOR)
 
 install: $(LIBNAME)
 	install -d $(DESTDIR)$(LIBPATH)