[med-svn] [nanopolish] 02/04: Initial packaging

Afif Elghraoui afif-guest at moszumanska.debian.org
Tue Jan 19 09:04:58 UTC 2016


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

afif-guest pushed a commit to branch master
in repository nanopolish.

commit 37336dc4a6f6d0bf5e997b396e8d8962b12adc94
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Tue Jan 19 00:10:37 2016 -0800

    Initial packaging
---
 debian/README.Debian                     |   6 ++
 debian/README.source                     |  10 ++
 debian/changelog                         |   5 +
 debian/compat                            |   1 +
 debian/control                           |  24 +++++
 debian/copyright                         |  91 ++++++++++++++++++
 debian/docs                              |   1 +
 debian/examples                          |   1 +
 debian/install                           |   3 +
 debian/manpages                          |   1 +
 debian/nanopolish.1                      |  32 +++++++
 debian/patches/adjust-include-path.patch | 157 +++++++++++++++++++++++++++++++
 debian/patches/compiler-flags.patch      |  39 ++++++++
 debian/patches/external-libs.patch       |  27 ++++++
 debian/patches/series                    |   3 +
 debian/rules                             |  14 +++
 debian/source/format                     |   1 +
 debian/watch                             |   4 +
 18 files changed, 420 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..dffb3bd
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,6 @@
+nanopolish for Debian
+---------------------
+
+* Auxiliary scripts for nanopolish can be found in /usr/lib/nanopolish.
+
+ -- Afif Elghraoui <afif at ghraoui.name>, Mon, 18 Jan 2016 23:41:22 -0800
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..c42ef02
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,10 @@
+nanopolish for Debian
+---------------------
+
+The dependency on fast5 headers introduces the requirement for
+the hdf5 libraries. Since fast5 is a header-only library, libfast5-dev
+depends on the necessary hdf5 library and this package must link to it.
+That is why this program does not build-depend directly on the hdf5 libraries.
+
+
+ -- Afif Elghraoui <afif at ghraoui.name>, Mon, 18 Jan 2016 23:43:36 -0800
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6334669
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+nanopolish (0.4.0-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #811458)
+
+ -- Afif Elghraoui <afif at ghraoui.name>  Mon, 18 Jan 2016 18:24:45 -0800
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..6e11710
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,24 @@
+Source: nanopolish
+Section: science
+Priority: optional
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders:
+	Afif Elghraoui <afif at ghraoui.name>,
+Build-Depends:
+	debhelper (>= 9),
+	zlib1g-dev,
+	libfast5-dev,
+	libhts-dev,
+Standards-Version: 3.9.6
+Homepage: https://github.com/jts/nanopolish
+Vcs-Git: git://anonscm.debian.org/debian-med/nanopolish.git
+Vcs-Browser: http://anonscm.debian.org/debian-med/nanopolish.git
+
+Package: nanopolish
+Architecture: any
+Depends:
+	${shlibs:Depends},
+	${misc:Depends},
+Description: consensus caller for nanopore sequencing data
+ Nanopolish uses a signal-level hidden Markov model for consensus
+ calling of nanopore genome sequencing data.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b3e1865
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,91 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: nanopolish
+Upstream-Contact: Jared Simpson <jared.simpson at oicr.on.ca>
+Source: https://github.com/jts/nanopolish
+
+Files: *
+Copyright: 2015 Ontario Institute for Cancer Research
+License: MIT
+
+Files: src/test/catch.hpp
+Copyright: 2012 Two Blue Cubes Ltd.
+License: Boost-License-1.0
+
+Files: src/common/profiler.h
+Copyright: 2011 Wellcome Trust Sanger Institute
+License: GPL-3.0
+Comment: GPL version is unspecified.
+
+Files: src/common/logsum.cpp
+Copyright: 2015 Howard Hughes Medical Institute
+License: Public-Domain
+ This file was originally part of HMMER. This version is used with
+ Sean Eddy's permission as public domain code.
+
+Files: src/thirdparty/stdaln.*
+Copyright: 2003-2006, 2008 Heng Li <lh3lh3 at gmail.com>
+License: MIT
+
+Files: debian/*
+Copyright: 2016 Afif Elghraoui <afif at ghraoui.name>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: Boost-License-1.0
+ Permission is hereby granted, free of charge, to any person or organization
+ obtaining a copy of the software and accompanying documentation covered by
+ this license (the "Software") to use, reproduce, display, distribute,
+ execute, and transmit the Software, and to prepare derivative works of the
+ Software, and to permit third-parties to whom the Software is furnished to
+ do so, all subject to the following:
+ .
+ The copyright notices in the Software and this entire statement, including
+ the above license grant, this restriction and the following disclaimer,
+ must be included in all copies of the Software, in whole or in part, and
+ all derivative works of the Software, unless such copies or derivative
+ works are solely in the form of machine-executable object code generated by
+ a source language processor.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ .
+ The license can be found at <http://www.boost.org/LICENSE_1_0.txt>.
+
+License: GPL-3.0
+ 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.
+ .
+ This package 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.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..4838fcd
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+test/data
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..5370290
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,3 @@
+nanopolish	usr/bin
+nanopolish_test	usr/lib/nanopolish
+scripts/*	usr/lib/nanopolish
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..ae92208
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/nanopolish.1
diff --git a/debian/nanopolish.1 b/debian/nanopolish.1
new file mode 100644
index 0000000..464b984
--- /dev/null
+++ b/debian/nanopolish.1
@@ -0,0 +1,32 @@
+.\" (C) Copyright 2016 Afif Elghraoui <afif at ghraoui.name>,
+.TH NANOPOLISH 1 "January 2016" 0.4.0
+.SH NAME
+nanopolish \- nanopore sequence consensus algorithm
+.SH SYNOPSIS
+.B nanopolish consensus
+.RI [ options ] " files" ...
+.br
+.B nanopolish eventalign
+.RI [ options ] " files" ...
+.br
+.B nanopolish getmodel
+.RI [ options ] " files" ...
+.br
+.B nanopolish variants
+.RI [ options ] " files" ...
+.br
+.B nanopolish methyltrain
+.RI [ options ] " files" ...
+.br
+.B nanopolish methyltest
+.RI [ options ] " files" ...
+.br
+.B nanopolish help
+.SH OPTIONS
+For a complete description of a subcommand, see its help menu.
+.TP
+.B \-\-help
+Show summary of options.
+.TP
+.B \-\-version
+Show version of program.
diff --git a/debian/patches/adjust-include-path.patch b/debian/patches/adjust-include-path.patch
new file mode 100644
index 0000000..d439665
--- /dev/null
+++ b/debian/patches/adjust-include-path.patch
@@ -0,0 +1,157 @@
+Description: Adjust #include statements
+ Use angle brackets rather than quotes so that the library headers can be
+ pulled in from prespecified locations.
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: no
+Last-Update: 2016-01-18
+--- nanopolish.orig/src/nanopolish_poremodel.cpp
++++ nanopolish/src/nanopolish_poremodel.cpp
+@@ -11,7 +11,7 @@
+ #include <sstream>
+ #include <cstring>
+ #include <bits/stl_algo.h>
+-#include "../fast5/src/fast5.hpp"
++#include <fast5.hpp>
+ 
+ void PoreModel::bake_gaussian_parameters()
+ {
+--- nanopolish.orig/src/nanopolish_poremodel.h
++++ nanopolish/src/nanopolish_poremodel.h
+@@ -13,7 +13,7 @@
+ #include "nanopolish_common.h"
+ #include <inttypes.h>
+ #include <string>
+-#include "../fast5/src/fast5.hpp"
++#include <fast5.hpp>
+ 
+ //
+ struct PoreModelStateParams
+--- nanopolish.orig/src/nanopolish_squiggle_read.cpp
++++ nanopolish/src/nanopolish_squiggle_read.cpp
+@@ -9,7 +9,7 @@
+ #include <algorithm>
+ #include "nanopolish_common.h"
+ #include "nanopolish_squiggle_read.h"
+-#include "src/fast5.hpp"
++#include <fast5.hpp>
+ 
+ //
+ SquiggleRead::SquiggleRead(const std::string& name, const std::string& path) :
+--- nanopolish.orig/src/alignment/nanopolish_alignment_db.cpp
++++ nanopolish/src/alignment/nanopolish_alignment_db.cpp
+@@ -9,9 +9,9 @@
+ #include <assert.h>
+ #include <algorithm>
+ #include "nanopolish_alignment_db.h"
+-#include "htslib/faidx.h"
+-#include "htslib/hts.h"
+-#include "htslib/sam.h"
++#include <htslib/faidx.h>
++#include <htslib/hts.h>
++#include <htslib/sam.h>
+ 
+ // Various file handle and structures
+ // needed to traverse a bam file
+--- nanopolish.orig/src/alignment/nanopolish_anchor.cpp
++++ nanopolish/src/alignment/nanopolish_anchor.cpp
+@@ -10,7 +10,7 @@
+ #include <string>
+ #include <stdio.h>
+ #include <assert.h>
+-#include "htslib/faidx.h"
++#include <htslib/faidx.h>
+ #include "nanopolish_common.h"
+ #include "nanopolish_anchor.h"
+ #include "nanopolish_squiggle_read.h"
+--- nanopolish.orig/src/alignment/nanopolish_anchor.h
++++ nanopolish/src/alignment/nanopolish_anchor.h
+@@ -10,8 +10,8 @@
+ #define NANOPOLISH_ANCHOR_H
+ 
+ #include <memory>
+-#include "htslib/hts.h"
+-#include "htslib/sam.h"
++#include <htslib/hts.h>
++#include <htslib/sam.h>
+ #include "nanopolish_common.h"
+ #include "nanopolish_squiggle_read.h"
+ #include "nanopolish_fast5_map.h"
+--- nanopolish.orig/src/alignment/nanopolish_eventalign.cpp
++++ nanopolish/src/alignment/nanopolish_eventalign.cpp
+@@ -19,7 +19,7 @@
+ #include <set>
+ #include <omp.h>
+ #include <getopt.h>
+-#include "htslib/faidx.h"
++#include <htslib/faidx.h>
+ #include "nanopolish_eventalign.h"
+ #include "nanopolish_iupac.h"
+ #include "nanopolish_poremodel.h"
+--- nanopolish.orig/src/alignment/nanopolish_eventalign.h
++++ nanopolish/src/alignment/nanopolish_eventalign.h
+@@ -9,8 +9,8 @@
+ #ifndef NANOPOLISH_EVENTALIGN_H
+ #define NANOPOLISH_EVENTALIGN_H
+ 
+-#include "htslib/faidx.h"
+-#include "htslib/sam.h"
++#include <htslib/faidx.h>
++#include <htslib/sam.h>
+ #include "nanopolish_alphabet.h"
+ #include "nanopolish_common.h"
+ 
+--- nanopolish.orig/src/common/nanopolish_fast5_map.cpp
++++ nanopolish/src/common/nanopolish_fast5_map.cpp
+@@ -14,7 +14,7 @@
+ #include <sys/stat.h>
+ #include "nanopolish_fast5_map.h"
+ #include "nanopolish_common.h"
+-#include "htslib/kseq.h"
++#include <htslib/kseq.h>
+ 
+ //
+ #define FOFN_SUFFIX ".fast5.fofn"
+--- nanopolish.orig/src/nanopolish_call_variants.cpp
++++ nanopolish/src/nanopolish_call_variants.cpp
+@@ -21,7 +21,7 @@
+ #include <set>
+ #include <omp.h>
+ #include <getopt.h>
+-#include "htslib/faidx.h"
++#include <htslib/faidx.h>
+ #include "nanopolish_poremodel.h"
+ #include "nanopolish_transition_parameters.h"
+ #include "nanopolish_matrix.h"
+--- nanopolish.orig/src/nanopolish_getmodel.cpp
++++ nanopolish/src/nanopolish_getmodel.cpp
+@@ -20,7 +20,7 @@
+ #include <set>
+ #include <omp.h>
+ #include <getopt.h>
+-#include "htslib/faidx.h"
++#include <htslib/faidx.h>
+ #include "nanopolish_poremodel.h"
+ #include "nanopolish_squiggle_read.h"
+ #include "profiler.h"
+--- nanopolish.orig/src/nanopolish_methyltest.cpp
++++ nanopolish/src/nanopolish_methyltest.cpp
+@@ -20,7 +20,7 @@
+ #include <set>
+ #include <omp.h>
+ #include <getopt.h>
+-#include "htslib/faidx.h"
++#include <htslib/faidx.h>
+ #include "nanopolish_eventalign.h"
+ #include "nanopolish_iupac.h"
+ #include "nanopolish_poremodel.h"
+--- nanopolish.orig/src/nanopolish_methyltrain.cpp
++++ nanopolish/src/nanopolish_methyltrain.cpp
+@@ -20,7 +20,7 @@
+ #include <set>
+ #include <omp.h>
+ #include <getopt.h>
+-#include "htslib/faidx.h"
++#include <htslib/faidx.h>
+ #include "nanopolish_methyltrain.h"
+ #include "nanopolish_eventalign.h"
+ #include "nanopolish_iupac.h"
diff --git a/debian/patches/compiler-flags.patch b/debian/patches/compiler-flags.patch
new file mode 100644
index 0000000..dad91eb
--- /dev/null
+++ b/debian/patches/compiler-flags.patch
@@ -0,0 +1,39 @@
+Description: Allow adding settings to standard compiler flags
+ * Use += for CFLAGS/CXXFLAGS
+ * Use LDFLAGS
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: no
+Last-Update: 2016-01-18
+--- nanopolish.orig/Makefile
++++ nanopolish/Makefile
+@@ -9,9 +9,9 @@
+ 
+ #Basic flags every build needs
+ LIBS=-lz
+-CXXFLAGS = -g -O3
++CXXFLAGS += -g -O3
+ CXXFLAGS += -std=c++11 -fopenmp
+-CFLAGS=-O3
++CFLAGS += -O3
+ CXX=g++
+ CC=gcc
+ HDF5=install
+@@ -95,15 +95,15 @@
+ 	$(CXX) -o $@ -c $(CXXFLAGS) $(CPPFLAGS) -fPIC $<
+ 
+ .c.o:
+-	$(CC) -o $@ -c $(CFLAGS) -fPIC $<
++	$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) -fPIC $<
+ 
+ # Link main executable
+ $(PROGRAM): src/main/nanopolish.o $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB)
+-	$(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) -fPIC $< $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB) $(LIBS)
++	$(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) -fPIC $< $(CPP_OBJ) $(C_OBJ) $(LDFLAGS) $(HTS_LIB) $(H5_LIB) $(LIBS)
+ 
+ # Link test executable
+ $(TEST_PROGRAM): src/test/nanopolish_test.o $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB)
+-	$(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) -fPIC $< $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB) $(LIBS)
++	$(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) -fPIC $< $(CPP_OBJ) $(C_OBJ) $(LDFLAGS) $(HTS_LIB) $(H5_LIB) $(LIBS)
+ 
+ test: $(TEST_PROGRAM)
+ 	./$(TEST_PROGRAM)
diff --git a/debian/patches/external-libs.patch b/debian/patches/external-libs.patch
new file mode 100644
index 0000000..70fb360
--- /dev/null
+++ b/debian/patches/external-libs.patch
@@ -0,0 +1,27 @@
+Description: Set up build system to use externally installed libraries
+ * Remove htslib from prerequisites of the build
+ * Change variable definition so that hdf5 isn't downloaded and built locally
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2016-01-18
+--- nanopolish.orig/Makefile
++++ nanopolish/Makefile
+@@ -14,7 +14,6 @@
+ CFLAGS += -O3
+ CXX=g++
+ CC=gcc
+-HDF5=install
+ 
+ # Check operating system, OSX doesn't have -lrt
+ UNAME_S := $(shell uname -s)
+@@ -34,9 +33,7 @@
+     LIBS += -lhdf5
+ endif
+ 
+-# Bulild and link the libhts submodule
+-HTS_LIB=./htslib/libhts.a
+-HTS_INCLUDE=-I./htslib
++LIBS += -lhts
+ 
+ # Include the header-only fast5 library
+ FAST5_INCLUDE=-I./fast5
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..743ba4c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+adjust-include-path.patch
+compiler-flags.patch
+external-libs.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..462db14
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+
+#DH_VERBOSE = 1
+#include /usr/share/dpkg/default.mk
+
+export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/hdf5/serial
+export DEB_LDFLAGS_MAINT_APPEND = -L/usr/lib/x86_64-linux-gnu/hdf5/serial
+
+%:
+	dh $@ --parallel
+
+override_dh_auto_clean:
+	dh_auto_clean
+	$(RM) .depend
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..217693e
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+
+opts="filenamemangle=s/(?:.*?)?v?(\d[\d.]*)\.tar\.gz/nanopolish-$1.tar.gz/" \
+https://github.com/jts/nanopolish/tags (?:.*?/)?v?(\d[\d.]*)\.tar\.gz

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



More information about the debian-med-commit mailing list