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
# KDE packages are parallel safe. Add --parallel to dh_auto_% commands
28
$(call set_command_options,dh_auto_%, += --parallel)
30
# Link with --as-needed by default
31
# (subject to be moved to kde dh addon/debhelper buildsystem)
32
dqk_link_with_as_needed ?= yes
33
ifneq (,$(findstring yes, $(dqk_link_with_as_needed)))
34
dqk_link_with_as_needed := no
35
ifeq (,$(findstring no-as-needed, $(DEB_BUILD_OPTIONS)))
36
dqk_link_with_as_needed := yes
37
export LDFLAGS += -Wl,--as-needed
41
# Set the link_with_no_undefined=no in order to disable linking with
42
# --no-undefined (default value is inherited from $(dqk_link_with_as_needed))
43
dqk_link_with_no_undefined ?= $(dqk_link_with_as_needed)
44
ifneq (,$(findstring yes, $(dqk_link_with_no_undefined)))
45
dqk_link_with_no_undefined := no
46
ifeq (,$(findstring no-no-undefined, $(DEB_BUILD_OPTIONS)))
47
dqk_link_with_no_undefined := yes
48
export LDFLAGS += -Wl,--no-undefined
52
# Since cmake 2.6.2 or higher is required from now on, enable relative paths to
53
# get more ccache hits.
54
$(call set_command_options,dh_auto_configure, += "-u-DCMAKE_USE_RELATIVE_PATHS=ON")
56
# Run dh_sameversiondep
57
run_dh_sameversiondep:
59
$(foreach t,$(dhmk_binary_targets),pre_$(t)_dh_gencontrol): run_dh_sameversiondep
61
debian/stamp-man-pages:
62
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
63
for f in $$(find debian/man -name '*.sgml'); do \
64
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
66
for f in $$(find debian/man -name '*.man'); do \
67
soelim -I debian/man $$f \
68
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
70
touch debian/stamp-man-pages
71
$(foreach t,build-arch build-indep build,post_$(t)_dh_auto_build): debian/stamp-man-pages
76
rm -f debian/stamp-man-pages
77
post_clean: cleanup_manpages
79
# Install files to $(dqk_sourcepkg)-doc-html package if needed
80
dqk_doc-html_dir = $(CURDIR)/debian/$(dqk_sourcepkg)-doc-html
81
install_to_doc-html_package:
83
if [ -d "$(dqk_doc-html_dir)" ]; then \
84
for doc in `cd $(dqk_destdir)/usr/share/doc/kde/HTML/en; find . -name index.docbook`; do \
85
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
86
echo Building $$pkg HTML docs...; \
87
mkdir -p $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
88
cd $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
89
meinproc4 $(dqk_destdir)/usr/share/doc/kde/HTML/en/$$pkg/index.docbook; \
91
for pkg in $(DOC_HTML_PRUNE) ; do \
92
rm -rf $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
95
$(foreach t,install-indep install,post_$(t)_dh_install): install_to_doc-html_package
97
.PHONY: run_dh_sameversiondep cleanup_manpages install_to_doc-html_package
99
endif # ifneq ($(dhmk_override_info_mode),yes)
100
endif # ifndef dqk_dir