[Git][debian-gis-team/tilemaker][master] Improve handling of TM_VERSION variable.

ǝɹʇʇɐʃǝ◖ xıʃǝɟ (@xamanu) gitlab at salsa.debian.org
Tue Sep 7 22:25:39 BST 2021



ǝɹʇʇɐʃǝ◖ xıʃǝɟ pushed to branch master at Debian GIS Project / tilemaker


Commits:
8c17b5a6 by Felix Delattre at 2021-09-07T20:25:00+00:00
Improve handling of TM_VERSION variable.

- - - - -


3 changed files:

- debian/patches/0002-Avoid-calling-git-outside-of-repository.patch
- debian/patches/0003-Add-man-page-for-tilemaker.patch
- debian/rules


Changes:

=====================================
debian/patches/0002-Avoid-calling-git-outside-of-repository.patch
=====================================
@@ -5,21 +5,19 @@ Origin: https://github.com/systemed/tilemaker/pull/298/commits/40e76bf286d3638dd
 Bug: https://github.com/systemed/tilemaker/pull/298
 
 ---
- Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 7316325..572607b 100644
+index 7316325..4e7f7b7 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -63,7 +63,9 @@ endif
+@@ -63,7 +63,7 @@ endif
  
  prefix = /usr/local
  
 -TM_VERSION := $(shell git describe --tags --abbrev=0)
-+DEB_VERSION := $(shell dpkg-parsechangelog -SVersion)
-+DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
-+TM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/^[0-9]*://')
++TM_VERSION ?= $(shell git describe --tags --abbrev=0)
  CXXFLAGS := -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=$(TM_VERSION) $(CONFIG)
  LIB := -L/usr/local/lib -lz $(LUA_LIBS) -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lprotobuf -lshp
  INC := -I/usr/local/include -isystem ./include -I./src $(LUA_CFLAGS)


=====================================
debian/patches/0003-Add-man-page-for-tilemaker.patch
=====================================
@@ -11,7 +11,7 @@ Bug: https://github.com/systemed/tilemaker/pull/299
  create mode 100644 docs/man/tilemaker.1
 
 diff --git a/Makefile b/Makefile
-index 572607b..c1d2579 100644
+index 4e7f7b7..838c110 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -62,7 +62,7 @@ endif
@@ -20,10 +20,10 @@ index 572607b..c1d2579 100644
  prefix = /usr/local
 -
 +MANPREFIX := /usr/share/man
- DEB_VERSION := $(shell dpkg-parsechangelog -SVersion)
- DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
- TM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/^[0-9]*://')
-@@ -90,6 +90,8 @@ tilemaker: include/osmformat.pb.o include/vector_tile.pb.o src/mbtiles.o src/pbf
+ TM_VERSION ?= $(shell git describe --tags --abbrev=0)
+ CXXFLAGS := -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=$(TM_VERSION) $(CONFIG)
+ LIB := -L/usr/local/lib -lz $(LUA_LIBS) -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lprotobuf -lshp
+@@ -88,6 +88,8 @@ tilemaker: include/osmformat.pb.o include/vector_tile.pb.o src/mbtiles.o src/pbf
  install:
  	install -m 0755 -d $(DESTDIR)$(prefix)/bin/
  	install -m 0755 tilemaker $(DESTDIR)$(prefix)/bin/


=====================================
debian/rules
=====================================
@@ -6,8 +6,11 @@
 # Enable hardening build flags
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
-CONFIG:= -g
-export CONFIG
+include /usr/share/dpkg/pkg-info.mk
+
+export TM_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
+
+export CONFIG := -g
 
 %:
 	dh $@



View it on GitLab: https://salsa.debian.org/debian-gis-team/tilemaker/-/commit/8c17b5a63e85d3177ef0c611270b64d0bfca5902

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/tilemaker/-/commit/8c17b5a63e85d3177ef0c611270b64d0bfca5902
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20210907/655a9ec0/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list