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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
TMP_BUILD_OPTS = $(subst $(comma),$(space),$(DEB_BUILD_OPTIONS))
MAKEDEMOS = 1
ifneq (,$(filter parallel=%,$(TMP_BUILD_OPTS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(TMP_BUILD_OPTS)))
PARALLEL_MAKEFLAGS += -j$(NUMJOBS)
endif
# Disable building of demos by setting DEB_BUILD_OPTION=nodemos,...
ifneq (,$(filter nodemos,$(TMP_BUILD_OPTS)))
#No demos
EXCLUSIONS += --no-package=qmlshadersplugin-demos
EXCLUSIONS += --no-package=qmlshadersplugin-demos-dbg
MAKEDEMOS = 0
endif
QMAKE_OPTIONS += CONFIG+=release
# Add debug symbols to release configuration, and prevent make to strip them
# (these are later stripped from binaries into dbg package with dh_strip).
QMAKE_OPTIONS += QMAKE_CXXFLAGS_RELEASE+=-g
QMAKE_OPTIONS += QMAKE_STRIP=echo
build: build-stamp
build-stamp:
dh_testdir
qmake -r $(QMAKE_OPTIONS) ./qmlshadersplugin.pro
+$(MAKE) $(PARALLEL_MAKEFLAGS)
ifneq (0,$(MAKEDEMOS))
qmake -r $(QMAKE_OPTIONS) ./demos.pro -o Makefile_demos
+$(MAKE) $(PARALLEL_MAKEFLAGS) -f Makefile_demos
endif
touch $@
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
# FIXME check if dh_prep is available for maemo5 - N900 to replace deprecated dh_clean -k
dh_clean -k
dh_installdirs
INSTALL_ROOT=$(CURDIR)/debian/tmp $(MAKE) install
ifneq (0,$(MAKEDEMOS))
INSTALL_ROOT=$(CURDIR)/debian/tmp $(MAKE) -f Makefile_demos install
endif
touch $@
clean:
dh_testdir
dh_testroot
$(MAKE) distclean -f Makefile || true
$(MAKE) distclean -f Makefile_demos || true
dh_clean build-stamp install-stamp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir $(EXCLUSIONS)
+./debian/configure_package_install_files
dh_testroot $(EXCLUSIONS)
dh_installchangelogs $(EXCLUSIONS)
dh_installdocs $(EXCLUSIONS)
dh_install --sourcedir=debian/tmp/ $(EXCLUSIONS) -v
# print warnings for not installed files
dh_install --sourcedir=debian/tmp/ $(EXCLUSIONS) --list-missing
dh_link $(EXCLUSIONS)
dh_strip -p qmlshadersplugin --dbg-package=qmlshadersplugin-dbg
ifneq (0,$(MAKEDEMOS))
dh_strip -p qmlshadersplugin-demos --dbg-package=qmlshadersplugin-demos-dbg
endif
dh_compress $(EXCLUSIONS)
dh_fixperms $(EXCLUSIONS)
dh_makeshlibs $(EXCLUSIONS)
dh_installdeb $(EXCLUSIONS)
dh_shlibdeps $(EXCLUSIONS)
dh_gencontrol $(EXCLUSIONS)
dh_md5sums $(EXCLUSIONS)
dh_builddeb $(EXCLUSIONS)
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|