summaryrefslogtreecommitdiffstats
path: root/devices/maemo5/debian/rules
blob: 7b8bb7220a79b48adc67264d4dac5d8464ef4f2f (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
#!/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 -)
# cp -f ~/depot/qt/quick3d/devices/maemo5/debian/* quick3d-tp1/debian/.
#
# cd quick3d-tp1
# export DEB_BUILD_OPTIONS="parallel=4"
# fakeroot 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

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 -spec linux-g++-maemo5 qt3d.pro CONFIG+=maemo CONFIG+=package

common-install-arch:: install-desktop-items

install-desktop-items:
	mkdir -p $(DEB_DESTDIR)/usr/share/pixmaps
	find examples -name "icon-l*.png" -exec cp {} $(DEB_DESTDIR)/usr/share/pixmaps \;
	mkdir -p $(DEB_DESTDIR)/usr/share/applications/hildon
	find examples -name "m5-*.desktop" -exec cp {} $(DEB_DESTDIR)/usr/share/applications/hildon \;