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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
#!/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)
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
|