[med-svn] [cnvkit] 02/02: initial Debianization

Michael Crusoe misterc-guest at moszumanska.debian.org
Sun Jun 26 01:50:03 UTC 2016


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

misterc-guest pushed a commit to branch master
in repository cnvkit.

commit 0242aada7f5e915c718f727286ed660eb76370d7
Author: Michael R. Crusoe <crusoe at ucdavis.edu>
Date:   Sat Jun 25 11:02:04 2016 -0700

    initial Debianization
---
 debian/changelog         |  5 ++++
 debian/clean             |  2 ++
 debian/compat            |  1 +
 debian/control           | 34 ++++++++++++++++++++++++++++
 debian/copyright         | 27 ++++++++++++++++++++++
 debian/genmanpages.py    | 21 +++++++++++++++++
 debian/manpages          |  1 +
 debian/patches/no-py-ext | 13 +++++++++++
 debian/patches/series    |  1 +
 debian/rules             | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/source/format     |  1 +
 debian/upstream/metadata | 12 ++++++++++
 debian/watch             |  7 ++++++
 13 files changed, 184 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6e13a11
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+cnvkit (0.7.11-1) UNRELEASED; urgency=medium
+
+  * Initial release. (Closes: #828176)
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Sat, 25 Jun 2016 10:57:17 -0700
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..991ead8
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,2 @@
+debian/*.1
+debian/*.include
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..e9a3996
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,34 @@
+Source: cnvkit
+Section: science
+Priority: optional
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Michael R. Crusoe <michael.crusoe at gmail.com>
+Build-Depends: debhelper (>= 9),
+               dh-python,
+               python-all,
+               python-setuptools,
+               python-pyfaidx,
+               help2man,
+               python-biopython,
+               python-pandas,
+               python-numpy,
+               python-pysam,
+               python-scipy,
+               python-matplotlib,
+               python-pyvcf,
+               r-cran-pscbs,
+               python-subprocess32
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/cnvkit.git
+Vcs-Git: https://anonscm.debian.org/debian-med/cnvkit.git
+Homepage: http://cnvkit.readthedocs.org
+X-Python-Version: >= 2.7
+
+Package: cnvkit
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Description: Copy number variant detection from targeted DNA sequencing
+ A command-line toolkit and Python library for detecting copy number variants
+ and alterations genome-wide from targeted DNA sequencing. It is designed for
+ use with hybrid capture, including both whole-exome and custom target panels,
+ and short-read sequencing platforms such as Illumina and Ion Torrent.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..919a84b
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,27 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: cnvkit
+Source: https://github.com/etal/cnvkit
+
+Files: *
+Copyright: © 2013-2017 Eric Talevich
+License: Apache-2.0
+
+Files: debian/*
+Copyright: © 2016 Michael R. Crusoe <michael.crusoe at gmail.com>
+License: Apache-2.0
+
+License: Apache-2.0
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+   .
+       http://www.apache.org/licenses/LICENSE-2.0
+   .
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   .
+   On Debian systems, the full text of the Apache License, Version 2.0 can be
+   found in the file `/usr/share/common-licenses/Apache-2.0'
diff --git a/debian/genmanpages.py b/debian/genmanpages.py
new file mode 100755
index 0000000..9745403
--- /dev/null
+++ b/debian/genmanpages.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+from __future__ import print_function
+from cnvlib import commands
+import os
+import sys
+if os.name == 'posix' and sys.version_info[0] < 3:
+    import subprocess32 as subprocess
+else:
+    import subprocess
+
+for subcommand in commands.AP_subparsers._get_subactions():
+    name = subcommand.dest
+    description = subcommand.help
+    if name == 'version':
+        break
+    with open("debian/cnvkit-%s.man.include" % name, "w") as f:
+        print("[NAME]", file=f)
+        print("cnvkit_%s \- %s" % (name, description), file=f)
+    subprocess.check_call(['help2man', '--no-info', '--version-string=%s'
+            % sys.argv[1], '--include=debian/cnvkit-%s.man.include' % name,
+            '--output=debian/cnvkit-%s.1' % name, './cnvkit %s' % name])
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/no-py-ext b/debian/patches/no-py-ext
new file mode 100644
index 0000000..4d1f624
--- /dev/null
+++ b/debian/patches/no-py-ext
@@ -0,0 +1,13 @@
+Author: Michael R. Crusoe <michael.crusoe at gmail.com>
+Description: Remove .py extensions as per Debian policy
+--- cnvkit.orig/setup.py
++++ cnvkit/setup.py
+@@ -41,7 +41,7 @@
+         'cnvlib.ngfrills',
+         'cnvlib.segmentation',
+     ],
+-    scripts=[join(DIR, 'cnvkit.py')] + glob(join(DIR, 'scripts/*.py')),
++    scripts=[join(DIR, 'cnvkit')] + glob(join(DIR, 'scripts/*')),
+     classifiers=[
+         "Development Status :: 4 - Beta",
+         "Environment :: Console",
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..263d233
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+no-py-ext
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..c5d8ae2
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,59 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+export LC_ALL=C.UTF-8
+export PYBUILD_NAME=cnvkit
+# some helpful variables - uncomment them if needed
+# shamelessly stolen from http://jmtd.net/log/awk/
+DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
+VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
+#DEBFLAVOR      := $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
+#DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+#DEBIAN_BRANCH  := $(shell awk 'BEGIN{FS="[= ]+"} /debian-branch/ {print $$2}' debian/gbp.conf)
+#GIT_TAG        := $(subst ~,_,$(VERSION))
+
+# alternatively to manually set those variables, you can
+#  include /usr/share/dpkg/default.mk
+# and use what is set there.
+
+# for hardening you might like to uncomment this:
+# export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+	dh $@ --with python2 --buildsystem=pybuild
+
+override_dh_auto_build:
+	mv cnvkit.py cnvkit
+	mv scripts/genome2access.py ./
+	cd scripts; for script in *.py; do mv $${script} \
+		cnvkit-$${script%%.py}; done
+	dh_auto_build
+	cd scripts; for script in *; do mv $${script} $${script##cnvkit-}.py; \
+		done
+	mv cnvkit cnvkit.py
+	mv genome2access.py scripts/
+
+override_dh_auto_install:
+	mv cnvkit.py cnvkit
+	mv scripts/genome2access.py ./
+	cd scripts; for script in *.py; do mv $${script} \
+		cnvkit-$${script%%.py}; done
+	dh_auto_install
+	help2man --no-info --version-option=version \
+		--name="a command-line toolkit for copy number analysis." \
+		./cnvkit > debian/cnvkit.1
+	debian/genmanpages.py ${VERSION}
+	cd scripts; for script in *; do PYTHONPATH=../ help2man --no-info \
+		--version-string=${VERSION} --help-option='-h' ./$${script} > \
+		../debian/$${script}.1; done
+	cd scripts; for script in *; do mv $${script} $${script##cnvkit-}.py; \
+		done
+	mv cnvkit cnvkit.py
+	mv genome2access.py scripts/
+
+override_dh_auto_test:
+	cd test; ${MAKE}
+
+override_dh_auto_clean:
+	cd test && ${MAKE} clean || /bin/true
+	dh_auto_clean
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..d8b5812
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,12 @@
+Reference:
+  Author: 
+  Title: 
+  Journal: 
+  Year: 
+  Volume: 
+  Number: 
+  Pages: 
+  DOI: 
+  PMID:
+  URL: 
+  eprint: 
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d14114e
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,7 @@
+version=3
+
+# Uncomment to find new files on Github
+#  - when using releases:
+https://github.com/etal/cnvkit/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
+# 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/cnvkit.git



More information about the debian-med-commit mailing list