[med-svn] [deepnano] 02/02: Add some packaging stuff. I do not intend to continue the packaging but may be its useful for somebody else.

Andreas Tille tille at debian.org
Tue Sep 13 12:31:35 UTC 2016


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

tille pushed a commit to branch master
in repository deepnano.

commit 68cd18fa5ffdb71b39137c722492e4d1a1c85b78
Author: Andreas Tille <tille at debian.org>
Date:   Tue Sep 13 14:27:22 2016 +0200

    Add some packaging stuff.  I do not intend to continue the packaging but may be its useful for somebody else.
---
 debian/bin/deepnano_basecall              |  5 ++++
 debian/bin/deepnano_basecall_no_metrichor |  1 +
 debian/changelog                          |  8 +++++++
 debian/clean                              |  3 +++
 debian/compat                             |  1 +
 debian/control                            | 29 +++++++++++++++++++++++
 debian/copyright                          | 36 +++++++++++++++++++++++++++++
 debian/get-orig-source                    | 25 ++++++++++++++++++++
 debian/install                            |  4 ++++
 debian/patches/path_align_2d.patch        | 38 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  2 ++
 debian/patches/she_bang.patch             | 18 +++++++++++++++
 debian/rules                              | 21 +++++++++++++++++
 debian/source/format                      |  1 +
 debian/watch                              |  3 +++
 15 files changed, 195 insertions(+)

diff --git a/debian/bin/deepnano_basecall b/debian/bin/deepnano_basecall
new file mode 100755
index 0000000..1d79c0a
--- /dev/null
+++ b/debian/bin/deepnano_basecall
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+SCRIPT=`basename $0 | sed 's/^deepnano_//'`
+
+/usr/share/deepnano/${SCRIPT}.py $@
diff --git a/debian/bin/deepnano_basecall_no_metrichor b/debian/bin/deepnano_basecall_no_metrichor
new file mode 120000
index 0000000..2041646
--- /dev/null
+++ b/debian/bin/deepnano_basecall_no_metrichor
@@ -0,0 +1 @@
+deepnano_basecall
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..7ed75c1
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,8 @@
+deepnano (0.0+20110617-1) UNRELEASED; urgency=medium
+
+  * I do not intend to continue the packaging since the user who requested
+    this now prefers
+       https://github.com/mateidavid/nanocall
+    May be this packaging start might have some use for somebody else ...
+
+ -- Andreas Tille <tille at debian.org>  Mon, 25 Jul 2016 14:09:29 +0200
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..2683796
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,3 @@
+align_2d
+realign
+README.html
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..77bd8cc
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: deepnano
+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 (>= 9),
+               python-all,
+               dh-python,
+               python-markdown
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/deepnano.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/deepnano.git
+Homepage: https://bitbucket.org/vboza/deepnano
+
+Package: deepnano
+Architecture: any
+Depends: ${python:Depends},
+         ${misc:Depends},
+         ${shlibs:Depends},
+         python-h5py,
+         python-numpy,
+         python-dateutil,
+         python-theano
+Description: alternative basecaller for MinION reads of genomic sequences
+ DeepNano is alternative basecaller for Oxford Nanopore MinION reads
+ based on deep recurrent neural networks.
+ .
+ Currently it works with SQK-MAP-006 and SQK-MAP-005 chemistry and as a
+ postprocessor for Metrichor.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..573e566
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,36 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: DeepNano
+Source: https://bitbucket.org/vboza/deepnano
+Files-Excluded: training/realign
+
+Files: *
+Copyright: 2016, Vladimir Boza, Comenius University
+License: BSD-3-clause
+
+Files: debian/*
+Copyright: 2016 Andreas Tille <tille at debian.org>
+License: BSD-3-clause
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the Comenius University nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL COMENIUS UNIVERSITY BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..082e4d5
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+COMPRESS=xz
+
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/^\([0-9\.]\+\)[+~][-0-9]\+$/\1/'`
+
+mkdir -p ../tarballs
+cd ../tarballs
+# need to clean up the tarballs dir first because upstream tarball might
+# contain a directory with unpredictable name
+rm -rf *
+git clone --quiet https://bitbucket.org/vboza/deepnano.git $NAME
+cd $NAME
+VERSION=${MVERSION}+`date -d @$(git show --format="%at" | head -n1) +%Y%m%d`
+# for esthetical reasons set file timestamps (if git-restore-mtime is installed)
+git restore-mtime || true
+cd ..
+TARDIR=${NAME}-${VERSION}
+mv ${NAME} ${TARDIR}
+rm -rf ${TARDIR}/.git*
+rm -f training/realign
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
+rm -rf ${TARDIR}
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..daa3c10
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,4 @@
+*.py            usr/share/deepnano
+debian/bin	usr
+align_2d	usr/lib/deepnano
+realign		usr/lib/deepnano
diff --git a/debian/patches/path_align_2d.patch b/debian/patches/path_align_2d.patch
new file mode 100644
index 0000000..af0592c
--- /dev/null
+++ b/debian/patches/path_align_2d.patch
@@ -0,0 +1,38 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 25 Jul 2016 14:09:29 +0200
+Description: We do not start the scripts at the location where the
+ executable is hanging around.
+
+--- a/basecall_no_metrichor.py
++++ b/basecall_no_metrichor.py
+@@ -156,7 +156,7 @@ def basecall(read_file_name, fo):
+   if do_2d and "comp_events2" in data and\
+      len(data["comp_events2"]) <= args.max_2d_length and\
+      len(data["temp_events2"]) <= args.max_2d_length:
+-    p = subprocess.Popen("./align_2d", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
++    p = subprocess.Popen("/usr/lib/deepnano/align_2d", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+     f2d = p.stdin
+     print >>f2d, len(o1)+len(o2)
+     for a, b in zip(o1, o2):
+--- a/basecall_no_metrichor_devel.py
++++ b/basecall_no_metrichor_devel.py
+@@ -297,7 +297,7 @@ for i, read in enumerate(args.reads):
+       print >>f2d, " ".join(map(str, a))
+       print >>f2d, " ".join(map(str, b))
+     f2d.close()
+-    os.system("./align_2d <2d.in >2d.out")
++    os.system("/usr/lib/deepnano/align_2d <2d.in >2d.out")
+     f2do = open("2d.out")
+     call2d = f2do.next().strip()
+     print >>fo, ">%d_2d_rnn_simple" % i
+--- a/training/train.py
++++ b/training/train.py
+@@ -32,7 +32,7 @@ def realign(s):
+   f.close()
+ 
+   print "s", s
+-  if os.system("./realign <%stmpb-%s.in >%stmpb-%s.out" % (base_dir, s, base_dir, s)) != 0:
++  if os.system("/usr/lib/deepnano/realign <%stmpb-%s.in >%stmpb-%s.out" % (base_dir, s, base_dir, s)) != 0:
+     print "watwat", s
+     sys.exit()
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..53d7d6b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+she_bang.patch
+path_align_2d.patch
diff --git a/debian/patches/she_bang.patch b/debian/patches/she_bang.patch
new file mode 100644
index 0000000..1e0b018
--- /dev/null
+++ b/debian/patches/she_bang.patch
@@ -0,0 +1,18 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 25 Jul 2016 14:09:29 +0200
+Description: Add missing #! line
+
+--- a/basecall.py
++++ b/basecall.py
+@@ -1,3 +1,4 @@
++#!/usr/bin/python
+ import argparse
+ from rnn_fin import RnnPredictor
+ import h5py
+--- a/basecall_no_metrichor.py
++++ b/basecall_no_metrichor.py
+@@ -1,3 +1,4 @@
++#!/usr/bin/python
+ import argparse
+ from rnn_fin import RnnPredictor
+ import h5py
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..102edf4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+	dh $@  --with python2
+
+override_dh_auto_build:
+	dh_auto_build
+	markdown_py -f README.html README.md
+	g++ $(CPPFLAGS) $(LDFLAGS) -std=gnu++0x align_2d.cc -o align_2d
+	g++ $(CPPFLAGS) $(LDFLAGS) -std=gnu++0x training/realign.cc -o realign
+
+override_dh_fixperms:
+	dh_fixperms
+	for bin in debian/bin/* ; do \
+	    script=`basename $${bin} | sed 's/^deepnano_//'`.py ; \
+	    chmod +x debian/*/usr/share/*/$${script} ; \
+	done
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/watch b/debian/watch
new file mode 100644
index 0000000..e91af9a
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+# version=3
+# upstream has not proper versioning
+

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



More information about the debian-med-commit mailing list