3
dqk_dir := $(dir $(lastword $(MAKEFILE_LIST)))
6
include $(dqk_dir)dhmk.mk
8
# For performance reasons skip the rest in the override info mode. The slowdown
9
# is mostly caused by $(shell) functions (e.g. dpkg-parsechangelog).
10
ifneq ($(dhmk_override_info_mode),yes)
12
dqk_sourcepkg := $(shell dpkg-parsechangelog | sed -n '/^Source:/{ s/^Source:[[:space:]]*//; p; q }')
13
dqk_upstream_version ?= $(shell dpkg-parsechangelog | sed -n '/^Version:/{ s/^Version:[[:space:]]*\(.*\)-.*/\1/g; p; q }')
14
dqk_destdir = $(CURDIR)/debian/tmp
16
# We want to use kde and pkgkde-symbolshelper plugins by default
17
dh := --with=kde,pkgkde-symbolshelper $(dh)
19
# dqk_disable_policy_check lists distributions for which policy check should be
21
dqk_disable_policy_check ?=
22
include $(dqk_dir)policy.mk
24
# Support list-missing target
25
include $(dqk_dir)list-missing.mk
27
# Support lintian target
28
include $(dqk_dir)lintian.mk
30
# KDE packages are parallel safe. Add --parallel to dh_auto_% commands
31
$(call set_command_options,dh_auto_%, += --parallel)
33
# Use xz compression by default
34
$(call set_command_options,dh_builddeb, += -u-Zxz)
36
# Link with --as-needed by default
37
# (subject to be moved to kde dh addon/debhelper buildsystem)
38
dqk_link_with_as_needed ?= yes
39
ifneq (,$(findstring yes, $(dqk_link_with_as_needed)))
40
dqk_link_with_as_needed := no
41
ifeq (,$(findstring no-as-needed, $(DEB_BUILD_OPTIONS)))
42
dqk_link_with_as_needed := yes
43
export LDFLAGS += -Wl,--as-needed
47
# Set the link_with_no_undefined=no in order to disable linking with
48
# --no-undefined (default value is inherited from $(dqk_link_with_as_needed))
49
dqk_link_with_no_undefined ?= $(dqk_link_with_as_needed)
50
ifneq (,$(findstring yes, $(dqk_link_with_no_undefined)))
51
dqk_link_with_no_undefined := no
52
ifeq (,$(findstring no-no-undefined, $(DEB_BUILD_OPTIONS)))
53
dqk_link_with_no_undefined := yes
54
export LDFLAGS += -Wl,--no-undefined
58
# Since cmake 2.6.2 or higher is required from now on, enable relative paths to
59
# get more ccache hits.
60
$(call set_command_options,dh_auto_configure, += "-u-DCMAKE_USE_RELATIVE_PATHS=ON")
62
# Run dh_sameversiondep
63
run_dh_sameversiondep:
65
$(foreach t,$(dhmk_binary_targets),pre_$(t)_dh_gencontrol): run_dh_sameversiondep
67
debian/stamp-man-pages:
68
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
69
for f in $$(find debian/man -name '*.sgml'); do \
70
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
72
for f in $$(find debian/man -name '*.man'); do \
73
soelim -I debian/man $$f \
74
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
76
touch debian/stamp-man-pages
77
$(foreach t,build-arch build-indep build,post_$(t)_dh_auto_build): debian/stamp-man-pages
82
rm -f debian/stamp-man-pages
83
post_clean: cleanup_manpages
85
# Install files to $(dqk_sourcepkg)-doc-html package if needed
86
dqk_doc-html_dir = $(CURDIR)/debian/$(dqk_sourcepkg)-doc-html
87
install_to_doc-html_package:
89
if [ -d "$(dqk_doc-html_dir)" ]; then \
90
for doc in `cd $(dqk_destdir)/usr/share/doc/kde/HTML/en; find . -name index.docbook`; do \
91
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
92
echo Building $$pkg HTML docs...; \
93
mkdir -p $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
94
cd $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
95
meinproc4 $(dqk_destdir)/usr/share/doc/kde/HTML/en/$$pkg/index.docbook; \
97
for pkg in $(DOC_HTML_PRUNE) ; do \
98
rm -rf $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
101
$(foreach t,install-indep install,post_$(t)_dh_install): install_to_doc-html_package
103
post_binary: list-missing lintian
105
.PHONY: run_dh_sameversiondep cleanup_manpages install_to_doc-html_package
107
endif # ifneq ($(dhmk_override_info_mode),yes)
108
endif # ifndef dqk_dir