[med-svn] [bcftools] 01/02: Update packaging for new build system

Afif Elghraoui afif at moszumanska.debian.org
Tue Aug 8 15:01:45 UTC 2017


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

afif pushed a commit to branch master
in repository bcftools.

commit 0206c3d81e695291f17b780e77e671f95e36860b
Author: Afif Elghraoui <afif at debian.org>
Date:   Mon Aug 7 20:09:34 2017 -0400

    Update packaging for new build system
---
 debian/control                     |  3 ++-
 debian/patches/destdir.patch       | 26 --------------------------
 debian/patches/fix_config.mk.patch | 11 -----------
 debian/patches/series              |  1 -
 debian/rules                       | 27 ++++++++++++++++++---------
 5 files changed, 20 insertions(+), 48 deletions(-)

diff --git a/debian/control b/debian/control
index 3423f5d..8fc52e2 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,9 @@ Uploaders:
 	Afif Elghraoui <afif at debian.org>
 Build-Depends:
 	debhelper (>= 10),
-        autoconf-archive,
 	zlib1g-dev,
+	libbz2-dev,
+	liblzma-dev,
 	libhts-dev (>= 1.5),
 	libgsl-dev,
 # Test-Depends:
diff --git a/debian/patches/destdir.patch b/debian/patches/destdir.patch
deleted file mode 100644
index b3bb456..0000000
--- a/debian/patches/destdir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Set installation prefix
-Author: Afif Elghraoui <afif at ghraoui.name>
-Forwarded: not-needed
-Last-Update: 2015-11-03
---- a/Makefile
-+++ b/Makefile
-@@ -41,7 +41,7 @@ OBJS     = main.o vcfindex.o tabix.o \
-            mpileup.o bam2bcf.o bam2bcf_indel.o bam_sample.o \
-            ccall.o em.o prob1.o kmin.o # the original samtools calling
- 
--prefix      = /usr/local
-+prefix      = /usr
- exec_prefix = $(prefix)
- bindir      = $(exec_prefix)/bin
- libdir      = $(exec_prefix)/lib
---- a/config.mk.in
-+++ b/config.mk.in
-@@ -47,7 +47,7 @@ GSL_LIBS = -lgsl -lgslcblas
- 
- PLATFORM   = @PLATFORM@
- PLUGINS_ENABLED = @enable_bcftools_plugins@
--plugindir = @bcf_plugindir@
-+plugindir ?= @bcf_plugindir@
- PLUGIN_EXT = @PLUGIN_EXT@
- 
- @Hsource at BGZIP = /usr/bin/bgzip
diff --git a/debian/patches/fix_config.mk.patch b/debian/patches/fix_config.mk.patch
deleted file mode 100644
index 3f80c2c..0000000
--- a/debian/patches/fix_config.mk.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -81,7 +81,7 @@ ALL_LIBS     = -lz -ldl $(LIBS)
- # Usually config.mk and config.h are generated by running configure
- # or config.status, but if those aren't used create defaults here.
- config.mk:
--	@sed -e '/^prefix/,/^PLUGIN_EXT/d;s/@Hsource@//;s/@Hinstall@/#/;s#@HTSDIR@#../htslib#g;s/@HTSLIB_CPPFLAGS@/-I$$(HTSDIR)/g;' config.mk.in > $@
-+	@sed -e '/^prefix/,/^PLUGIN_EXT/d;s/@Hsource@//;s/@Hinstall@/#/;s#@HTSDIR@#/usr/lib/htslib#g;s#@HTSLIB_CPPFLAGS@#-I/usr/include#g;' config.mk.in > $@
- 
- config.h:
- 	echo '/* Basic config.h generated by Makefile */' > $@
diff --git a/debian/patches/series b/debian/patches/series
index 7df1fc6..b4ead10 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,3 @@
 # destdir.patch
 tests-pluginpath.patch
 test-regidx-unsigned-char.patch
-fix_config.mk.patch
diff --git a/debian/rules b/debian/rules
index 00beee4..71cf17c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,6 @@
 #DH_VERBOSE = 1
 #include /usr/share/dpkg/default.mk
 
-export HTSDIR=/usr/include
-export USE_GPL=1
-export plugindir=/usr/lib/$(DEB_HOST_MULTIARCH)/bcftools
-
 %:
 	dh $@ --parallel
 
@@ -14,10 +10,23 @@ override_dh_installman:
 	dh_installman --language=C
 
 # clean target tries to include config.mk which does not exist inside clean source tree
-override_dh_auto_clean:
-	dh_auto_clean || true
-	# now it is created but should vanish
-	rm -f config.mk
+clean: config.mk
+
+config.mk:
+	$(RM) $@ && touch $@
+
+# m4 calls `make print-version` in configure.ac to set the version string.
+# If `make` is not silent, this string includes logging messages about changing
+# directories due to the way it is invoked, which breaks
+# the C compiler test because it introduces a multiline #define statement with
+# newlines not escaped.
+override_dh_autoreconf: config.mk
+	export MAKEFLAGS="-s"; dh_autoreconf
 
+#override_dh_auto_configure:
 override_dh_auto_configure:
-	dh_auto_configure -- --with-htslib=/usr/lib/htslib
+	dh_auto_configure -- \
+	--with-htslib=system \
+	--enable-gsl \
+	--with-cblas=gslcblas \
+	--with-bcf-plugin-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/bcftools

-- 
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