[med-svn] [plast] 03/04: Move to git since we remove a pcre code copy and use Debian packaged pcre; add auto_test

Andreas Tille tille at debian.org
Tue Feb 9 17:30:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository plast.

commit 9b69eb80c7036af30d0f9a281db07c232f51cf90
Author: Andreas Tille <tille at debian.org>
Date:   Tue Feb 9 16:17:14 2016 +0100

    Move to git since we remove a pcre code copy and use Debian packaged pcre; add auto_test
---
 debian/control                                |  5 +++--
 debian/patches/adapt_auto_test_script.sh      | 27 +++++++++++++++++++++++++++
 debian/patches/no_msse3.patch                 | 15 +++++++++++++++
 debian/patches/series                         |  3 +++
 debian/patches/use_debian_packaged_pcre.patch | 26 ++++++++++++++++++++++++++
 debian/rules                                  | 19 ++++++-------------
 6 files changed, 80 insertions(+), 15 deletions(-)

diff --git a/debian/control b/debian/control
index 1fbc4c8..31e857c 100644
--- a/debian/control
+++ b/debian/control
@@ -5,10 +5,11 @@ Section: science
 Priority: optional
 Build-Depends: debhelper (>= 9),
                cmake,
+               libpcre3-dev,
                default-jdk
 Standards-Version: 3.9.7
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/plast/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/plast/trunk/
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/plast.git
+Vcs-Git: https://anonscm.debian.org/debian-med/plast.git
 Homepage: https://plast.inria.fr/
 
 Package: plast
diff --git a/debian/patches/adapt_auto_test_script.sh b/debian/patches/adapt_auto_test_script.sh
new file mode 100644
index 0000000..fe29ab9
--- /dev/null
+++ b/debian/patches/adapt_auto_test_script.sh
@@ -0,0 +1,27 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 09 Feb 2016 10:20:36 +0100
+Description: Adapt test script to Debian installation
+
+--- a/scripts/test-plast.sh
++++ b/scripts/test-plast.sh
+@@ -15,14 +15,17 @@
+ # *****************************************************************************/
+ 
+ # We get the directory of the script (absolute path)
+-_scripts_dir=$( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P )
+-_result=$_scripts_dir/out.txt
++#_scripts_dir=$( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P )
++BUILD_DIR=obj-$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
++DATA_DIR=$(pwd)/db
++_script=`find $(pwd)/obj-x86_64-linux-gnu/bin -name plast -executable`
++_result=`dirname $_script`/out.txt
+ 
+ echo "Start PLAST..."
+ echo
+ 
+ # We setup a PLAST command-line and run it to test the software
+-_cmdline="$_scripts_dir/../build/bin/plast -p plastp -i $_scripts_dir/../db/query.fa -d $_scripts_dir/../db/tursiops.fa -o $_result"
++_cmdline="$_script -p plastp -i ${DATA_DIR}/query.fa -d ${DATA_DIR}/tursiops.fa -o $_result"
+ 
+ echo $_cmdline
+ 
diff --git a/debian/patches/no_msse3.patch b/debian/patches/no_msse3.patch
new file mode 100644
index 0000000..0692376
--- /dev/null
+++ b/debian/patches/no_msse3.patch
@@ -0,0 +1,15 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 09 Feb 2016 10:20:36 +0100
+Description: Do not explicitly force sse3 for portability reasons
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,7 +40,7 @@ file (GLOB_RECURSE  PlastCmdFiles      s
+ ################################################################################
+ # prepare targets
+ ################################################################################
+-add_definitions       (-O3 -funroll-loops  -fomit-frame-pointer  -msse3)
++add_definitions       (-O3 -funroll-loops  -fomit-frame-pointer )
+ include_directories   (${PROJECT_BINARY_DIR}/include  ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+ add_library           (PlastLibrary SHARED  ${PlastLibraryFiles} )
+ add_executable        (plast ${PlastCmdFiles})
diff --git a/debian/patches/series b/debian/patches/series
index bfe0e35..4029ba8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
+use_debian_packaged_pcre.patch
 fix_format_string.patch
+adapt_auto_test_script.sh
+no_msse3.patch
diff --git a/debian/patches/use_debian_packaged_pcre.patch b/debian/patches/use_debian_packaged_pcre.patch
new file mode 100644
index 0000000..0b26af9
--- /dev/null
+++ b/debian/patches/use_debian_packaged_pcre.patch
@@ -0,0 +1,26 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 09 Feb 2016 10:20:36 +0100
+Description: Use Debian packaged pcre lib instead of internal code copy
+
+--- a/src/alignment/filter/impl/AlignmentFilterOperator.hpp
++++ b/src/alignment/filter/impl/AlignmentFilterOperator.hpp
+@@ -28,7 +28,7 @@
+ #include <alignment/filter/api/IAlignmentFilter.hpp>
+ #include <designpattern/impl/Property.hpp>
+ #include <stdarg.h>
+-#include <pcre/pcre.h>
++#include <pcre.h>
+ 
+ /********************************************************************************/
+ namespace alignment {
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,7 @@ add_definitions       (-O3 -funroll-loop
+ include_directories   (${PROJECT_BINARY_DIR}/include  ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+ add_library           (PlastLibrary SHARED  ${PlastLibraryFiles} )
+ add_executable        (plast ${PlastCmdFiles})
+-target_link_libraries (plast pthread)
++target_link_libraries (plast pthread pcre)
+ 
+ ################################################################################
+ # OS specific stuffs
diff --git a/debian/rules b/debian/rules
index fdcee94..4bd8896 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,18 +2,8 @@
 
 # DH_VERBOSE := 1
 
-# some helpful variables - uncomment them if needed
-# shamelessly stolen from http://jmtd.net/log/awk/
-#DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
-#VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
-#DEBFLAVOR      := $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
-DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-#DEBIAN_BRANCH  := $(shell awk 'BEGIN{FS="[= ]+"} /debian-branch/ {print $$2}' debian/gbp.conf)
-#GIT_TAG        := $(subst ~,_,$(VERSION))
-
-# alternatively to manually set those variables, you can
-#  include /usr/share/dpkg/default.mk
-# and use what is set there.
+DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
 %:
 	dh $@ --buildsystem=cmake
@@ -21,6 +11,9 @@ DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
 override_dh_install:
 	dh_install
 	# install binary
-	cp -a */bin/*/plast debian/$(DEBPKGNAME)/usr/lib/$(DEBPKGNAME)/bin
+	cp -a $(BUILD_DIR)/bin/*/plast debian/$(DEBPKGNAME)/usr/lib/$(DEBPKGNAME)/bin
 	# no need for the includes
 	rm -rf debian/*/usr/include
+
+override_dh_auto_test:
+	scripts/test-plast.sh
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/plast.git



More information about the debian-med-commit mailing list