#!/usr/bin/make -f # (c) 2011-2013, Eric Maeker, MD (fr), The FreeMedForms project # This code is released under the BSD 3 clause license #-------------------------------------------------------------------- # Comments on the updates: #-------------------------------------------------------------------- # Updating from 0.9.0-2 to 0.9.2 # Using qtchooser and QT_VERSION system var to force a specific Qt version build # # Updating from 0.8.2 to 0.9.0 # The optional plugins and features can now be defined in the # buildspecs/optionalplugins.pri # buildspecs/optionalfeatures.pri # You can edit these files and modify the plugins/features you want to build/ignore. # # The qmake command line is then shortened to # qmake -r {spec} {release config} {LinuxIntegratedConfigFlag if required} {libs tags} {project_file} # Find the documentation of the new build process here # http://www.freemedforms.com/en/code/buildsystem # # FreeAccount is now obsolete as unmaintained. #-------------------------------------------------------------------- # Updating form 0.7.x to 0.8.x # The new build system of the FreeMedForms project (0.8+) creates the # buildpsecs/compiling.pri # during the qmake step. This file differs from apps to apps, so we need # cache it and reuse it before doing any make steps. #-------------------------------------------------------------------- # vars FREEMEDFORMS_EMR:=freemedforms FREEDIAMS:=freediams DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export DEB_BUILD_MAINT_OPTIONS = hardening=+all QT_VERSION=qt4 QMAKE_GLOBAL_CONFIG:="CONFIG+=LINUX_INTEGRATED" \ "CONFIG+=dontbuildquazip" \ LIBRARY_BASENAME="lib/$(DEB_HOST_MULTIARCH)" QMAKE_SUBPROJECT_CONFIG:="CONFIG+=dontbuildlibs" \ "CONFIG+=dontinstallresources" \ "CONFIG+=dontinstalllibs" QMAKE_IPATH:="INSTALL_ROOT_PATH=/usr/" QMAKE_COMPILING:=buildspecs/compiling.pri # func AUTOCONF_MAIN = -r $(QMAKE_GLOBAL_CONFIG) $(QMAKE_IPATH) $(1).pro AUTOCONF_SUB = -r $(QMAKE_GLOBAL_CONFIG) $(QMAKE_SUBPROJECT_CONFIG) $(QMAKE_IPATH) $(1).pro %: dh $@ --parallel --buildsystem=qmake # --dbg-package=freemedforms-project-dbg override_dh_auto_configure: QT_SELECT=$(QT_VERSION) \ lrelease global_resources/translations/*.ts QT_SELECT=$(QT_VERSION) \ dh_auto_configure -D$(FREEMEDFORMS_EMR) -- $(call AUTOCONF_MAIN, $(FREEMEDFORMS_EMR)) $(extra_configure_opts) cp $(QMAKE_COMPILING) build/$(FREEMEDFORMS_EMR).pri QT_SELECT=$(QT_VERSION) \ dh_auto_configure -D$(FREEDIAMS) -- $(call AUTOCONF_SUB, $(FREEDIAMS)) $(extra_configure_opts) cp $(QMAKE_COMPILING) build/$(FREEDIAMS).pri override_dh_auto_clean: # DEFINE affected files #rm -f build/Qt*/FreeMedForms/Utils/.obj/unix/global.o #rm -f build/Qt*/FreeMedForms/freemedforms/.obj/unix/main.o #rm -f build/Qt*/FreeMedForms/Core/.obj/unix/*settings*.o rm -Rf bin rm -Rf build rm -f global_resources/translations/[a-ps-z]*.qm QT_SELECT=$(QT_VERSION) \ dh_auto_clean find . -name Makefile -delete override_dh_auto_build: cp build/$(FREEMEDFORMS_EMR).pri $(QMAKE_COMPILING) QT_SELECT=$(QT_VERSION) \ dh_auto_build -D$(FREEMEDFORMS_EMR) cp build/$(FREEDIAMS).pri $(QMAKE_COMPILING) QT_SELECT=$(QT_VERSION) \ dh_auto_build -D$(FREEDIAMS) override_dh_auto_install: cp build/$(FREEMEDFORMS_EMR).pri $(QMAKE_COMPILING) QT_SELECT=$(QT_VERSION) \ dh_auto_install -D$(FREEMEDFORMS_EMR)/$(FREEMEDFORMS_EMR)-src -Smakefile -- INSTALL_ROOT=$(CURDIR)/debian/tmp cp build/$(FREEDIAMS).pri $(QMAKE_COMPILING) QT_SELECT=$(QT_VERSION) \ dh_auto_install -D$(FREEDIAMS)/$(FREEDIAMS)-src -Smakefile -- INSTALL_ROOT=$(CURDIR)/debian/tmp # Remove empty dirs find $(CURDIR)/debian/tmp/usr/share -type d -empty -delete # Remove Qt translation files (FreeMedForms will use the Qt system translation files) find $(CURDIR)/debian/tmp/usr/share/freemedforms/translations -name "qt*.qm" -delete #override_dh_makeshlibs: # Try to fix lintian warnings (untested): # W: freemedforms-libs: postinst-has-useless-call-to-ldconfig # W: freemedforms-libs: postrm-has-useless-call-to-ldconfig # Exclude the freemedforms libs path # dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/freemedforms-common override_dh_builddeb: dh_builddeb -- -Z xz get-orig-source: mkdir -p ../tarballs uscan --verbose --force-download --destdir=../tarballs