[med-svn] [e-mem] 02/02: Initial packaging

Andreas Tille tille at debian.org
Wed May 3 07:54:04 UTC 2017


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

tille pushed a commit to branch master
in repository e-mem.

commit da8acc23521b1197f39411b4fd9d85edf3d6de4e
Author: Andreas Tille <tille at debian.org>
Date:   Wed May 3 09:53:26 2017 +0200

    Initial packaging
---
 debian/README.test                   | 15 ++++++++++++
 debian/changelog                     |  5 ++++
 debian/compat                        |  1 +
 debian/control                       | 24 +++++++++++++++++++
 debian/copyright                     | 26 ++++++++++++++++++++
 debian/createmanpages                | 22 +++++++++++++++++
 debian/docs                          |  5 ++++
 debian/e-mem.1                       | 46 ++++++++++++++++++++++++++++++++++++
 debian/get-orig-source               | 20 ++++++++++++++++
 debian/install                       |  1 +
 debian/manpages                      |  1 +
 debian/patches/fix_test_script.patch | 30 +++++++++++++++++++++++
 debian/patches/hardening.patch       | 24 +++++++++++++++++++
 debian/patches/series                |  2 ++
 debian/rules                         | 14 +++++++++++
 debian/source/format                 |  1 +
 debian/tests/control                 |  3 +++
 debian/tests/run-unit-test           | 15 ++++++++++++
 debian/upstream/metadata             | 12 ++++++++++
 debian/watch                         |  4 ++++
 20 files changed, 271 insertions(+)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..27ca6be
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,15 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+To run the unit tests provided by the package you can do
+
+   sh  run-unit-test
+
+in this directory.  Please note that some commands inside the
+test suite are disabled.  Please be so kind and test it and
+report back about the results preferably via
+
+   reportbug
+
+ -- Andreas Tille <tille at debian.org>  Tue, 14 Feb 2017 17:37:55 +0100
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0490872
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+e-mem (0.0+20160706-1) UNRELEASED; urgency=medium
+
+  * Initial release (Closes: #<bug>)
+
+ -- Andreas Tille <tille at debian.org>  Wed, 03 May 2017 09:14:34 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..e75d4ed
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,24 @@
+Source: e-mem
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Andreas Tille <tille at debian.org>
+Section: science
+Priority: optional
+Build-Depends: debhelper (>= 10),
+               libboost-dev
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/e-mem.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/e-mem.git
+Homepage: http://www.csd.uwo.ca/~ilie/E-MEM/
+
+Package: e-mem
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: Efficient computation of Maximal Exact Matches for very large genomes
+ E-MEM enables efficient computation of Maximal Exact Matches (MEMs) that
+ does not use full text indexes. The algorithm uses much less space and
+ is highly amenable to parallelization. It can compute all MEMs of
+ minimum length 100 between the whole human and mouse genomes on a 12
+ core machine in 10 min and 2 GB of memory; the required memory can be as
+ low as 600 MB. It can run efficiently genomes of any size. Extensive
+ testing and comparison with currently best algorithms is provided.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..db79820
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,26 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: E-MEM
+Source: http://www.csd.uwo.ca/~ilie/E-MEM/e-mem.zip
+Files-Excluded: __MACOSX
+
+Files: *
+Copyright: 2013-2015 <upstream>
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2017 Andreas Tille <tille at debian.org>
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-3'
diff --git a/debian/createmanpages b/debian/createmanpages
new file mode 100755
index 0000000..3daca1b
--- /dev/null
+++ b/debian/createmanpages
@@ -0,0 +1,22 @@
+#!/bin/sh
+MANDIR=debian
+mkdir -p $MANDIR
+
+VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
+
+AUTHOR=".SH AUTHOR\nThis manpage was written by $DEBFULLNAME for the Debian distribution and
+can be used for any other usage of the program.
+"
+
+progname=e-mem
+help2man --no-info --no-discard-stderr --help-option=" " \
+         --name='finds position and length of all Maximal Exact Matches (MEMs) for very large genomes' \
+            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+cat <<EOT
+Please enhance the help2man output.
+The following web page might be helpful in doing so:
+    http://liw.fi/manpages/
+EOT
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..87a5b87
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,5 @@
+example
+run_example
+README
+debian/README.test
+debian/tests/run-unit-test
diff --git a/debian/e-mem.1 b/debian/e-mem.1
new file mode 100644
index 0000000..a69b208
--- /dev/null
+++ b/debian/e-mem.1
@@ -0,0 +1,46 @@
+.TH E-MEM "1" "May 2017" "e-mem 0.0+20160706" "User Commands"
+.SH NAME
+e-mem \- finds position and length of all Maximal Exact Matches (MEMs) for very large genomes
+.SH SYNOPSIS
+.B e-mem
+[\fI\,options\/\fR]  \fI\,<reference-file>  <query-file>\/\fR
+.SH DESCRIPTION
+e\-mem finds and outputs the position and length of all maximal
+exact matches (MEMs) between <query\-file> and <reference\-file>
+.SH OPTIONS
+.TP
+\fB\-n\fR
+match only the characters a, c, g, or t
+they can be in upper or in lower case
+.TP
+\fB\-l\fR
+set the minimum length of a match. The default length
+is 50
+.TP
+\fB\-b\fR
+compute forward and reverse complement matches
+.TP
+\fB\-r\fR
+only compute reverse complement matches
+.TP
+\fB\-c\fR
+report the query\-position of a reverse complement match
+relative to the original query sequence
+.TP
+\fB\-F\fR
+force 4 column output format regardless of the number of
+reference sequence input
+.TP
+\fB\-L\fR
+show the length of the query sequences on the header line
+.TP
+\fB\-d\fR
+set the split size. The default value is 1
+.TP
+\fB\-t\fR
+number of threads. The default is 1 thread
+.TP
+\fB\-h\fR
+show possible options
+.SH AUTHOR
+This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..119ce40
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+DVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed -e 's/^[0-9]*://' -e 's/-.*//'`
+MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/^\([0-9\.]\+\)[+~][-0-9]\+$/\1/'`
+
+wget -q http://www.csd.uwo.ca/~ilie/E-MEM/e-mem.zip
+unzip -q e-mem.zip
+VERSION=${MVERSION}+`find e-mem_2 -type f -printf '%T@ %p\n' | sort -n | tail -1 | sed 's/ .*//' | gawk '{print strftime("%Y%m%d", $0)}'`
+
+if [ "$DVERSION" = "$VERSION" ] ; then
+  echo "No newer upstream version than $DVERSION available."
+  rm -rf e-mem_2 __MACOSX e-mem.zip
+  exit
+fi
+
+mk-origtargz --repack --compress xz --version ${VERSION} e-mem.zip
+
+rm -rf e-mem_2 __MACOSX e-mem.zip
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..bf095fa
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+e-mem	usr/bin
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..0f65186
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/*.1
diff --git a/debian/patches/fix_test_script.patch b/debian/patches/fix_test_script.patch
new file mode 100644
index 0000000..9b70143
--- /dev/null
+++ b/debian/patches/fix_test_script.patch
@@ -0,0 +1,30 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 03 May 2017 09:14:34 +0200
+Description: Enable running test script with dash
+
+--- a/run_example
++++ b/run_example
+@@ -1,7 +1,8 @@
+-./e-mem  ./example/ref.fasta  ./example/que.fasta -l 50 -b > ./example/l50
++#!/bin/sh -e
++e-mem  ./example/ref.fasta  ./example/que.fasta -l 50 -b > ./example/l50
+ 
+ diff -b ./example/50 ./example/l50 > ./example/l50.df
+-if [[ -s ./example/l50.df ]] ; then
++if [ -s ./example/l50.df ] ; then
+ echo "Test Failed : l50.df has data."
+ else
+ echo "Test Passed"
+@@ -9,10 +10,10 @@ rm ./example/l50
+ rm ./example/l50.df
+ fi ;
+ 
+-./e-mem  ./example/ref.fasta  ./example/que.fasta -l 10 -b > ./example/l10
++e-mem  ./example/ref.fasta  ./example/que.fasta -l 10 -b > ./example/l10
+ 
+ diff -b ./example/10 ./example/l10 > ./example/l10.df
+-if [[ -s ./example/l10.df ]] ; then
++if [ -s ./example/l10.df ] ; then
+ echo "Test Failed: l10.df has data."
+ else
+ echo "Test Passed"
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..0eb078e
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,24 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 03 May 2017 09:14:34 +0200
+Description: Propagate hardening options
+
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@ endif
+ 
+ CC        = g++
+ EXEC      = e-mem
+-CFLAGS    = -Wall -Wextra -Wunused -mpopcnt -std=gnu++0x -fopenmp 
++CFLAGS   += -Wall -Wextra -Wunused -mpopcnt -std=gnu++0x -fopenmp 
+ CDEBUG    = -g -ggdb -DDEBUG 
+ CPROF    = -g -ggdb -DDEBUG -pg 
+ COPTIMIZE = -Wuninitialized -O3 -fomit-frame-pointer
+@@ -36,7 +36,7 @@ profile: all
+ 
+ bin:
+ 	@echo :: Compiling \"$(NAME)\" \($(CPUARCH)\) ...
+-	$(CC) $(CFLAGS) $(CSRCS) $(CLIBS) -o $(BIN_DIR)/$(EXEC) 
++	$(CC) $(CFLAGS) $(CSRCS) $(CLIBS) -o $(BIN_DIR)/$(EXEC) $(LDFLAGS)
+ 	chmod 755 $(BIN_DIR)/$(EXEC)
+ 	@echo :: Done
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f361265
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+fix_test_script.patch
+hardening.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..9aabe5d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+	dh $@
+
+override_dh_auto_test:
+	PATH=.:$(PATH) ./run_example
+
+get-orig-source:
+	. debian/get-orig-source
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..43883f0
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+
+pkg="e-mem"
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/*example $ADTTMP
+
+cd $ADTTMP
+
+sh ./run_example
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..ad34a3d
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,12 @@
+Reference:
+  Author: Nilesh Khiste and Lucian Ilie
+  Title: "E-MEM: efficient computation of maximal exact matches for very large genomes"
+  Journal: Bioinformatics
+  Year: 2015
+  Volume: 31
+  Number: 4
+  Pages: 509-514
+  DOI: 10.1093/bioinformatics/btu687
+  PMID: 25399029
+  URL: https://academic.oup.com/bioinformatics/article/31/4/509/2748225/E-MEM-efficient-computation-of-maximal-exact
+  eprint: https://academic.oup.com/bioinformatics/article-pdf/31/4/509/8692916/btu687.pdf
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..fe3eb0b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+
+opts=dversionmangle=s/.*/0.No-Release/ \
+  https://people.debian.org/~eriberto/ FakeWatchNoUpstreamReleaseForThisPackage-(\d\S+)\.gz

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



More information about the debian-med-commit mailing list