[med-svn] [metabit] 02/02: Add debian/ packaging

Andreas Tille tille at debian.org
Mon Jul 25 20:21:28 UTC 2016


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

tille pushed a commit to branch master
in repository metabit.

commit 9eb9b491b1b6a26064e8af85ab808dad1714104c
Author: Andreas Tille <tille at debian.org>
Date:   Mon Jul 25 22:19:45 2016 +0200

    Add debian/ packaging
---
 debian/bin/metabit                            |  3 +
 debian/changelog                              |  5 ++
 debian/clean                                  |  1 +
 debian/compat                                 |  1 +
 debian/control                                | 31 ++++++++++
 debian/copyright                              | 31 ++++++++++
 debian/dirs                                   |  1 +
 debian/get-orig-source                        | 25 ++++++++
 debian/install                                |  4 ++
 debian/patches/series                         |  1 +
 debian/patches/use_debian_packaged_yaml.patch | 86 +++++++++++++++++++++++++++
 debian/rules                                  | 18 ++++++
 debian/source/format                          |  1 +
 debian/upstream/metadata                      |  8 +++
 debian/watch                                  | 39 ++++++++++++
 15 files changed, 255 insertions(+)

diff --git a/debian/bin/metabit b/debian/bin/metabit
new file mode 100755
index 0000000..791e5a8
--- /dev/null
+++ b/debian/bin/metabit
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/share/metabit/metaBIT.py --metaphlan-path=/usr/share/metaphlan2 $@
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..63a7173
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+metabit (0.0+20160617-1) UNRELEASED; urgency=medium
+
+  * Initial release (Closes: #<bug>)
+
+ -- 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..daa30a3
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+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..cbd2f49
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,31 @@
+Source: metabit
+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,
+               bowtie2
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/metabit.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/metabit.git
+Homepage: https://bitbucket.org/Glouvel/metabit/wiki/
+
+Package: metabit
+Architecture: all
+Depends: ${python:Depends},
+         ${misc:Depends},
+         bowtie2,
+         r-base-core
+Description: analysing microbial profiles from high-throughput sequencing shotgun data
+ MetaBIT is an integrative and automated metagenomic pipeline for
+ analysing microbial profiles from high-throughput sequencing
+ shotgun data.
+ .
+ The metaBIT pipeline proposes tools for visualising microbial profiles
+ (barplots, heatmaps) and performing a range of statistical analyses
+ (diversity indices, hierarchical clustering and principal coordinate
+ analysis). It uses as input fastq files containing trimmed reads from
+ shotgun high through-put sequencing.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..e63249b
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,31 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: metaBIT
+Source: https://bitbucket.org/Glouvel/metabit/downloads
+Files-Excluded: */pypeline/yaml
+
+Files: *
+Copyright: 2014-2026 Guillaume Louvel <guillaume.louvel at ens.fr>
+License: expat
+
+Files: debian/*
+Copyright: 2016 Andreas Tille <tille at debian.org>
+License: expat
+
+License: expat
+ 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/dirs b/debian/dirs
new file mode 100644
index 0000000..db23a63
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1 @@
+usr/lib/R/site-library/metabit
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..0aeee6a
--- /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/Glouvel/metabit.git
+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*
+find ${TARDIR} -path */pypeline/yaml | xargs rm -rf
+
+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..febdd9d
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,4 @@
+*.py		usr/share/metabit
+nodes		usr/share/metabit
+pypeline	usr/share/metabit
+debian/bin	usr
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1e62050
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+use_debian_packaged_yaml.patch
diff --git a/debian/patches/use_debian_packaged_yaml.patch b/debian/patches/use_debian_packaged_yaml.patch
new file mode 100644
index 0000000..d4805b3
--- /dev/null
+++ b/debian/patches/use_debian_packaged_yaml.patch
@@ -0,0 +1,86 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Updates: Mon, 25 Jul 2016 14:09:29 +0200
+Description: Use Debian packaged python-yaml
+
+--- a/metaBIT.py
++++ b/metaBIT.py
+@@ -17,7 +17,7 @@ import subprocess
+ 
+ 
+ # paleomix pypeline modules
+-import pypeline.yaml
++import yaml
+ import pypeline.logger
+ from   pypeline.pipeline       import Pypeline
+ from pypeline.common.console import print_err, print_info
+@@ -46,7 +46,7 @@ def run(config, args):
+     try:
+         logger.info("Building metaBIT pipeline ...")
+         makefiles = read_makefiles(args, config)
+-    except (MakefileError, pypeline.yaml.YAMLError, IOError), error:
++    except (MakefileError, yaml.YAMLError, IOError), error:
+         print_err("Error reading makefiles:",
+                   "\n  %s:\n   " % (error.__class__.__name__,),
+                   "\n    ".join(str(error).split("\n")),
+--- a/pypeline/common/makefile.py
++++ b/pypeline/common/makefile.py
+@@ -193,7 +193,7 @@ import hashlib
+ import datetime
+ import operator
+ 
+-import pypeline.yaml
++import yaml
+ from pypeline.common.utilities import group_by_pred
+ 
+ 
+@@ -217,8 +217,8 @@ def read_makefile(filename, specificatio
+     try:
+         with open(filename) as makefile:
+             string = makefile.read()
+-            data = pypeline.yaml.safe_load(string)
+-    except pypeline.yaml.error.YAMLError, error:
++            data = yaml.safe_load(string)
++    except yaml.error.YAMLError, error:
+         raise MakefileError(error)
+ 
+     mtime = os.path.getmtime(os.path.realpath(filename))
+--- a/pypeline/tools/bam_pipeline/pipeline.py
++++ b/pypeline/tools/bam_pipeline/pipeline.py
+@@ -27,7 +27,7 @@ import time
+ import logging
+ 
+ import pypeline
+-import pypeline.yaml
++import yaml
+ import pypeline.logger
+ 
+ from pypeline.common.console import \
+@@ -254,7 +254,7 @@ def run(config, args):
+     try:
+         print_info("Building BAM pipeline ...", file=sys.stderr)
+         makefiles = read_makefiles(config, args)
+-    except (MakefileError, pypeline.yaml.YAMLError, IOError), error:
++    except (MakefileError, yaml.YAMLError, IOError), error:
+         print_err("Error reading makefiles:",
+                   "\n  %s:\n   " % (error.__class__.__name__,),
+                   "\n    ".join(str(error).split("\n")),
+--- a/pypeline/tools/phylo_pipeline/pipeline.py
++++ b/pypeline/tools/phylo_pipeline/pipeline.py
+@@ -26,7 +26,7 @@ import time
+ import logging
+ 
+ import pypeline.ui
+-import pypeline.yaml
++import yaml
+ import pypeline.logger
+ import pypeline.tools.phylo_pipeline.makefile
+ import pypeline.tools.phylo_pipeline.mkfile as mkfile
+@@ -88,7 +88,7 @@ def main(argv):
+ 
+     try:
+         makefiles = read_makefiles(config, args, commands)
+-    except (MakefileError, pypeline.yaml.YAMLError, IOError), error:
++    except (MakefileError, yaml.YAMLError, IOError), error:
+         print_err("Error reading makefiles:",
+                   "\n  %s:\n   " % (error.__class__.__name__,),
+                   "\n    ".join(str(error).split("\n")),
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..35b1de8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+export LC_ALL=C.UTF-8
+
+DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+
+%:
+	dh $@  --with python2
+
+override_dh_auto_build:
+	dh_auto_build
+	markdown_py -f README.html README.md
+
+override_dh_install:
+	dh_install
+	mv debian/$(DEBPKGNAME)/usr/share/metabit/nodes/tools/statax_Rmodule/*.R	debian/$(DEBPKGNAME)/usr/lib/R/site-library/metabit
+	rmdir debian/$(DEBPKGNAME)/usr/share/metabit/nodes/tools/statax_Rmodule
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..b24c751
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,8 @@
+Reference:
+  Author: Guillaume Louvel and Clio Der Sarkissian and Kristian Hanghøj and Ludovic Orlando
+  Title: "metaBIT, an integrative and automated metagenomic pipeline for analysing microbial profiles from high-throughput sequencing shotgun data"
+  Journal: Molecular Ecology Resources
+  Year: 2016
+  DOI: 10.1111/1755-0998.12546
+  PMID: 27238636
+  URL: http://onlinelibrary.wiley.com/doi/10.1111/1755-0998.12546/abstract
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..5d88692
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,39 @@
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php #PACKAGE#-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/#PACKAGE#-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/#PACKAGE#-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge
+# http://sf.net/#PACKAGE#/#PACKAGE#-(\d[\d\.]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
+
+# Uncomment to find new files on Github
+#  - when using releases:
+# https://github.com/#GITHUBUSER#/#PACKAGE#/releases .*/archive/#PREFIX#(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
+#  - when using tags
+# https://github.com/#GITHUBUSER#/#PACKAGE#/tags .*/#PREFIX#(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
+# Remark: frequently you can do s/#PREFIX#/v?/ since 'v' or nothing is quite common but there are other prefixes possible
+
+# PyPi repository of Python modules
+#  see https://lists.debian.org/debian-python/2015/02/msg00027.html
+# http://pypi.debian.net/#module#/#module#-(.+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
+
+# Bitbucket
+# https://bitbucket.org/<user>/<project>/downloads .*/(\d\S*)\.tar\.gz
+
+# Gitlab
+# opts=filenamemangle=s/.*\.tar\.gz\?ref=v?(\d\S*)/<project>-$1\.tar\.gz/g \
+#  https://gitlab.com/<user>/<project>/tags .*archive\.tar\.gz\?ref=v?(\d\S*)
+
+# if tweaking of source is needed
+# \
+# debian debian/get-orig-source
+
+# if you need to repack and choose +dfsg prefix
+# opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,compress=xz" \

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



More information about the debian-med-commit mailing list