File: rules

package info (click to toggle)
openorienteering-mapper 0.6.7-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 42,556 kB
  • ctags: 8,993
  • sloc: cpp: 84,560; sh: 3,530; ansic: 1,917; java: 145; xml: 135; sed: 43; makefile: 30
file content (64 lines) | stat: -rwxr-xr-x 2,529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

PKGDIR = $(CURDIR)/debian/openorienteering-mapper

# main packaging script based on dh7 syntax
%:
	dh $@ --parallel

# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
override_dh_auto_configure:
	dh_auto_configure -- \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
	-DMapper_BUILD_QT=OFF \
	-DMapper_BUILD_CLIPPER=OFF \
	-DMapper_BUILD_PROJ=OFF \
	-DMapper_BUILD_PACKAGE=OFF \
	-DMapper_AUTORUN_UNIT_TESTS=OFF \
	-DMapper_AUTORUN_SYSTEM_TESTS=OFF

override_dh_auto_install:
	dh_auto_install
	# remove COPYING file not needed on Debian
	rm $(PKGDIR)/usr/share/doc/openorienteering-mapper/COPYING

	# install icon and desktop file (should be done by upstream build system)
	for size in 16 24 32 48 96 128 256 512 ; do \
	  mkdir -p $(PKGDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps ;\
	  cp $(CURDIR)/images/mapper-icon/Mapper-$${size}.png $(PKGDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/openorienteering-mapper.png ;\
	done
	mkdir -p $(PKGDIR)/usr/share/applications
	cp $(CURDIR)/debian/openorienteering-mapper.desktop $(PKGDIR)/usr/share/applications/

	# install start wrapper to set QT_SELECT=5 environment variable
	mkdir -p $(PKGDIR)/usr/lib/openorienteering-mapper/bin
	mv $(PKGDIR)/usr/bin/Mapper $(PKGDIR)/usr/lib/openorienteering-mapper/bin
	cp $(CURDIR)/debian/Mapper $(PKGDIR)/usr/bin
	chmod +x $(PKGDIR)/usr/bin/Mapper

override_dh_auto_test:
	# The tests need a running X server, so use Xvfb to run the tests in automated
	# build environments.
	# Currently the symbol_set_t test modifies source files, exclude it for now
	# See https://github.com/OpenOrienteering/mapper/issues/579
	#     https://github.com/OpenOrienteering/mapper/issues/580
	# The autosave_t test fails for unknown reasons
	cd obj-$(DEB_HOST_GNU_TYPE) ; xvfb-run /usr/bin/ctest --force-new-ctest-process -j1 --extra-verbose --exclude-regex 'autosave_t|symbol_set_t'