[med-svn] [Git][med-team/plast][master] 4 commits: debian/control: mark plast-example as Multi-Arch: foreign
Michael R. Crusoe
gitlab at salsa.debian.org
Sun Jan 31 10:26:25 GMT 2021
Michael R. Crusoe pushed to branch master at Debian Med / plast
Commits:
62cbbbd1 by Michael R. Crusoe at 2021-01-31T11:11:50+01:00
debian/control: mark plast-example as Multi-Arch: foreign
- - - - -
8fa70d88 by Michael R. Crusoe at 2021-01-31T11:12:13+01:00
debian/rules: build higher SIMD level binaries on amd64/i386
- - - - -
feb4c2cd by Michael R. Crusoe at 2021-01-31T11:12:32+01:00
routine-update: Do not parse d/changelog
- - - - -
6100467a by Michael R. Crusoe at 2021-01-31T11:12:34+01:00
routine-update: Ready to upload to unstable
- - - - -
5 changed files:
- debian/bin/plast
- debian/changelog
- debian/control
- debian/patches/adapt_auto_test_script.sh
- debian/rules
Changes:
=====================================
debian/bin/plast
=====================================
@@ -19,7 +19,30 @@
# * CECILL version 2 License for more details. *
# *****************************************************************************/
-REALPLAST=/usr/lib/plast/bin/plast
+DIR=/usr/lib/plast/bin
+EXE=${DIR}/$(basename "$0")
+REALPLAST=
+
+test_and_run () {
+ if lscpu | grep -q "$1" && [ -x "${EXE}-$1" ]; then
+ echo "Using ${EXE}-$1" 1>&2
+ REALPLAST="${EXE}-$1"
+ return
+ fi
+}
+
+
+for SIMD in sse3 sse2 ; do
+ if [ -z ${REALPLAST} ] ; then
+ test_and_run ${SIMD}
+ fi
+done
+
+if [ -z ${REALPLAST} ] ; then
+ # fallback to plain option
+ echo "Using $EXE without SIMD support" 1>&2
+ REALPLAST=/usr/lib/plast/bin/plast
+fi
usage () {
$REALPLAST -h
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+plast (2.3.2+dfsg-7) unstable; urgency=medium
+
+ * Team upload.
+ * debian/control: mark plast-example as Multi-Arch: foreign
+ * debian/rules: build higher SIMD level binaries on amd64/i386
+ * Do not parse d/changelog (routine-update)
+
+ -- Michael R. Crusoe <crusoe at debian.org> Sun, 31 Jan 2021 11:11:00 +0100
+
plast (2.3.2+dfsg-6) unstable; urgency=medium
* Team Upload.
=====================================
debian/control
=====================================
@@ -33,6 +33,7 @@ Description: Parallel Local Sequence Alignment Search Tool
Package: plast-example
Architecture: all
+Multi-Arch: foreign
Depends: ${misc:Depends}
Description: Parallel Local Sequence Alignment Search Tool (example data)
PLAST is a fast, accurate and NGS scalable bank-to-bank sequence
=====================================
debian/patches/adapt_auto_test_script.sh
=====================================
@@ -1,19 +1,19 @@
Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 09 Feb 2016 10:20:36 +0100
+Last-Update: 2021-01-30
Description: Adapt test script to Debian installation
-
---- a/scripts/test-plast.sh
-+++ b/scripts/test-plast.sh
-@@ -17,15 +17,17 @@
+Forwarded: no
+--- plast.orig/scripts/test-plast.sh
++++ plast/scripts/test-plast.sh
+@@ -17,26 +17,28 @@
# *****************************************************************************/
# We get the directory of the script (absolute path)
-_scripts_dir=$( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P )
-_result=$_scripts_dir/out.txt
-+BUILD_DIR=obj-$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
++BUILD_DIR=${1:-obj-$(dpkg-architecture -qDEB_HOST_GNU_TYPE)}
+DATA_DIR=$(pwd)/db
-+_script=`find $(pwd)/obj-*/bin -name plast -executable`
-+_result=`dirname $_script`/out.txt
++_script=$(find "${BUILD_DIR}"/bin -name plast -executable)
++_result=$(dirname "$_script")/out.txt
echo
echo "Start PLAST..."
@@ -23,5 +23,24 @@ Description: Adapt test script to Debian installation
-_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
+-echo $_cmdline
++echo "$_cmdline"
+ eval $_cmdline
+
+-if [ ! -e $_result ] ; then
++if [ ! -e "$_result" ] ; then
+ echo "/!\ Error: PLAST fails on your system: result file does not exist: $_result"
+ exit 1
+ fi
+
+-if [ ! -s $_result ]; then
++if [ ! -s "$_result" ]; then
+ echo "/!\ Error: PLAST fails on your system: result file is empty: $_result"
+ exit 1
+ fi
+@@ -44,4 +46,3 @@
+ echo
+ echo "*** SUCCESS: result file is: $_result"
+ echo
+-
=====================================
debian/rules
=====================================
@@ -5,19 +5,60 @@
include /usr/share/dpkg/default.mk
BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-BUILD_DATE := $(shell TZ=UTC LC_ALL=C dpkg-parsechangelog | grep Date: | cut -d' ' -f2-7)
-export BDATE=$(shell TZ=UTC LC_ALL=C date -d"$(BUILD_DATE)" +'%Y-%m-%d')
+export BDATE=$(shell TZ=UTC LC_ALL=C date -d"@$(SOURCE_DATE_EPOCH)" +'%Y-%m-%d')
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
export DEB_CXXFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
+AMD64_SIMDE=sse3
+I386_SIMDE=sse2 sse
+
%:
dh $@ --buildsystem=cmake
+override_dh_auto_configure-arch:
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
+ set -e ; for SIMD in $(AMD64_SIMDE) ; do \
+ export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
+ dh_auto_configure --builddirectory=obj-$${SIMD} ; \
+ done
+ifeq (i386,$(DEB_HOST_ARCH))
+ set -e ; for SIMD in $(I386_SIMDE) ; do \
+ export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
+ dh_auto_configure --builddirectory=obj-$${SIMD} ; \
+ done
+endif
+endif
+ dh_auto_configure
+
+override_dh_auto_build-arch:
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
+ set -e ; for SIMD in $(AMD64_SIMDE) ; do \
+ dh_auto_build --builddirectory=obj-$${SIMD} ; \
+ done
+ifeq (i386,$(DEB_HOST_ARCH))
+ set -e ; for SIMD in $(I386_SIMDE) ; do \
+ dh_auto_build --builddirectory=obj-$${SIMD} ; \
+ done
+endif
+endif
+ dh_auto_build
+
+
override_dh_install-arch:
dh_install -a
# install binary
- cp -a $(BUILD_DIR)/bin/*/plast debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin
+ cp -a $(BUILD_DIR)/bin/*/plast debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin/
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
+ set -e ; for SIMD in $(AMD64_SIMDE) ; do \
+ cp -a obj-$${SIMD}/bin/*/plast debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin/plast-$${SIMD} ; \
+ done
+ifeq (i386,$(DEB_HOST_ARCH))
+ set -e ; for SIMD in $(I386_SIMDE) ; do \
+ cp -a obj-$${SIMD}/bin/*/plast debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin/plast-$${SIMD} ; \
+ done
+endif
+endif
# no need for the includes
rm -rf debian/*/usr/include
@@ -32,5 +73,17 @@ override_dh_gencontrol-arch:
override_dh_auto_test-indep:
override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
+ set -e ; for SIMD in $(AMD64_SIMDE) ; do \
+ if lscpu | grep -q $${SIMD} ; then \
+ scripts/test-plast.sh obj-$${SIMD} ; fi ; \
+ done
+ifeq (i386,$(DEB_HOST_ARCH))
+ set -e ; for SIMD in $(I386_SIMDE) ; do \
+ if lscpu | grep -q $${SIMD} ; then \
+ scripts/test-plast.sh obj-$${SIMD} ; fi ; \
+ done
+endif
+endif
scripts/test-plast.sh
endif
View it on GitLab: https://salsa.debian.org/med-team/plast/-/compare/4ec11946eea5b8649ca8be2fb2764b87793e1ac3...6100467a418b032b7e588a0060c76c9775cae9aa
--
View it on GitLab: https://salsa.debian.org/med-team/plast/-/compare/4ec11946eea5b8649ca8be2fb2764b87793e1ac3...6100467a418b032b7e588a0060c76c9775cae9aa
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210131/716c5649/attachment-0001.html>
More information about the debian-med-commit
mailing list