File: rules

package info (click to toggle)
qtwebkit-opensource-src 5.3.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 291,876 kB
  • ctags: 268,746
  • sloc: cpp: 1,358,098; python: 70,286; ansic: 42,964; perl: 35,473; ruby: 12,229; objc: 9,465; xml: 8,396; asm: 3,871; yacc: 2,397; sh: 1,647; makefile: 644; lex: 644; java: 110
file content (74 lines) | stat: -rwxr-xr-x 2,916 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
export QT_SELECT := qt5

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

gstab_architectures := amd64 i386 powerpc s390x
fulldebug_architectures := none
disabled_jit_architectures := armel mips mipsel

%:
	dh $@ --parallel --dbg-package=libqt5webkit5-dbg --with pkgkde_symbolshelper

override_dh_auto_configure:
	# Run qmake once to create .qmake.conf and be sure to append the following values.
	qmake

# Enable gstabs debugging symbols only on gstab_architectures.
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gstab_architectures)))
	echo "QMAKE_CXXFLAGS -= -g" >> .qmake.conf
	echo "QMAKE_CXXFLAGS += -gstabs" >> .qmake.conf
# Enable normal debugging symbols only on fulldebug_architectures.
else ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(fulldebug_architectures)))
	echo "QMAKE_CXXFLAGS += -g" >> .qmake.conf
else
# Disable debugging symbols in all the other archs.
	echo "QMAKE_CXXFLAGS -= -g" >> .qmake.conf
	echo "QMAKE_CXXFLAGS -= -gstabs" >> .qmake.conf
endif

# Disable JIT on selected architectures
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(disabled_jit_architectures)))
	echo "QMAKE_CXXFLAGS += -DENABLE_JIT=0" >> .qmake.conf
endif

	# Run qmake again now with the proper values.
	qmake

override_dh_auto_build-indep:
	dh_auto_build -Smakefile -- html_docs

override_dh_auto_install-arch:
	make install INSTALL_ROOT=$(CURDIR)/debian/tmp
	
	# Remove rpath from the offending binaries
	chrpath -d $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/libexec/QtWebProcess
	chrpath -d $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/libexec/QtWebPluginProcess
	
	# Fix wrong path in pkgconfig files
	find $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig -type f -name '*.pc' \
	-exec sed -i -e 's/$(DEB_HOST_MULTIARCH)\/$(DEB_HOST_MULTIARCH)/$(DEB_HOST_MULTIARCH)/g' {} \;
	
	# Remove private headers
	rm -rf debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/qt5/QtWebKit/*/QtWebKit
	rm -rf debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/qt5/QtWebKitWidgets/*/QtWebKitWidgets
	# And associated files
	rm -fv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/mkspecs/modules/qt_lib_webkit_private.pri
	rm -fv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/mkspecs/modules/qt_lib_webkitwidgets_private.pri
	
	# Remove libtool-like files
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la

override_dh_auto_install-indep:
	make INSTALL_ROOT=$(CURDIR)/debian/tmp install_html_docs

override_dh_install:
	dh_install --fail-missing