summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 2ed9da76fe56b8709e674091788675b3aabac214 (plain)
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
#!/usr/bin/make -f
# -*- makefile -*-

# To build using this rules file:
# #
# ### install debian packaging stuff if not already present:
# sudo apt-get install dpkg-dev debhelper cdbs
#
# ### set up the build directory with version number - DO NOT CD INTO IT YET!
# mkdir quick3d-tp1
#
# ### copy all the stuff across - cannot shadow build (probably don't want git)
# (cd ~/depot/qt/quick3d && tar cf - --exclude-vcs .)|(cd quick3d-tp1 && tar xf -)
#
# ### if the qmake in the $PATH is not the Qt you want to use
# ### you can use a binary package or a Qt built from source (even if its installed with
# ### "make install") as long as it has declarative & opengl
# # export PATH=/usr/local/Trolltech/Qt-4.7.2/bin:$PATH
#
# cd quick3d-tp1
# export DEB_BUILD_OPTIONS="parallel=4"
# dpkg-buildpackage -b

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

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk

# Find out how many parallel threads to run 
TMP_BUILD_OPTS = $(subst $(comma),$(space),$(DEB_BUILD_OPTIONS))
ifneq (,$(filter parallel=%,$(TMP_BUILD_OPTS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(TMP_BUILD_OPTS)))
	PARALLEL_MAKEFLAGS += -j$(NUMJOBS)
endif

ifeq (arm,$(findstring arm,$(shell g++ -v 2>&1 | sed -n '/Target: arm/p')))
	QMAKE_CONF_MKSPEC = "-spec linux-g++-maemo"
	QMAKE_CONF_OPTS = "CONFIG+=maemo"
endif

DEB_MAKE_INVOKE := $(MAKE) $(PARALLEL_MAKEFLAGS)
DEB_MAKE_INSTALL_TARGET := INSTALL_ROOT=$(DEB_DESTDIR) install
DEB_DH_INSTALL_SOURCEDIR := debian/tmp

common-configure-arch::
	qmake $(QMAKE_CONF_MKSPEC) quick3d.pro $(QMAKE_CONF_OPTS) CONFIG+=package