~mitya57/pkg-kde-tools/0.15.16ubuntu1

« back to all changes in this revision

Viewing changes to qt-kde-team/2/debian-qt-kde.mk

  • Committer: Bazaar Package Importer
  • Author(s): Modestas Vainius
  • Date: 2011-05-24 12:28:48 UTC
  • mfrom: (0.1.34 sid)
  • Revision ID: james.westby@ubuntu.com-20110524122848-rypmzvzs1x7fwvnq
Tags: 0.13.1
* Fix sections libdlrestrictions1 and libdlrestrictions-dev (libs and
  libdevel respectively).
* Bump Standards-Version to 3.9.2: no changes needed.
* Relicense DLRestrictions under less troublesome LGPLv2.1.
* While installing, preserve source permissions of files in cmake, makefiles,
  qt-kde-team and some other directories. This solves unexecutable scripts
  problem.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ifndef dqk_dir
 
2
 
 
3
dqk_dir := $(dir $(lastword $(MAKEFILE_LIST)))
 
4
 
 
5
# Include dhmk file
 
6
include $(dqk_dir)dhmk.mk
 
7
 
 
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)
 
11
 
 
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
 
15
 
 
16
# We want to use kde and pkgkde-symbolshelper plugins by default
 
17
dh := --with=kde,pkgkde-symbolshelper $(dh)
 
18
 
 
19
# dqk_disable_policy_check lists distributions for which policy check should be
 
20
# disabled
 
21
dqk_disable_policy_check ?=
 
22
include $(dqk_dir)policy.mk
 
23
 
 
24
# Support list-missing target
 
25
include $(dqk_dir)list-missing.mk
 
26
 
 
27
# KDE packages are parallel safe. Add --parallel to dh_auto_% commands
 
28
$(call set_command_options,dh_auto_%, += --parallel)
 
29
 
 
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
 
38
    endif
 
39
endif
 
40
 
 
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
 
49
    endif
 
50
endif
 
51
 
 
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")
 
55
 
 
56
# Run dh_sameversiondep
 
57
run_dh_sameversiondep:
 
58
        dh_sameversiondep
 
59
$(foreach t,$(dhmk_binary_targets),pre_$(t)_dh_gencontrol): run_dh_sameversiondep
 
60
 
 
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; \
 
65
        done
 
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}'`; \
 
69
        done
 
70
        touch debian/stamp-man-pages
 
71
$(foreach t,build-arch build-indep build,post_$(t)_dh_auto_build): debian/stamp-man-pages
 
72
 
 
73
cleanup_manpages:
 
74
        rm -rf debian/man/out
 
75
        -rmdir debian/man
 
76
        rm -f debian/stamp-man-pages
 
77
post_clean: cleanup_manpages
 
78
 
 
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:
 
82
        set -e; \
 
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; \
 
90
            done; \
 
91
            for pkg in $(DOC_HTML_PRUNE) ; do \
 
92
                rm -rf $(dqk_doc-html_dir)/usr/share/doc/kde/HTML/en/$$pkg; \
 
93
            done; \
 
94
        fi
 
95
$(foreach t,install-indep install,post_$(t)_dh_install): install_to_doc-html_package
 
96
 
 
97
.PHONY: run_dh_sameversiondep cleanup_manpages install_to_doc-html_package
 
98
 
 
99
endif # ifneq ($(dhmk_override_info_mode),yes)
 
100
endif # ifndef dqk_dir