[med-svn] [bcftools] 02/04: Initial packaging
Afif Elghraoui
afif-guest at moszumanska.debian.org
Wed Nov 4 08:34:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
afif-guest pushed a commit to branch master
in repository bcftools.
commit 2639b24571d4439ff29f029869ea2b75c59cd799
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Tue Nov 3 23:57:20 2015 -0800
Initial packaging
---
debian/changelog | 5 +++
debian/compat | 1 +
debian/control | 28 +++++++++++++
debian/docs | 1 +
debian/patches/compiler-flags.patch | 35 +++++++++++++++++
debian/patches/destdir.patch | 15 +++++++
debian/patches/external-libs.patch | 78 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 3 ++
debian/rules | 16 ++++++++
debian/source/format | 1 +
10 files changed, 183 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..8d2f731
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+bcftools (1.2-1) UNRELEASED; urgency=low
+
+ * Initial release (Closes: #804007)
+
+ -- Afif Elghraoui <afif at ghraoui.name> Tue, 03 Nov 2015 17:55:40 -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..e211bd9
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,28 @@
+Source: bcftools
+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,
+ libhts-dev (>= 1.2.1),
+ libgsl-dev,
+# Test-Depends:
+ tabix,
+ libio-pty-perl
+Standards-Version: 3.9.6
+Homepage: http://samtools.github.io/bcftools/
+#Vcs-Git: git://anonscm.debian.org/collab-maint/bcftools.git
+#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/bcftools.git;a=summary
+
+Package: bcftools
+Architecture: any
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends}
+Description: genomic variant calling and manipulation of VCF/BCF files
+ BCFtools is a set of utilities that manipulate variant calls in the
+ Variant Call Format (VCF) and its binary counterpart BCF. All commands work
+ transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/patches/compiler-flags.patch b/debian/patches/compiler-flags.patch
new file mode 100644
index 0000000..7a44a01
--- /dev/null
+++ b/debian/patches/compiler-flags.patch
@@ -0,0 +1,35 @@
+Description: Allow compiler flags to be passed through to build system
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: no
+Last-Update: 2015-11-03
+--- bcftools.orig/Makefile
++++ bcftools/Makefile
+@@ -32,8 +32,8 @@
+ BGZIP = /usr/bin/bgzip
+ TABIX = /usr/bin/tabix
+
+-CC = gcc
+-CFLAGS = -g -Wall -Wc++-compat -O2
++CC ?= gcc
++CFLAGS += -g -Wall -Wc++-compat -O2
+ DFLAGS =
+ OBJS = main.o vcfindex.o tabix.o \
+ vcfstats.o vcfisec.o vcfmerge.o vcfquery.o vcffilter.o filter.o vcfsom.o \
+@@ -52,6 +52,8 @@
+ LDLIBS = -lgsl -lgslcblas
+ endif
+
++LDLIBS += $(LDFLAGS)
++
+ prefix = /usr/local
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+@@ -100,7 +102,7 @@
+ PLUGINM = $(PLUGINC:.c=.mk)
+
+ %.so: %.c version.h version.c
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -lhts
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $<
+
+ -include $(PLUGINM)
+
diff --git a/debian/patches/destdir.patch b/debian/patches/destdir.patch
new file mode 100644
index 0000000..df5bc79
--- /dev/null
+++ b/debian/patches/destdir.patch
@@ -0,0 +1,15 @@
+Description: Set installation prefix
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2015-11-03
+--- bcftools.orig/Makefile
++++ bcftools/Makefile
+@@ -54,7 +54,7 @@
+
+ LDLIBS += $(LDFLAGS)
+
+-prefix = /usr/local
++prefix = /usr
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+ mandir = $(prefix)/share/man
diff --git a/debian/patches/external-libs.patch b/debian/patches/external-libs.patch
new file mode 100644
index 0000000..1fa717a
--- /dev/null
+++ b/debian/patches/external-libs.patch
@@ -0,0 +1,78 @@
+Description: Use packaged libraries
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2015-11-03
+--- bcftools.orig/Makefile
++++ bcftools/Makefile
+@@ -29,11 +29,8 @@
+ all: $(PROG) $(TEST_PROG)
+
+ # Adjust $(HTSDIR) to point to your top-level htslib directory
+-HTSDIR = ../htslib
+-include $(HTSDIR)/htslib.mk
+-HTSLIB = $(HTSDIR)/libhts.a
+-BGZIP = $(HTSDIR)/bgzip
+-TABIX = $(HTSDIR)/tabix
++BGZIP = /usr/bin/bgzip
++TABIX = /usr/bin/tabix
+
+ CC = gcc
+ CFLAGS = -g -Wall -Wc++-compat -O2
+@@ -52,7 +49,7 @@
+ ifdef USE_GPL
+ CFLAGS += -DUSE_GPL
+ OBJS += polysomy.o
+- LDLIBS = -lgsl -lcblas
++ LDLIBS = -lgsl -lgslcblas
+ endif
+
+ prefix = /usr/local
+@@ -90,10 +87,10 @@
+ .c.o:
+ $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
+
+-test: $(PROG) plugins test/test-rbuf $(BGZIP) $(TABIX)
++test: $(PROG) plugins test/test-rbuf
+ ./test/test.pl --exec bgzip=$(BGZIP) --exec tabix=$(TABIX)
+
+-test-plugins: $(PROG) plugins test/test-rbuf $(BGZIP) $(TABIX)
++test-plugins: $(PROG) plugins test/test-rbuf
+ ./test/test.pl --plugins --exec bgzip=$(BGZIP) --exec tabix=$(TABIX)
+
+
+@@ -102,8 +99,8 @@
+ PLUGINS = $(PLUGINC:.c=.so)
+ PLUGINM = $(PLUGINC:.c=.mk)
+
+-%.so: %.c version.h version.c $(HTSDIR)/libhts.so
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -L$(HTSDIR) -lhts
++%.so: %.c version.h version.c
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -lhts
+
+ -include $(PLUGINM)
+
+@@ -158,8 +155,8 @@
+ test/test-rbuf: test/test-rbuf.o
+ $(CC) $(CFLAGS) -o $@ -lm -ldl $<
+
+-bcftools: $(HTSLIB) $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(LDLIBS)
++bcftools: $(OBJS)
++ $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lz -lm -ldl -lhts $(LDLIBS)
+
+ doc/bcftools.1: doc/bcftools.txt
+ cd doc && a2x -adate="$(DOC_DATE)" -aversion=$(DOC_VERSION) --doctype manpage --format manpage bcftools.txt
+--- bcftools.orig/plugins/fixploidy.mk
++++ bcftools/plugins/fixploidy.mk
+@@ -1,2 +1,2 @@
+-plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -L$(HTSDIR) -lhts
++plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -lhts
+--- bcftools.orig/plugins/vcf2sex.mk
++++ bcftools/plugins/vcf2sex.mk
+@@ -1,2 +1,2 @@
+-plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -L$(HTSDIR) -lhts
++plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -lhts
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8cc41f9
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+external-libs.patch
+compiler-flags.patch
+destdir.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..f1ff72d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+CFLAGS := $(CPPFLAGS) $(CFLAGS)
+
+export HTSDIR=/usr/include
+export USE_GPL=1
+
+%:
+ dh $@ --parallel
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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bcftools.git
More information about the debian-med-commit
mailing list