[Git][debian-gis-team/tilemaker][master] Clean-up debian rules and patches after switch to cmake.

ǝɹʇʇɐʃǝ◖ xıʃǝɟ (@xamanu) gitlab at salsa.debian.org
Fri Oct 8 12:48:46 BST 2021



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


Commits:
38af5a2b by Felix Delattre at 2021-10-08T11:48:01+00:00
Clean-up debian rules and patches after switch to cmake.

- - - - -


8 changed files:

- − debian/patches/0001-Add-DESTDIR-to-makefile.patch
- debian/patches/0003-Add-man-page-for-tilemaker.patch → debian/patches/0001-Add-man-page-for-tilemaker.patch
- − debian/patches/0002-Avoid-calling-git-outside-of-repository.patch
- + debian/patches/0002-Avoid-forcing-version-setting-through-git.patch
- − debian/patches/0004-Allow-CXXFLAGS-to-be-set-by-environment.patch
- − debian/patches/0005-Use-CPPFLAGS.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/patches/0001-Add-DESTDIR-to-makefile.patch deleted
=====================================
@@ -1,39 +0,0 @@
-From: Felix Delattre <felix at delattre.de>
-Date: Fri, 27 Aug 2021 12:08:04 +0000
-Subject: Add DESTDIR to makefile
-Origin: https://github.com/systemed/tilemaker/pull/297/commits/90abe03ca8e9d8629b4fbb2a7753d17e067e8987
-Bug: https://github.com/systemed/tilemaker/pull/297
-
----
- Makefile | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 232912a..7316325 100644
---- a/Makefile
-+++ b/Makefile
-@@ -61,11 +61,14 @@ endif
- 
- # Main includes
- 
-+prefix = /usr/local
-+
- 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)
- 
-+
- # Targets
- 
- all: tilemaker
-@@ -83,7 +86,8 @@ tilemaker: include/osmformat.pb.o include/vector_tile.pb.o src/mbtiles.o src/pbf
- 	protoc --proto_path=include --cpp_out=include $<
- 
- install:
--	install -m 0755 tilemaker /usr/local/bin
-+	install -m 0755 -d $(DESTDIR)$(prefix)/bin/
-+	install -m 0755 tilemaker $(DESTDIR)$(prefix)/bin/
- 
- clean:
- 	rm -f tilemaker src/*.o include/*.o


=====================================
debian/patches/0003-Add-man-page-for-tilemaker.patch → debian/patches/0001-Add-man-page-for-tilemaker.patch
=====================================
@@ -6,9 +6,9 @@ Bug: https://github.com/systemed/tilemaker/pull/299
 
 ---
  CMakeLists.txt       |  2 ++
- Makefile             |  4 +++-
+ Makefile             |  3 +++
  docs/man/tilemaker.1 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 59 insertions(+), 1 deletion(-)
+ 3 files changed, 59 insertions(+)
  create mode 100644 docs/man/tilemaker.1
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -23,22 +23,21 @@ index 493f57f..a52b8d3 100644
 +
  install(TARGETS tilemaker RUNTIME DESTINATION bin)
 diff --git a/Makefile b/Makefile
-index 4e7f7b7..838c110 100644
+index 232912a..77f8002 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -62,7 +62,7 @@ endif
+@@ -61,6 +61,7 @@ endif
+ 
  # Main includes
  
- prefix = /usr/local
--
 +MANPREFIX := /usr/share/man
- TM_VERSION ?= $(shell git describe --tags --abbrev=0)
+ 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
+@@ -84,6 +85,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/
+ 	install -m 0755 tilemaker /usr/local/bin
 +	install -m 0755 -d ${DESTDIR}${MANPREFIX}/man1/
 +	install docs/man/tilemaker.1 ${DESTDIR}${MANPREFIX}/man1/
  


=====================================
debian/patches/0002-Avoid-calling-git-outside-of-repository.patch deleted
=====================================
@@ -1,23 +0,0 @@
-From: Felix Delattre <felix at delattre.de>
-Date: Fri, 27 Aug 2021 14:55:35 +0000
-Subject: Avoid calling git outside of repository
-Origin: https://github.com/systemed/tilemaker/pull/311/commits/b8035b0cbb43807f4df8568653b6dd42c254b009
-Bug: https://github.com/systemed/tilemaker/pull/311
-
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 7316325..4e7f7b7 100644
---- a/Makefile
-+++ b/Makefile
-@@ -63,7 +63,7 @@ endif
- 
- prefix = /usr/local
- 
--TM_VERSION := $(shell git describe --tags --abbrev=0)
-+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/0002-Avoid-forcing-version-setting-through-git.patch
=====================================
@@ -0,0 +1,31 @@
+From: Felix Delattre <felix at delattre.de>
+Date: Fri, 8 Oct 2021 11:01:55 +0000
+Subject: Avoid forcing version setting through git.
+Origin: https://github.com/systemed/tilemaker/pull/341/commits/89e3773b63846be837ca1cb6f99d8d259e920af4
+Bug: https://github.com/systemed/tilemaker/pull/341
+
+---
+ CMakeLists.txt | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a52b8d3..c169763 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -58,10 +58,12 @@ include_directories(${ZLIB_INCLUDE_DIR})
+ 
+ set(CMAKE_CXX_STANDARD 14)
+ 
+-execute_process(
+-	COMMAND git describe --tags --abbrev=0
+-	OUTPUT_VARIABLE tm_version)
+-add_compile_definitions(TM_VERSION=${tm_version})
++if(!TM_VERSION)
++	execute_process(
++		COMMAND git describe --tags --abbrev=0
++		OUTPUT_VARIABLE tm_version)
++	add_compile_definitions(TM_VERSION=${tm_version})
++endif()
+ 
+ if(MSVC)
+  	find_package(unofficial-sqlite3 CONFIG REQUIRED)


=====================================
debian/patches/0004-Allow-CXXFLAGS-to-be-set-by-environment.patch deleted
=====================================
@@ -1,23 +0,0 @@
-From: Felix Delattre <felix at delattre.de>
-Date: Tue, 7 Sep 2021 19:44:38 +0000
-Subject: Allow CXXFLAGS to be set by environment.
-Origin: https://github.com/systemed/tilemaker/pull/312/commits/b66e69d7a9dd427e4e133ffc27692487f06cfa5a
-Bug: https://github.com/systemed/tilemaker/pull/312
-
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 838c110..1e7bbe1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -64,7 +64,7 @@ endif
- prefix = /usr/local
- MANPREFIX := /usr/share/man
- 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)
-+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/0005-Use-CPPFLAGS.patch deleted
=====================================
@@ -1,30 +0,0 @@
-From: Felix Delattre <felix at delattre.de>
-Date: Fri, 17 Sep 2021 11:18:14 +0000
-Subject: Use CPPFLAGS.
-Forwarded: not-needed
-
----
- Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 1e7bbe1..eabcdd1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -74,13 +74,13 @@ INC := -I/usr/local/include -isystem ./include -I./src $(LUA_CFLAGS)
- all: tilemaker
- 
- tilemaker: include/osmformat.pb.o include/vector_tile.pb.o src/mbtiles.o src/pbf_blocks.o src/coordinates.o src/osm_store.o src/helpers.o src/output_object.o src/read_shp.o src/read_pbf.o src/osm_lua_processing.o src/write_geometry.o src/shared_data.o src/tile_worker.o src/tile_data.o src/osm_mem_tiles.o src/shp_mem_tiles.o src/attribute_store.o src/tilemaker.o src/geom.o
--	$(CXX) $(CXXFLAGS) -o tilemaker $^ $(INC) $(LIB) $(LDFLAGS)
-+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o tilemaker $^ $(INC) $(LIB) $(LDFLAGS)
- 
- %.o: %.cpp
--	$(CXX) $(CXXFLAGS) -o $@ -c $< $(INC)
-+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< $(INC)
- 
- %.o: %.cc
--	$(CXX) $(CXXFLAGS) -o $@ -c $< $(INC)
-+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< $(INC)
- 
- %.pb.cc: %.proto
- 	protoc --proto_path=include --cpp_out=include $<


=====================================
debian/patches/series
=====================================
@@ -1,5 +1,2 @@
-0001-Add-DESTDIR-to-makefile.patch
-0002-Avoid-calling-git-outside-of-repository.patch
-0003-Add-man-page-for-tilemaker.patch
-0004-Allow-CXXFLAGS-to-be-set-by-environment.patch
-0005-Use-CPPFLAGS.patch
+0001-Add-man-page-for-tilemaker.patch
+0002-Avoid-forcing-version-setting-through-git.patch


=====================================
debian/rules
=====================================
@@ -10,22 +10,10 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 include /usr/share/dpkg/pkg-info.mk
 TM_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
 
-export DEB_LDFLAGS_MAINT_APPEND=-pthread
-export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
+export DEB_CXXFLAGS_MAINT_APPEND=-DTM_VERSION=$(TM_VERSION)
 
 # Allow debug package to be created
 CONFIG := -g
 
-# Allow hardening by fortifying functions
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
-CXXFLAGS := -O2 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=$(TM_VERSION) $(CONFIG) $(CPPFLAGS)
-
 %:
 	dh $@ --buildsystem=cmake
-
-override_dh_auto_install:
-	dh_auto_install -- prefix=/usr
-
-override_dh_compress:
-	dh_compress -X.lua -X.json



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

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/tilemaker/-/commit/38af5a2bbcef0f750b110abba12f3252c6e27b92
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/20211008/f9a73964/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list