[med-svn] [bamtools] 01/01: Recreate bamtools Git repository in a Debian Med policy compliant way. I see no point from deriving from our policy for this package.

Andreas Tille tille at debian.org
Sat Apr 12 17:44:13 UTC 2014


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

tille pushed a commit to branch master
in repository bamtools.

commit 1ac3c1de32d994b57ae685a3e2f104eff843536d
Author: Andreas Tille <tille at debian.org>
Date:   Sat Apr 12 19:32:46 2014 +0200

    Recreate bamtools Git repository in a Debian Med policy compliant way.  I see no point from deriving from our policy for this package.
---
 debian/bamtools.1                                  |  54 ++++++++++
 debian/bamtools.install                            |   1 +
 debian/changelog                                   |   5 +
 debian/clean                                       |   6 ++
 debian/compat                                      |   1 +
 debian/control                                     |  83 +++++++++++++++
 debian/copyright                                   |  36 +++++++
 debian/createmanpages                              |   9 ++
 debian/d-shlibmove.patch                           |  20 ++++
 debian/libbamtools.docs                            |   1 +
 debian/lintian-overrides                           |   2 +
 debian/manpages                                    |   1 +
 .../0001-ignore-thirdparty-and-fix-jsoncpp.patch   |  41 ++++++++
 .../patches/0002-support-out-of-source-build.patch |  53 ++++++++++
 ...om-ExportHeader-function-use-install-inst.patch | 114 +++++++++++++++++++++
 ...ls-statically-with-libbamtools-utils-as-w.patch |  22 ++++
 ...bamtools-to-lib.-Installing-libraries-to-.patch |  19 ++++
 debian/patches/series                              |   5 +
 debian/rules                                       |  40 ++++++++
 debian/source/format                               |   1 +
 debian/upstream/metadata                           |  12 +++
 debian/watch                                       |   3 +
 22 files changed, 529 insertions(+)

diff --git a/debian/bamtools.1 b/debian/bamtools.1
new file mode 100644
index 0000000..593d2b2
--- /dev/null
+++ b/debian/bamtools.1
@@ -0,0 +1,54 @@
+.TH BAMTOOLS "1" "April 2014" "bamtools 2.3.0+dfsg" "User Commands"
+.SH NAME
+bamtools \- toolkit for manipulating BAM (genome alignment) files
+.SH SYNOPSIS
+.B bamtools
+[\-\-help] COMMAND [ARGS]
+.SH DESCRIPTION
+BamTools facilitates research analysis and data management using BAM
+files.  It copes with the enormous amount of data produced by current
+sequencing technologies that is typically stored in compressed, binary
+formats that are not easily handled by the text-based parsers commonly
+used in bioinformatics research.
+.SH OPTIONS
+.TP
+convert
+Converts between BAM and a number of other formats
+.TP
+count
+Prints number of alignments in BAM file(s)
+.TP
+coverage
+Prints coverage statistics from the input BAM file
+.TP
+filter
+Filters BAM file(s) by user\-specified criteria
+.TP
+header
+Prints BAM header information
+.TP
+index
+Generates index for BAM file
+.TP
+merge
+Merge multiple BAM files into single file
+.TP
+random
+Select random alignments from existing BAM file(s), intended more as a testing tool.
+.TP
+resolve
+Resolves paired\-end reads (marking the IsProperPair flag as needed)
+.TP
+revert
+Removes duplicate marks and restores original base qualities
+.TP
+sort
+Sorts the BAM file according to some criteria
+.TP
+split
+Splits a BAM file on user\-specified property, creating a new BAM output file for each value found
+.TP
+stats
+Prints some basic statistics from input BAM file(s)
+.PP
+See 'bamtools help COMMAND' for more information on a specific command.
diff --git a/debian/bamtools.install b/debian/bamtools.install
new file mode 100644
index 0000000..1df36c6
--- /dev/null
+++ b/debian/bamtools.install
@@ -0,0 +1 @@
+usr/bin/*
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..14c69c7
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+bamtools (2.3.0+dfsg-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #692498)
+
+ -- Andreas Tille <tille at debian.org>  Wed, 02 Apr 2014 13:11:47 +0200
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..1287d43
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,6 @@
+debian/bamtools.1
+bin/*
+lib/*
+include/*
+src/toolkit/bamtools_version.h
+
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..7d58770
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,83 @@
+Source: bamtools
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Michael R. Crusoe <michael.crusoe at gmail.com>,
+           Andreas Tille <tille at debian.org>
+Section: science
+Priority: optional
+Build-Depends: debhelper (>= 9.0.0),
+               d-shlibs,
+               cmake,
+               libz-dev,
+               libjsoncpp-dev,
+               help2man
+Standards-Version: 3.9.5
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-med/bamtools.git;a=shortlog;h=refs/heads/debian
+Vcs-Git: git://anonscm.debian.org/debian-med/bamtools.git
+Homepage: https://github.com/pezmaster31/bamtools/wiki
+
+Package: bamtools
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: toolkit for manipulating BAM (genome alignment) files
+ BamTools facilitates research analysis and data management using BAM
+ files.  It copes with the enormous amount of data produced by current
+ sequencing technologies that is typically stored in compressed, binary
+ formats that are not easily handled by the text-based parsers commonly
+ used in bioinformatics research.
+ .
+ BamTools provides both a C++ API for BAM file support as well as a
+ command-line toolkit.
+ .
+ This is the bamtools command-line toolkit
+ .
+ Available bamtools commands:
+ convert  Converts between BAM and a number of other formats
+ count    Prints number of alignments in BAM file(s)
+ coverage Prints coverage statistics from the input BAM file
+ filter   Filters BAM file(s) by user-specified criteria
+ header   Prints BAM header information
+ index    Generates index for BAM file
+ merge    Merge multiple BAM files into single file
+ random   Select random alignments from existing BAM file(s), intended more as
+          a testing tool.
+ resolve  Resolves paired-end reads (marking the IsProperPair flag as needed)
+ revert   Removes duplicate marks and restores original base qualities
+ sort     Sorts the BAM file according to some criteria
+ split    Splits a BAM file on user-specified property, creating a new BAM
+          output file for each value found
+ stats    Prints some basic statistics from input BAM file(s)
+
+Package: libbamtools-dev
+Architecture: any
+Section: libdevel
+Depends: libbamtools2.3.0 (= ${binary:Version}),
+         ${misc:Depends}
+Description: C++ API for manipulating BAM (genome alignment) files 
+ BamTools facilitates research analysis and data management using BAM 
+ files.  It copes with the enormous amount of data produced by current
+ sequencing technologies that is typically stored in compressed, binary
+ formats that are not easily handled by the text-based parsers commonly
+ used in bioinformatics research.
+ .
+ BamTools provides both a C++ API for BAM file support as well as a
+ command-line toolkit.
+ .
+ This is the developers API package
+
+Package: libbamtools2.3.0
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: dynnamic library for manipulating BAM (genome alignment) files
+ BamTools facilitates research analysis and data management using BAM
+ files.  It copes with the enormous amount of data produced by current
+ sequencing technologies that is typically stored in compressed, binary
+ formats that are not easily handled by the text-based parsers commonly
+ used in bioinformatics research.
+ .
+ BamTools provides both a C++ API for BAM file support as well as a
+ command-line toolkit.
+ .
+ This is the runtime library
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..32e9b2e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,36 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: bamtools
+Source: https://github.com/pezmaster31/bamtools
+Files-Excluded: src/third_party
+
+Files: *
+Copyright: 2009-2012 Derek Barnett <derekwbarnett at gmail.com>
+	   2009-2010 Erik Garrison
+	   2009-2010 Gabor Marth
+	   2009-2010 Michael Stromberg
+License: Expat License
+
+Files: debian/*
+Copyright: 2012 Michael R. Crusoe <michael.crusoe at gmail.com>
+           2014 Andreas Tille <tille at debian.org>
+License: Expat License
+
+License: Expat License
+ 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.
+
diff --git a/debian/createmanpages b/debian/createmanpages
new file mode 100755
index 0000000..8991d38
--- /dev/null
+++ b/debian/createmanpages
@@ -0,0 +1,9 @@
+#!/bin/sh
+MANDIR=debian
+mkdir -p $MANDIR
+
+VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//'`
+
+help2man --no-info --no-discard-stderr --help-option=" " \
+         --name='<optional description of the program>' \
+            --version-string="$VERSION" bamtools > $MANDIR/bamtools.1
diff --git a/debian/d-shlibmove.patch b/debian/d-shlibmove.patch
new file mode 100644
index 0000000..1bd7e6a
--- /dev/null
+++ b/debian/d-shlibmove.patch
@@ -0,0 +1,20 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: 2014-04-10 09:58:01
+Desciption: since the upstream build does not create versioned SO libs
+ d-shlibs would try to move the *.so file twice which fails.  This is
+ prevented with the following patch to d-shlibs.
+
+--- debian/d-shlibmove.orig	2014-04-10 10:03:12.488539739 +0200
++++ debian/d-shlibmove	2014-04-10 09:58:01.000000000 +0200
+@@ -216,8 +216,9 @@
+ fi
+ echo "mv $(dirname $1)/${PK}.so debian/${PKGDEV}/usr/lib"  >> "$execscript"
+ echo "mv $(dirname ${REALSO})/${SONAME} debian/${PKGSHL}/usr/lib"  >> "$execscript"
+-echo "mv ${REALSO} debian/${PKGSHL}/usr/lib"  >> "$execscript"
+-
++if [ "$(dirname ${REALSO})/${SONAME}" != "${REALSO}" ] ; then
++    echo "mv ${REALSO} debian/${PKGSHL}/usr/lib"  >> "$execscript"
++fi
+ if [ -n "${SHLIBSLOCALVER}" ]; then 
+     echo "echo \"${SONAMELIBNAME} ${SONAMEVERSION} ${PKGSHL} (>= ${SHLIBSLOCALVER})\" >> debian/shlibs.local" >> "$execscript"
+ fi
diff --git a/debian/libbamtools.docs b/debian/libbamtools.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/libbamtools.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644
index 0000000..a47dfcf
--- /dev/null
+++ b/debian/lintian-overrides
@@ -0,0 +1,2 @@
+# False positive
+bamtools: description-contains-duplicated-word merge    Merge
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/0001-ignore-thirdparty-and-fix-jsoncpp.patch b/debian/patches/0001-ignore-thirdparty-and-fix-jsoncpp.patch
new file mode 100644
index 0000000..abfbc76
--- /dev/null
+++ b/debian/patches/0001-ignore-thirdparty-and-fix-jsoncpp.patch
@@ -0,0 +1,41 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Wed, 7 Nov 2012 18:44:06 -0700
+Subject: ignore-thirdparty-and-fix-jsoncpp
+
+---
+ src/CMakeLists.txt                               |    2 +-
+ src/toolkit/bamtools_filter.cpp                  |    2 +-
+ 2 files changed, 238 insertions(+), 2 deletions(-)
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -6,7 +6,7 @@
+ # ==========================
+ 
+ add_subdirectory( api )
+-add_subdirectory( third_party )
++#add_subdirectory( third_party )
+ add_subdirectory( toolkit )
+ add_subdirectory( utils )
+ 
+--- a/src/toolkit/bamtools_filter.cpp
++++ b/src/toolkit/bamtools_filter.cpp
+@@ -16,7 +16,7 @@
+ #include <utils/bamtools_utilities.h>
+ using namespace BamTools;
+ 
+-#include <jsoncpp/json.h>
++#include <jsoncpp/json/json.h>
+ using namespace Json;
+ 
+ #include <cstdio>
+--- a/src/toolkit/CMakeLists.txt
++++ b/src/toolkit/CMakeLists.txt
+@@ -8,7 +8,6 @@
+ # set include path
+ include_directories( ${BamTools_SOURCE_DIR}/src/api
+                      ${BamTools_SOURCE_DIR}/src/utils
+-                     ${BamTools_SOURCE_DIR}/src/third_party
+                    )
+ 
+ # compile main bamtools application
diff --git a/debian/patches/0002-support-out-of-source-build.patch b/debian/patches/0002-support-out-of-source-build.patch
new file mode 100644
index 0000000..9a0c9b9
--- /dev/null
+++ b/debian/patches/0002-support-out-of-source-build.patch
@@ -0,0 +1,53 @@
+From: Dominique Belhachemi <domibel at debian.org>
+Date: Fri, 21 Sep 2012 11:16:28 -0400
+Subject: support out-of-source build
+
+---
+ CMakeLists.txt             |    5 +++--
+ src/ExportHeader.cmake     |    2 +-
+ src/toolkit/CMakeLists.txt |    2 +-
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -35,8 +35,8 @@ set( BamTools_VERSION_MINOR 3 )
+ set( BamTools_VERSION_BUILD 0 )
+ 
+ # set our library and executable destination dirs
+-set( EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin" )
+-set( LIBRARY_OUTPUT_PATH    "${CMAKE_SOURCE_DIR}/lib" )
++set( EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin" )
++set( LIBRARY_OUTPUT_PATH    "${CMAKE_BINARY_DIR}/lib" )
+ 
+ # define compiler flags for all code
+ set( CMAKE_BUILD_TYPE Release )
+@@ -60,6 +60,7 @@ endif()
+ 
+ # add our includes root path
+ include_directories( src )
++include_directories("${CMAKE_BINARY_DIR}/include")
+ 
+ # list subdirectories to build in
+ add_subdirectory( src )
+--- a/src/ExportHeader.cmake
++++ b/src/ExportHeader.cmake
+@@ -18,7 +18,7 @@ function( ExportHeader MODULE FILE DEST
+     add_custom_command( TARGET ${MODULE} COMMAND
+         ${CMAKE_COMMAND} -E copy_if_different
+         "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}"
+-        "${CMAKE_SOURCE_DIR}/include/${DEST}/${FILENAME}" )
++        "${CMAKE_BINARY_DIR}/include/${DEST}/${FILENAME}" )
+ 
+     # make sure files are properly 'installed'
+     install( FILES "${FILE}" DESTINATION "include/bamtools/${DEST}" )
+--- a/src/toolkit/CMakeLists.txt
++++ b/src/toolkit/CMakeLists.txt
+@@ -34,7 +34,7 @@ set_target_properties( bamtools_cmd PROP
+                        OUTPUT_NAME "bamtools"
+                      )
+ # make version info available in application
+-configure_file( bamtools_version.h.in ${BamTools_SOURCE_DIR}/src/toolkit/bamtools_version.h )
++configure_file( bamtools_version.h.in ${BamTools_BINARY_DIR}/include/bamtools_version.h )
+ 
+ # define libraries to link
+ target_link_libraries( bamtools_cmd BamTools BamTools-utils jsoncpp )
diff --git a/debian/patches/0003-remove-custom-ExportHeader-function-use-install-inst.patch b/debian/patches/0003-remove-custom-ExportHeader-function-use-install-inst.patch
new file mode 100644
index 0000000..60c8188
--- /dev/null
+++ b/debian/patches/0003-remove-custom-ExportHeader-function-use-install-inst.patch
@@ -0,0 +1,114 @@
+From: Dominique Belhachemi <domibel at debian.org>
+Date: Fri, 19 Oct 2012 11:35:52 -0400
+Subject: remove custom ExportHeader function, use install instead
+
+---
+ src/CMakeLists.txt         |    5 +----
+ src/ExportHeader.cmake     |   27 ------------------------
+ src/api/CMakeLists.txt     |   49 ++++++++++++++++++++++----------------------
+ src/toolkit/CMakeLists.txt |    3 +++
+ 4 files changed, 28 insertions(+), 56 deletions(-)
+ delete mode 100644 src/ExportHeader.cmake
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -10,7 +10,4 @@ add_subdirectory( api )
+ add_subdirectory( toolkit )
+ add_subdirectory( utils )
+ 
+-# export shared headers
+-include( ExportHeader.cmake )
+-set( SharedIncludeDir "shared" )
+-ExportHeader( SharedHeaders shared/bamtools_global.h ${SharedIncludeDir} )
++install( FILES shared/bamtools_global.h DESTINATION "include/bamtools/shared" COMPONENT Development )
+--- a/src/ExportHeader.cmake
++++ /dev/null
+@@ -1,27 +0,0 @@
+-#
+-# ExportHeader
+-#
+-
+-function( ExportHeader MODULE FILE DEST )
+-
+-    # if haven't defined our custom 'build target'
+-    # not exactly a build target, but lets this command get
+-    # checked any time build step happens
+-    if( NOT TARGET ${MODULE} )
+-        add_custom_target( ${MODULE} ALL COMMENT "Exporting ${MODULE}" )
+-    endif( NOT TARGET ${MODULE} )
+-
+-    # get the filename (without path)
+-    get_filename_component( FILENAME "${FILE}" NAME )
+-
+-    # copy header to destination
+-    add_custom_command( TARGET ${MODULE} COMMAND
+-        ${CMAKE_COMMAND} -E copy_if_different
+-        "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}"
+-        "${CMAKE_BINARY_DIR}/include/${DEST}/${FILENAME}" )
+-
+-    # make sure files are properly 'installed'
+-    install( FILES "${FILE}" DESTINATION "include/bamtools/${DEST}" )
+-
+-endfunction( ExportHeader )
+-
+--- a/src/toolkit/CMakeLists.txt
++++ b/src/toolkit/CMakeLists.txt
+@@ -35,6 +35,9 @@ set_target_properties( bamtools_cmd PROP
+                      )
+ # make version info available in application
+ configure_file( bamtools_version.h.in ${BamTools_BINARY_DIR}/include/bamtools_version.h )
++install( FILES ${BamTools_BINARY_DIR}/include/bamtools_version.h
++         DESTINATION "include/bamtools"
++         COMPONENT Development )
+ 
+ # define libraries to link
+ target_link_libraries( bamtools_cmd BamTools BamTools-utils jsoncpp )
+--- a/src/api/CMakeLists.txt
++++ b/src/api/CMakeLists.txt
+@@ -57,27 +57,23 @@ target_link_libraries( BamTools-static $
+ install( TARGETS BamTools        LIBRARY DESTINATION "lib/bamtools" RUNTIME DESTINATION "bin")
+ install( TARGETS BamTools-static ARCHIVE DESTINATION "lib/bamtools")
+ 
+-# export API headers
+-include(../ExportHeader.cmake)
+-set(ApiIncludeDir "api")
+-ExportHeader(APIHeaders api_global.h             ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamAlgorithms.h          ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamAlignment.h           ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamAux.h                 ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamConstants.h           ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamIndex.h               ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamMultiReader.h         ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamReader.h              ${ApiIncludeDir})
+-ExportHeader(APIHeaders BamWriter.h              ${ApiIncludeDir})
+-ExportHeader(APIHeaders IBamIODevice.h           ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamConstants.h           ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamHeader.h              ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamProgram.h             ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamProgramChain.h        ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamReadGroup.h           ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamReadGroupDictionary.h ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamSequence.h            ${ApiIncludeDir})
+-ExportHeader(APIHeaders SamSequenceDictionary.h  ${ApiIncludeDir})
++install( FILES api_global.h              DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamAlgorithms.h           DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamAlignment.h            DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamAux.h                  DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamConstants.h            DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamIndex.h                DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamMultiReader.h          DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamReader.h               DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES BamWriter.h               DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES IBamIODevice.h            DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamConstants.h            DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamHeader.h               DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamProgram.h              DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamProgramChain.h         DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamReadGroup.h            DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamReadGroupDictionary.h  DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamSequence.h             DESTINATION "include/bamtools/api" COMPONENT Development )
++install( FILES SamSequenceDictionary.h   DESTINATION "include/bamtools/api" COMPONENT Development )
+ 
+-set( AlgorithmsIncludeDir "api/algorithms" )
+-ExportHeader( AlgorithmsHeaders algorithms/Sort.h ${AlgorithmsIncludeDir} )
++install( FILES algorithms/Sort.h         DESTINATION "include/bamtools/api/algorithms" COMPONENT Development )
diff --git a/debian/patches/0004-Link-bamtools-statically-with-libbamtools-utils-as-w.patch b/debian/patches/0004-Link-bamtools-statically-with-libbamtools-utils-as-w.patch
new file mode 100644
index 0000000..cd35a58
--- /dev/null
+++ b/debian/patches/0004-Link-bamtools-statically-with-libbamtools-utils-as-w.patch
@@ -0,0 +1,22 @@
+From: "Michael R. Crusoe" <michael.crusoe at gmail.com>
+Date: Wed, 7 Nov 2012 19:07:43 -0700
+Subject: Link bamtools statically with libbamtools-utils as we aren't
+ distributing it seperately
+
+---
+ src/utils/CMakeLists.txt |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt
+index 2d91ca3..b38859c 100644
+--- a/src/utils/CMakeLists.txt
++++ b/src/utils/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_definitions( -DBAMTOOLS_UTILS_LIBRARY ) # (for proper exporting of library s
+ add_definitions( -fPIC ) # (attempt to force PIC compiling on CentOS, not being set on shared libs by CMake)
+ 
+ # create BamTools utils library
+-add_library( BamTools-utils SHARED
++add_library( BamTools-utils STATIC
+              bamtools_fasta.cpp
+              bamtools_options.cpp
+              bamtools_pileup_engine.cpp
diff --git a/debian/patches/0005-Install-libbamtools-to-lib.-Installing-libraries-to-.patch b/debian/patches/0005-Install-libbamtools-to-lib.-Installing-libraries-to-.patch
new file mode 100644
index 0000000..c63c60a
--- /dev/null
+++ b/debian/patches/0005-Install-libbamtools-to-lib.-Installing-libraries-to-.patch
@@ -0,0 +1,19 @@
+From: "Michael R. Crusoe" <michael.crusoe at gmail.com>
+Date: Wed, 7 Nov 2012 19:11:51 -0700
+Subject: Install libbamtools to /usr/lib.  Installing libraries to
+ /usr/lib/bamtools requires setting LD_LIBRARY_PATH or the
+ executable's rpath.  Installing libraries to /usr/lib is cleaner.
+
+--- a/src/api/CMakeLists.txt
++++ b/src/api/CMakeLists.txt
+@@ -54,8 +54,8 @@ target_link_libraries( BamTools        $
+ target_link_libraries( BamTools-static ${APILibs} )
+ 
+ # set library install destinations
+-install( TARGETS BamTools        LIBRARY DESTINATION "lib/bamtools" RUNTIME DESTINATION "bin")
+-install( TARGETS BamTools-static ARCHIVE DESTINATION "lib/bamtools")
++install( TARGETS BamTools        LIBRARY DESTINATION "lib" RUNTIME DESTINATION "bin")
++install( TARGETS BamTools-static ARCHIVE DESTINATION "lib")
+ 
+ install( FILES api_global.h              DESTINATION "include/bamtools/api" COMPONENT Development )
+ install( FILES BamAlgorithms.h           DESTINATION "include/bamtools/api" COMPONENT Development )
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..794a5a2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+0001-ignore-thirdparty-and-fix-jsoncpp.patch
+0002-support-out-of-source-build.patch
+0003-remove-custom-ExportHeader-function-use-install-inst.patch
+# 0004-Link-bamtools-statically-with-libbamtools-utils-as-w.patch
+0005-Install-libbamtools-to-lib.-Installing-libraries-to-.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..e5b5db6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,40 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh $@ --parallel
+
+override_dh_install:
+	# since the upstream build does not create versioned we need to tweak d-shlibmove
+	cp /usr/bin/d-shlibmove $(CURDIR)/debian/d-shlibmove
+	patch -p0 < debian/d-shlibmove.patch
+	$(CURDIR)/debian/d-shlibmove --commit \
+		    --multiarch \
+		    --devunversioned \
+		    --exclude-la \
+		    --movedev debian/tmp/usr/include/* usr/include \
+		    debian/tmp/usr/lib/lib*.so
+	rm $(CURDIR)/debian/d-shlibmove
+	dh_install
+	# no need to install different versions of bamtools
+	rm -rf debian/$(DEBPKGNAME)/usr/bin/$(DEBPKGNAME)
+	mv debian/$(DEBPKGNAME)/usr/bin/$(DEBPKGNAME)-[0-9]* debian/$(DEBPKGNAME)/usr/bin/$(DEBPKGNAME)
+
+override_dh_installman:
+	LD_LIBRARY_PATH=debian/tmp/usr/lib:${LD_LIBRARY_PATH} help2man --name "a command-line toolkit for reading, writing, and manipulating BAM (genome alignment) files" --no-info --no-discard-stderr debian/tmp/usr/bin/bamtools > debian/bamtools.1
+
+SOURCEPKG=$(shell dpkg-parsechangelog | sed  -n 's/^Source: \(.*\)/\1/p')
+UPSTREAM=$(shell dpkg-parsechangelog |  sed -n 's/^Version: \(.*\)-[^-]*/\1/p')
+SHA1=$(lastword $(subst ~g, ,$(UPSTREAM)))
+ORIG=${SOURCEPKG}_${UPSTREAM}.orig.tar
+
+describe-current-version:
+	git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;'
+
+get-orig-source:
+	uscan --download-current-version --force-download --rename --repack-compression xz
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/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..24b0136
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,12 @@
+Reference:
+  Author: Derek W. Barnett and Erik K. Garrison and Aaron R. Quinlan and Michael P. Stromberg and Gabor T. Marth
+  Title: "BamTools: a C++ API and toolkit for analyzing and managing BAM files"
+  Journal: Bioinformatics
+  Year: 2011
+  Volume: 27
+  Number: 12
+  Pages: 1691-2
+  DOI: 10.1093/bioinformatics/btr174
+  PMID: 21493652
+  URL: http://bioinformatics.oxfordjournals.org/content/27/12/1691
+  eprint: http://bioinformatics.oxfordjournals.org/content/27/12/1691.full.pdf+html
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..926b3b7
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+dfsg// \
+https://github.com/pezmaster31/bamtools/tags .*/v?(\d[\d\.]+)\.tar\.gz

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



More information about the debian-med-commit mailing list