Skip to content

Commit

Permalink
Use debian packaging settings.
Browse files Browse the repository at this point in the history
This ports some of the minor changes from the the debian package¹ to
this repo. The biggest change to adopt Debian's approach of just one
package (tirex) rather than several packages (tirex-core,
tirex-backend-mapnik, etc).

¹ https://salsa.debian.org/debian-gis-team/tirex
  • Loading branch information
amandasaurus committed Jul 26, 2024
1 parent 98894ba commit b231232
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 74 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,15 @@ to create the packages. The following packages will be created in the parent
directory:

tirex
tirex-backend-mapnik
tirex-backend-wms
tirex-backend-mapserver
tirex-example-map
tirex-munin-plugin
tirex-nagios-plugin
tirex-syncd

Call 'make deb-clean' to cleanup after a 'make deb'.

This package is also maintained in Debian by the [Debian GIS Team](https://wiki.debian.org/Teams/DebianGis).

* [Debian packages](https://packages.debian.org/search?keywords=tirex)
* [Ubuntu packages](https://packages.ubuntu.com/search?keywords=tirex)
* [Debian Salsa/git packaging repo](https://salsa.debian.org/debian-gis-team/tirex)

## TESTS

Call 'prove' in the main directory to run Perl unit tests. You need Test::More
Expand Down
11 changes: 11 additions & 0 deletions debian/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml

variables:
SALSA_CI_AUTOPKGTEST_ARGS: '--no-auto-control'
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
SALSA_CI_ENABLE_BUILD_PACKAGE_TWICE: 1

blhc:
allow_failure: true
63 changes: 6 additions & 57 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ Maintainer: Debian GIS Project <[email protected]>
Uploaders: Felix Delattre <[email protected]>
Section: science
Priority: optional
Build-Depends: debhelper-compat (= 12),
Build-Depends: architecture-is-64-bit,
debhelper-compat (= 13),
dh-apache2,
dh-sequence-apache2,
libboost-program-options-dev,
libboost-filesystem-dev,
libipc-sharelite-perl,
libjson-perl,
libmapnik-dev
Standards-Version: 4.6.0
libmapnik-dev (>= 4.0.0)
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/debian-gis-team/tirex
Vcs-Git: https://salsa.debian.org/debian-gis-team/tirex.git
Homepage: https://wiki.openstreetmap.org/wiki/Tirex
Rules-Requires-Root: no

Package: tirex
Section: utils
Expand Down Expand Up @@ -44,56 +46,3 @@ Description: Tirex example map data and configuration
with Mapnik and Apache2 webserver.
After installation the map can be visisted in a web
browser by going to http://localhost/tirex-example-map.

Package: tirex-munin-plugin
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex, munin-node
Description: Munin plugin for the Tirex tile rendering system
The Tirex suite of programs manages map tile rendering and caching.
This package contains plugins that help to graph Tirex activity with Munin.

Package: tirex-nagios-plugin
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex
Suggests: nagios3 | nagios-nrpe-server
Description: Nagios plugins for the Tirex tile rendering system
The Tirex suite of programs manages map tile rendering and caching.
This package contains plugins that help to monitor Tirex activity with Nagios.

Package: tirex-backend-wms
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex, libwww-perl
Description: WMS backend for the Tirex tile rendering system
The Tirex suite of programs manages map tile rendering and caching.
This is the WMS backend for fetching maps from a WMS server.

Package: tirex-backend-mapserver
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex, libwww-perl, libmapscript-perl, ttf-dejavu-core
Description: Mapserver backend for the Tirex tile rendering system
The Tirex suite of programs manages map tile rendering and caching.
This is the Mapserver backend for rendering maps with Mapserver.

Package: tirex-backend-mapnik
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex
Description: Mapnik backend for the Tirex tile rendering system
The Tirex suite of programs manages map tile rendering and caching.
This is the Mapnik backend for creating maps with the Mapnik renderer.

Package: tirex-backend-openseamap
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex, default-jre-headless | java8-runtime-headless
Description: OpenSeaMap backend for the Tirex tile rendering system
The Tirex suite of programs manages map tile rendering and caching.
This is the OpenSeaMap backend for creating maps with the OpenSeaMap renderer.

Package: tirex-syncd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tirex
Description: Tirex sync daemon
The Tirex suite of programs manages map tile rendering and caching.
This is the sync daemon which listens for messages of tiles fully rendered,
and then copies the metatile to another server. The sync daemon is intended
to be used in setups where you have multiple tile servers with their own
rendering queues.
4 changes: 2 additions & 2 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ License: public-domain
This file is explicitly placed in the public domain.

Files: debian/*
Copyright: 2010-2020, Frederik Ramm <[email protected]>
2020-2021, Felix Delattre <[email protected]>
Copyright: 2010-2022, Frederik Ramm <[email protected]>
2020-2022, Felix Delattre <[email protected]>
License: GPL-2+

License: GPL-2+
Expand Down
28 changes: 28 additions & 0 deletions debian/patches/mapnik-4.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Description: Use pkg-config for Mapnik 4.0.0.
Author: Bas Couwenberg <[email protected]>
Forwarded: https://github.com/openstreetmap/tirex/issues/60

--- a/backend-mapnik/Makefile
+++ b/backend-mapnik/Makefile
@@ -1,8 +1,7 @@
INSTALLOPTS=-g root -o root
-CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-CXXFLAGS = `mapnik-config --cflags` $(CFLAGS)
+CXXFLAGS += `pkg-config --cflags libmapnik` -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS += -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast
-LDFLAGS= `mapnik-config --libs --ldflags --dep-libs`
+LDFLAGS += `pkg-config --libs libmapnik` -lboost_filesystem

backend-mapnik: renderd.o metatilehandler.o networklistener.o networkmessage.o networkrequest.o networkresponse.o debuggable.o requesthandler.o
$(CXX) -o $@ $^ $(LDFLAGS)
--- a/backend-mapnik/metatilehandler.cc
+++ b/backend-mapnik/metatilehandler.cc
@@ -25,7 +25,7 @@
#include <mapnik/agg_renderer.hpp>
#include <mapnik/image_util.hpp>
#include <mapnik/load_map.hpp>
-#include <mapnik/box2d.hpp>
+#include <mapnik/geometry/box2d.hpp>

#if MAPNIK_VERSION >= 300000
# include <mapnik/datasource.hpp>
12 changes: 12 additions & 0 deletions debian/patches/rules-requires-root.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Description: Fix FTBFS Rules-Requires-Root: no.
Author: Bas Couwenberg <[email protected]>
Forwarded: not-needed

--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-INSTALLOPTS=-g root -o root
+INSTALLOPTS=
build: Makefile.perl
cd backend-mapnik; $(MAKE) $(MFLAGS)
$(MAKE) -f Makefile.perl
2 changes: 2 additions & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules-requires-root.patch
mapnik-4.0.patch
7 changes: 4 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
dh $@ --with apache2
dh $@

override_dh_auto_install:
dh_auto_install --destdir=debian/tmp -- install-all
execute_after_dh_installsystemd:
dh_installsystemd -ptirex --name tirex-master
dh_installsystemd -ptirex --name tirex-backend-manager

.PHONY: templates
2 changes: 0 additions & 2 deletions debian/tirex.install
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ debian/etc/tirex/renderer/test/checkerboard.conf etc/tirex/renderer/test
debian/etc/tirex/tirex.conf etc/tirex
debian/etc/tirex/renderer/mapnik.conf etc/tirex/renderer
debian/tmpfiles.d/tirex.conf usr/lib/tmpfiles.d
debian/tirex-master.service usr/lib/systemd/system/
debian/tirex-backend-manager.service usr/lib/systemd/system/
usr/libexec/tirex-backend-mapnik
usr/libexec/tirex-backend-test
5 changes: 3 additions & 2 deletions debian/tirex.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# This package only provides systemd unit files:
package-supports-alternative-init-but-no-init.d-script
# False positive, lat/lon
typo-in-manual-page lon long *

1 change: 0 additions & 1 deletion debian/tirex.prerm
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ if [ "$1" = "remove" ]; then
fi

#DEBHELPER#

0 comments on commit b231232

Please sign in to comment.