File: rules

package info (click to toggle)
kdevelop 4%3A5.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 57,892 kB
  • sloc: cpp: 278,773; javascript: 3,558; python: 3,385; sh: 1,317; ansic: 689; xml: 273; php: 95; makefile: 40; lisp: 13; sed: 12
file content (39 lines) | stat: -rwxr-xr-x 1,420 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

# from the top-level CMakeLists.txt
export KDEV_PLUGIN_VERSION=34

# The list of architectures (expanded, without wildcards) that do not use clang
no_clang_args = alpha hppa ia64 kfreebsd-amd64 kfreebsd-i386 m68k sh4 x32
ifeq (,$(filter $(DEB_HOST_ARCH), $(no_clang_args)))
# The clang-N used for the build by the unversioned clang
current_clang_pkg = $(shell dpkg -S "$(shell realpath $(shell env PATH=$$(echo "$$PATH" | sed -r -e 's|/usr/lib/ccache/?:||') which clang))" | cut -d: -f1)
# The upstream version of a package passed as parameter
upstream_version_of_pkg = $(shell dpkg-query -f '$${Version}' -W $(1) | sed -e 's/-[^-]*$$//')
# The clang dependency string
clang_dependency = $(current_clang_pkg) (>= $(call upstream_version_of_pkg,$(current_clang_pkg))~)
else
clang_dependency =
endif

%:
	dh $@ --with kf5

override_dh_auto_configure:
	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF

execute_after_dh_auto_install:
	# create this directory if not existing, so kdevelop-data.install
	# is the same, no matter whether clang is built
	mkdir -p debian/tmp/usr/share/kdevclangsupport/
	# not useful source documentation
	rm debian/tmp/usr/share/kdevqmljssupport/propertywidgets/README

override_dh_gencontrol:
	dh_gencontrol -- -V'kdevelop:clang=$(clang_dependency)'

.PHONY: override_dh_auto_test