[med-svn] r14137 - trunk/packages/freemedforms-project/trunk/debian

Eric Maeker ericmaeker-guest at alioth.debian.org
Wed Jul 10 16:41:25 UTC 2013


Author: ericmaeker-guest
Date: 2013-07-10 16:41:25 +0000 (Wed, 10 Jul 2013)
New Revision: 14137

Added:
   trunk/packages/freemedforms-project/trunk/debian/freemedforms-wrapper.sh
Modified:
   trunk/packages/freemedforms-project/trunk/debian/changelog
   trunk/packages/freemedforms-project/trunk/debian/freediams.install
   trunk/packages/freemedforms-project/trunk/debian/freemedforms-emr.install
   trunk/packages/freemedforms-project/trunk/debian/freemedforms-libs.install
   trunk/packages/freemedforms-project/trunk/debian/rules
Log:
freemedforms: managing archDep, removed rpath (tested)

Modified: trunk/packages/freemedforms-project/trunk/debian/changelog
===================================================================
--- trunk/packages/freemedforms-project/trunk/debian/changelog	2013-07-10 07:11:11 UTC (rev 14136)
+++ trunk/packages/freemedforms-project/trunk/debian/changelog	2013-07-10 16:41:25 UTC (rev 14137)
@@ -5,6 +5,10 @@
     * remove Qt translation files from the installation
   * debian/watchfile:
     * improved thanks to Bart Martens <bartm at debian.org>
+  * debian/{rules,*install}: 
+    * managing MutliArch build
+  * debian/{rules,freemedforms-wrapper.sh}
+    * removing rpath, adding a bin wrapper to set the LD_LIBRARY_PATH
 
   [ Andreas Tille ]
   * debian/rules: use xz compression

Modified: trunk/packages/freemedforms-project/trunk/debian/freediams.install
===================================================================
--- trunk/packages/freemedforms-project/trunk/debian/freediams.install	2013-07-10 07:11:11 UTC (rev 14136)
+++ trunk/packages/freemedforms-project/trunk/debian/freediams.install	2013-07-10 16:41:25 UTC (rev 14137)
@@ -1,4 +1,4 @@
-usr/bin/freediams
-usr/lib/freediams
+usr/bin/freediams*
+usr/lib/*/freediams
 usr/share/applications/freediams.desktop
 usr/share/pixmaps/freediams.svg

Modified: trunk/packages/freemedforms-project/trunk/debian/freemedforms-emr.install
===================================================================
--- trunk/packages/freemedforms-project/trunk/debian/freemedforms-emr.install	2013-07-10 07:11:11 UTC (rev 14136)
+++ trunk/packages/freemedforms-project/trunk/debian/freemedforms-emr.install	2013-07-10 16:41:25 UTC (rev 14137)
@@ -1,5 +1,5 @@
-usr/bin/freemedforms
-usr/lib/freemedforms
+usr/bin/freemedforms*
+usr/lib/*/freemedforms
 usr/share/applications/freemedforms.desktop
 usr/share/pixmaps/freemedforms.svg
 

Modified: trunk/packages/freemedforms-project/trunk/debian/freemedforms-libs.install
===================================================================
--- trunk/packages/freemedforms-project/trunk/debian/freemedforms-libs.install	2013-07-10 07:11:11 UTC (rev 14136)
+++ trunk/packages/freemedforms-project/trunk/debian/freemedforms-libs.install	2013-07-10 16:41:25 UTC (rev 14137)
@@ -1,2 +1,2 @@
-usr/lib/freemedforms-common
+usr/lib/*/freemedforms-common
 

Added: trunk/packages/freemedforms-project/trunk/debian/freemedforms-wrapper.sh
===================================================================
--- trunk/packages/freemedforms-project/trunk/debian/freemedforms-wrapper.sh	                        (rev 0)
+++ trunk/packages/freemedforms-project/trunk/debian/freemedforms-wrapper.sh	2013-07-10 16:41:25 UTC (rev 14137)
@@ -0,0 +1,79 @@
+#!/bin/sh
+#/***************************************************************************
+# *  The FreeMedForms project is a set of free, open source medical         *
+# *  applications.                                                          *
+# *  (C) 2008-2013 by Eric MAEKER, MD (France) <eric.maeker at gmail.com>      *
+# *  All rights reserved.                                                   *
+# *  License of this file: BSD-3 clause                                     *
+# ***************************************************************************/
+#/***************************************************************************
+# *   Main developers : Eric MAEKER, <eric.maeker at gmail.com>                *
+# *  Contributors:                                                          *
+# *       NAME <MAIL at ADDRESS.COM>                                           *
+# *       NAME <MAIL at ADDRESS.COM>                                           *
+# ***************************************************************************/
+#
+#/***************************************************************************
+# * This code was adapted from the QtCreator source                         *
+# ***************************************************************************
+# * The wrapper sets the LD_LIBRARY_PATH to the correct path when running   *
+# * linux-integrated release build on a linux system.                       *
+# ***************************************************************************/
+
+BINARY="freemedforms.bin"
+PLUGINS_PATH="freemedforms"
+APPLICATION_NAME="FreeMedForms"
+
+# Check if the freemedforms binary is a linux-integrated & a release build
+checkFreeMedFormsBuild()
+{
+    if `/usr/bin/$BINARY -v` | grep -q "Release (Linux Integrated)"; then
+        echo "Found $APPLICATION_NAME binary"
+    else
+        echo "The installed $APPLICATION_NAME binary (in /usr/bin) is not a correct version. You cannot use this wrapper to run your version of $APPLICATION_NAME"
+        return 1;
+    fi
+}
+
+# If the binary is a link, follow it
+makeAbsolute() {
+    case $1 in
+        /*)
+            # already absolute, return it
+            echo "$1"
+            ;;
+        *)
+            # relative, prepend $2 made absolute
+            echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,'
+            ;;
+    esac
+}
+
+me=`which "$0"` # Search $PATH if necessary
+if test -L "$me"; then
+    # Try readlink(1)
+    readlink=`type readlink 2>/dev/null` || readlink=
+    if test -n "$readlink"; then
+        # We have readlink(1), so we can use it. Assuming GNU readlink (for -f).
+        me=`readlink -nf "$me"`
+    else
+        # No readlink(1), so let's try ls -l
+        me=`ls -l "$me" | sed 's/^.*-> //'`
+        base=`dirname "$me"`
+        me=`makeAbsolute "$me" "$base"`
+    fi
+fi
+
+checkFreeMedFormsBuild
+
+# Prepare paths
+bindir=`dirname "$me"`
+LIB_DIR="/usr/lib/freemedforms-common"
+PLUG_DIR="/usr/lib/$PLUGINS_PATH"
+
+# Define the LD_LIBRARY_PATH
+LD_LIBRARY_PATH=$LIB_DIR:$PLUG_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH
+
+# Launch application
+exec "/usr/bin/$BINARY" ${1+"$@"}

Modified: trunk/packages/freemedforms-project/trunk/debian/rules
===================================================================
--- trunk/packages/freemedforms-project/trunk/debian/rules	2013-07-10 07:11:11 UTC (rev 14136)
+++ trunk/packages/freemedforms-project/trunk/debian/rules	2013-07-10 16:41:25 UTC (rev 14137)
@@ -31,7 +31,7 @@
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 QMAKE:=qmake-qt4
-QMAKE_GLOBAL_CONFIG:="CONFIG+=LINUX_INTEGRATED" "CONFIG+=dontbuildquazip" # "CONFIG+=norpath" # LIBRARY_BASENAME="lib/$(DEB_HOST_MULTIARCH)"
+QMAKE_GLOBAL_CONFIG:="CONFIG+=LINUX_INTEGRATED" "CONFIG+=dontbuildquazip" "CONFIG+=norpath" 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
@@ -53,6 +53,10 @@
 	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
@@ -79,9 +83,19 @@
 	# 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_shlibdeps:
-#	dh_shlibdeps -l$(CURDIR)/debian/tmp/usr/lib/freemedforms-common:$(CURDIR)/debian/tmp/usr/lib/freemedforms:$(CURDIR)/debian/tmp/usr/lib/freediams
+	# Install the bin wrappers
+	mv $(CURDIR)/debian/tmp/usr/bin/freemedforms $(CURDIR)/debian/tmp/usr/bin/freemedforms.bin
+	mv $(CURDIR)/debian/tmp/usr/bin/freediams $(CURDIR)/debian/tmp/usr/bin/freediams.bin
+	cp -a global_resources/package_helpers/freemedforms-wrapper.sh $(CURDIR)/debian/tmp/usr/bin/freemedforms
+	chmod 555 $(CURDIR)/debian/tmp/usr/bin/freemedforms
+	cp -a global_resources/package_helpers/freemedforms-wrapper.sh $(CURDIR)/debian/tmp/usr/bin/freediams
+	sed -i "s/\"freemedforms/\"freediams/" $(CURDIR)/debian/tmp/usr/bin/freediams
+	sed -i "s/\"FreeMedForms/\"FreeDiams/" $(CURDIR)/debian/tmp/usr/bin/freediams
+	chmod 555 $(CURDIR)/debian/tmp/usr/bin/freediams
 
+override_dh_shlibdeps:
+	dh_shlibdeps -l$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/freemedforms-common:$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/freemedforms:$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/freediams
+
 override_dh_builddeb:
 	dh_builddeb -- -Z xz
 




More information about the debian-med-commit mailing list