[med-svn] [kronatools] 02/02: Initial packaging

Andreas Tille tille at debian.org
Wed Jul 27 14:19:58 UTC 2016


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

tille pushed a commit to branch master
in repository kronatools.

commit a09c5d2a58af3dfa13131ae3cbad8c6af2fbdae5
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jul 27 16:15:58 2016 +0200

    Initial packaging
---
 debian/README.Debian                    | 26 +++++++++++++++++
 debian/bin/kronatools_updateTaxonomy    |  2 ++
 debian/changelog                        |  5 ++++
 debian/compat                           |  1 +
 debian/control                          | 19 +++++++++++++
 debian/copyright                        | 50 +++++++++++++++++++++++++++++++++
 debian/install                          |  6 ++++
 debian/patches/fix_install_script.patch | 24 ++++++++++++++++
 debian/patches/series                   |  1 +
 debian/postinst                         | 25 +++++++++++++++++
 debian/postrm                           | 23 +++++++++++++++
 debian/rules                            | 42 +++++++++++++++++++++++++++
 debian/source/format                    |  1 +
 debian/watch                            |  4 +++
 14 files changed, 229 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..907e953
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,26 @@
+KronaTools for Debian
+=====================
+
+Some tools rely on NCBI taxonomy:
+
+    ktClassifyBLAST
+    ktGetTaxIDFromGI
+    ktImportBLAST
+    ktImportMETAREP-BLAST
+    ktImportTaxonomy
+
+To use these tools,
+
+    krona_updateTaxonomy
+
+must be run after installing. This will install the local taxonomy database to
+
+    /var/lib/kronatools/taxonomy
+
+which uses about 4 GB of space and requires an additional 12 GB of scratch
+space during installation. It can also be run later to keep the local database up to date with NCBI.
+
+
+
+ -- Andreas Tille <tille at debian.org>  Wed, 27 Jul 2016 11:44:17 +0200
+
diff --git a/debian/bin/kronatools_updateTaxonomy b/debian/bin/kronatools_updateTaxonomy
new file mode 100644
index 0000000..091b3e3
--- /dev/null
+++ b/debian/bin/kronatools_updateTaxonomy
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/share/kronatools/updateTaxonomy.sh /var/lib/kronatools/taxonomy
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..929cc31
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+kronatools (2.7+dfsg-1) UNRELEASED; urgency=medium
+
+  * Initial release (Closes: #<bug>)
+
+ -- Andreas Tille <tille at debian.org>  Wed, 27 Jul 2016 11:44:17 +0200
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..e6976e3
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: kronatools
+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)
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/kronatools.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/kronatools.git
+Homepage: https://github.com/marbl/Krona/wiki
+
+Package: kronatools
+Architecture: all
+Depends: ${misc:Depends}
+Description: hierarchical data to be explored with zoomable pie charts
+ Krona allows hierarchical data to be explored with zoomable pie charts.
+ Krona charts include support for several bioinformatics tools and raw
+ data formats. The charts can be viewed with a recent version of any
+ major web browser.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..de8c7a7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,50 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: KronaTools
+Source: https://github.com/marbl/Krona/releases
+Files-Excluded: */ExcelTemplate
+                */tar.sh
+
+Files: *
+Copyright: 2011-2016 Battelle National Biodefense Institute (BNBI)
+                Brian Ondov, Nicholas Bergman, and Adam Phillippy
+License: BSD-3-clause
+
+Files: debian/*
+Copyright: 2016 Andreas Tille <tille at debian.org>
+License: BSD-3-clause
+
+License: BSD-3-clause
+ This Software was prepared for the Department of Homeland Security
+ (DHS) by the Battelle National Biodefense Institute, LLC (BNBI) as
+ part of contract HSHQDC-07-C-00020 to manage and operate the National
+ Biodefense Analysis and Countermeasures Center (NBACC), a Federally
+ Funded Research and Development Center.
+ .
+ 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 Battelle National Biodefense Institute 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 THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS 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/install b/debian/install
new file mode 100644
index 0000000..c6360a7
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,6 @@
+KronaTools/data			usr/share/perl5/KronaTools
+KronaTools/img			usr/share/perl5/KronaTools
+KronaTools/lib			usr/share/perl5/KronaTools
+KronaTools/scripts		usr/share/perl5/KronaTools
+KronaTools/updateTaxonomy.sh	usr/share/kronatools
+debian/bin			usr
diff --git a/debian/patches/fix_install_script.patch b/debian/patches/fix_install_script.patch
new file mode 100644
index 0000000..c3fbd06
--- /dev/null
+++ b/debian/patches/fix_install_script.patch
@@ -0,0 +1,24 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 27 Jul 2016 11:44:17 +0200
+Description: Adjust to Debian install path and fix spelling
+
+--- a/KronaTools/install.pl
++++ b/KronaTools/install.pl
+@@ -34,7 +34,7 @@ if ( defined $taxonomyDir )
+ 	$taxonomyDir = abs_path($taxonomyDir);
+ }
+ 
+-my $scriptPath = abs_path('scripts');
++my $scriptPath = '../share/perl5/KronaTools/scripts';
+ 
+ createDir($path);
+ createDir("$path/bin");
+@@ -55,7 +55,7 @@ foreach my $script
+ 	ImportFCP
+ 	ImportGalaxy
+ 	ImportKrona
+-	ImportMETAREP-BLAST
++	ImportMETAREP-blast
+ 	ImportMETAREP-EC
+ 	ImportMGRAST
+ 	ImportPhymmBL
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a1fd7c2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_install_script.patch
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..7e7a3d5
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+TAXONOMYDIR=/var/lib/kronatools/taxonomy
+
+case "$1" in
+    configure)
+        mkdir -p $TAXONOMYDIR
+        chmod 1777 $TAXONOMYDIR
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..9a4d1e4
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TAXONOMYDIR=/var/lib/kronatools
+
+case "$1" in
+    purge)
+        rm -rf $TAXONOMYDIR
+    ;;
+    remove|upgrade|deconfigure|failed-upgrade)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..14c637b
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,42 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+
+DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
+VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
+MANDIR=$(CURDIR)/debian/$(DEBPKGNAME)/usr/share/man/man1/
+HELP2MAN = help2man --no-info --version-string="$(VERSION)" --no-discard-stderr --help-option=" "
+# --help-option=" -h" # does not work in all cases
+
+%:
+	dh $@
+
+override_dh_install:
+	dh_install
+	KronaTools/install.pl -prefix debian/$(DEBPKGNAME)/usr -taxonomy /var/lib/$(DEBPKGNAME)/taxonomy
+
+override_dh_installman_does_not_work__giving_up:
+	dh_installman
+	mkdir -p $(MANDIR)
+	set -x ; \
+	for script in debian/$(DEBPKGNAME)/usr/bin/* ; do \
+	    name=`basename $${script}` ; \
+	    pscript=`echo $${name} | sed 's:^kt\(.*\):\1.pl:'` ; \
+	    pl="KronaTools/scripts/$${pscript}" ; \
+	    title=`$${pl} | grep -A 2 '^Description:' | tail -n 1` ; \
+	    if [ "$${title}" = "" ] ; then \
+	        title=`$${pl} | grep -A2 -- \" - $${pscript} \" | tail -n1` ; \
+	    fi ; \
+	    if [ "$${title}" = "" ] ; then \
+	        title="$${name} from KronaTools package" ; \
+	    fi ; \
+	    NAME=`echo $${name} | tr 'a-z' 'A-Z'` ; \
+	    PSCRIPT=`echo $${pscript} | tr 'a-z' 'A-Z'` ; \
+	    $(HELP2MAN) --name="$${title}" $${pl} | \
+	        sed -e '/^.[IP]P/{;N;s/^.[IP]P\n____.*//;}' \
+	            -e '/^.[IP]P/{;N;s/^.[IP]P\n____.*//;}' \
+	            -e "s/$${pscript}/$${name}/g" \
+	            -e "s/$${PSCRIPT}/$${NAME}/g" \
+	        > $(MANDIR)/$${name}.1 ; \
+	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..60aa4b0
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+
+opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,repack,compression=xz" \
+  https://github.com/marbl/Krona/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)

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



More information about the debian-med-commit mailing list