[med-svn] [blasr] 03/05: build bax2bam and bam2bax
Afif Elghraoui
afif at moszumanska.debian.org
Tue Dec 20 10:06:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
afif pushed a commit to branch master
in repository blasr.
commit 153c0f9e3efd99917ff0ada225470ec2d43a02b7
Author: Afif Elghraoui <afif at debian.org>
Date: Tue Nov 1 00:24:19 2016 -0700
build bax2bam and bam2bax
These two programs have their own build systems, so somewhat
complicate the packaging. bam2bax in particular requires
pbseqlib to be compiled with pbbam.
---
debian/TODO | 2 +-
debian/control | 2 ++
debian/install | 2 ++
debian/patches/cmake-utils.patch | 25 +++++++++++++++++++++++
debian/patches/disable-gtest.patch | 28 +++++++++++++++++++++++++
debian/patches/series | 2 ++
debian/rules | 42 ++++++++++++++++++++++++++++++++------
7 files changed, 96 insertions(+), 7 deletions(-)
diff --git a/debian/TODO b/debian/TODO
index 04d3e21..7139ddb 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -2,4 +2,4 @@
* Update manpages
-* build bax2bam and bam2bax
+* run test suite for bax2bam and bam2bax
diff --git a/debian/control b/debian/control
index 3aa10bd..5c0f3b5 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,8 @@ Uploaders: Afif Elghraoui <afif at debian.org>
Build-Depends:
debhelper (>= 9),
python,
+ cmake,
+ libboost-dev,
libhdf5-dev,
zlib1g-dev,
libpbseq-dev (>= 0~20160912),
diff --git a/debian/install b/debian/install
index 5bc54f4..35c29dc 100644
--- a/debian/install
+++ b/debian/install
@@ -7,3 +7,5 @@ utils/samFilter usr/bin
utils/toAfg usr/bin
utils/sawriter usr/bin
utils/sdpMatcher usr/bin
+utils/bax2bam/bin/* usr/bin
+utils/bam2bax/bin/* usr/bin
diff --git a/debian/patches/cmake-utils.patch b/debian/patches/cmake-utils.patch
new file mode 100644
index 0000000..1bb56da
--- /dev/null
+++ b/debian/patches/cmake-utils.patch
@@ -0,0 +1,25 @@
+Description: Fix passage of boost header paths to cmake
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: no
+--- blasr.orig/utils/bax2bam/makefile
++++ blasr/utils/bax2bam/makefile
+@@ -7,7 +7,7 @@
+ all: ${CURDIR}/src/* ${CURDIR}/tests/src/*
+ @mkdir -p ${CURDIR}/build && \
+ cd ${CURDIR}/build && \
+- cmake -DBOOST_ROOT=${BOOST_ROOT} \
++ cmake -DBoost_INCLUDE_DIRS=${BOOST_INC} \
+ -DPacBioBAM_INCLUDE_DIRS=${PBBAM_INC} \
+ -DHTSLIB_INCLUDE_DIRS=${HTSLIB_INC} \
+ -DPacBioBAM_LIBRARIES=${PBBAM_LIB}/libpbbam${SH_LIB_EXT} \
+--- blasr.orig/utils/bam2bax/makefile
++++ blasr/utils/bam2bax/makefile
+@@ -7,7 +7,7 @@
+ all: ${CURDIR}/src/*.cpp ${CURDIR}/src/*.h ${CURDIR}/tests/src/*.cpp ${CURDIR}/tests/src/*.h
+ @mkdir -p ${CURDIR}/build && \
+ cd ${CURDIR}/build && \
+- cmake -DBOOST_ROOT=${BOOST_ROOT} \
++ cmake -DBoost_INCLUDE_DIRS=${BOOST_INC} \
+ -DPacBioBAM_INCLUDE_DIRS=${PBBAM_INC} \
+ -DHTSLIB_INCLUDE_DIRS=${HTSLIB_INC} \
+ -DPacBioBAM_LIBRARIES=${PBBAM_LIB}/libpbbam${SH_LIB_EXT} \
diff --git a/debian/patches/disable-gtest.patch b/debian/patches/disable-gtest.patch
new file mode 100644
index 0000000..548b0fd
--- /dev/null
+++ b/debian/patches/disable-gtest.patch
@@ -0,0 +1,28 @@
+Description: temporarily disable gtests for bax2bam and bam2bax
+ We should make use of the packaged gtest; without additional effort,
+ the build system doesn't find it.
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: not-needed
+Last-Update: 2016-12-20
+--- blasr.orig/utils/bam2bax/CMakeLists.txt
++++ blasr/utils/bam2bax/CMakeLists.txt
+@@ -14,7 +14,7 @@
+ )
+
+ # build-time options
+-option(Bam2Bax_build_tests "Build Bam2Bax's unit tests." ON)
++option(Bam2Bax_build_tests "Build Bam2Bax's unit tests." OFF)
+
+ # main project paths
+ set(Bam2Bax_RootDir ${Bam2Bax_SOURCE_DIR})
+--- blasr.orig/utils/bax2bam/CMakeLists.txt
++++ blasr/utils/bax2bam/CMakeLists.txt
+@@ -14,7 +14,7 @@
+ )
+
+ # build-time options
+-option(Bax2BAM_build_tests "Build Bax2BAM's unit tests." ON)
++option(Bax2BAM_build_tests "Build Bax2BAM's unit tests." OFF)
+
+ # main project paths
+ set(Bax2Bam_RootDir ${Bax2Bam_SOURCE_DIR})
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..0f16b2d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+disable-gtest.patch
+cmake-utils.patch
diff --git a/debian/rules b/debian/rules
index eb33f93..823ec30 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,14 +2,26 @@
include /usr/share/dpkg/default.mk
+export VERBOSE=1 # for cmake
+export SH_LIB_EXT=.so
+
export HDF5_INC=/usr/include/hdf5/serial
export HDF5_LIB=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
-
-PBSEQ_BASE=/usr/include/pbseq
-export LIBBLASR_INC=$(PBSEQ_BASE)/alignment
-export LIBPBDATA_INC=$(PBSEQ_BASE)/pbdata
-export LIBPBIHDF_INC=$(PBSEQ_BASE)/hdf
-
+export BOOST_INC=/usr/include/boost
+export HTSLIB_INC=/usr/include/htslib
+export HTSLIB_LIB=/usr/lib/$(DEB_HOST_MULTIARCH)
+export PBBAM_INC=/usr/include
+export PBBAM_LIB=/usr/lib/$(DEB_HOST_MULTIARCH)
+export PBDATA_ROOT_DIR=/usr/include/pbseq
+export LIBBLASR_INC=$(PBDATA_ROOT_DIR)/alignment
+export LIBBLASR_LIB=/usr/lib/$(DEB_HOST_MULTIARCH)
+export LIBPBDATA_INC=$(PBDATA_ROOT_DIR)/pbdata
+export LIBPBDATA_LIB=/usr/lib/$(DEB_HOST_MULTIARCH)
+export LIBPBIHDF_INC=$(PBDATA_ROOT_DIR)/hdf
+export LIBPBIHDF_LIB=/usr/lib/$(DEB_HOST_MULTIARCH)
+
+# CPPFLAGS apparently aren't exported for bam2bax/bax2bam
+export DEB_CXXFLAGS_MAINT_PREPEND = $(CPPFLAGS) -I$(PBDATA_ROOT_DIR)
%:
dh $@ --parallel
@@ -17,10 +29,28 @@ export LIBPBIHDF_INC=$(PBSEQ_BASE)/hdf
override_dh_auto_configure:
./configure.py --shared
+override_dh_auto_build: main bax2bam bam2bax;
+
+.PHONY: main
+main:
+ dh_auto_build
+
+.PHONY: bax2bam
+bax2bam: utils/bax2bax/bin/bax2bam
+utils/bax2bax/bin/bax2bam:
+ $(MAKE) -C utils/bax2bam
+
+.PHONY: bam2bax
+bam2bax: utils/bam2bax/bin/bam2bax
+utils/bam2bax/bin/bam2bax:
+ $(MAKE) -C utils/bam2bax
+
# Tests require data not available in the source distribution
override_dh_auto_test: ;
override_dh_auto_clean: override_dh_auto_configure
$(MAKE) clean
+ $(MAKE) -C utils/bam2bax clean
+ $(MAKE) -C utils/bax2bam clean
# This is created by configure.py
$(RM) defines.mk
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/blasr.git
More information about the debian-med-commit
mailing list