diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ee1eef2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,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) + +$(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 + |