File: rules

package info (click to toggle)
dtkcore 2.0.9.17-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,180 kB
  • sloc: cpp: 4,804; python: 333; makefile: 29
file content (48 lines) | stat: -rwxr-xr-x 1,248 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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export QT_SELECT := 5

# Retrieve version info
include /usr/share/dpkg/default.mk

# Explicitly enable hardening
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# DTK: Automatic version parsing
#
ifneq (,$(wildcard .git/config))
	CONFIG_VERSION=
else
_PACK_VER = $(shell echo $(DEB_VERSION) | awk -F'[+_~-]' '{print $$1}')
_BUILD_VER = $(shell echo $(DEB_VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g')
ifeq ($(_BUILD_VER),)
	CONFIG_VERSION = $(_PACK_VER)
else
	CONFIG_VERSION = $(_PACK_VER).$(_BUILD_VER)
endif
endif

%:
	dh $@ --with pkgkde_symbolshelper

override_dh_auto_configure:
	@echo "I: Current dtkcore VERSION is $(CONFIG_VERSION)"
	dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) VERSION=$(CONFIG_VERSION)

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_missing:
	# remove known useless test file
	rm -f debian/tmp/usr/tests/tests/tests
	dh_missing --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGELOG.md