[med-svn] [unanimity] 04/10: Working packaging

Afif Elghraoui afif at moszumanska.debian.org
Fri Dec 23 10:34:14 UTC 2016


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

afif pushed a commit to branch master
in repository unanimity.

commit 23d203d9e6d58c9e543c1d180972019373324cfd
Author: Afif Elghraoui <afif at debian.org>
Date:   Fri Dec 23 01:51:40 2016 -0800

    Working packaging
---
 debian/compat                          |  2 +-
 debian/control                         | 23 ++++++++-------
 debian/patches/cxx-std.patch           | 17 +++++++++++
 debian/patches/git-version.patch       | 20 +++++++++++++
 debian/patches/no-static-linking.patch | 13 ++++++++
 debian/patches/series                  |  3 ++
 debian/pbccs.install                   |  1 +
 debian/rules                           | 54 +++++++++++++++++++++++++++-------
 8 files changed, 110 insertions(+), 23 deletions(-)

diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 9c01f9b..e3c0af3 100644
--- a/debian/control
+++ b/debian/control
@@ -4,10 +4,11 @@ Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Afif Elghraoui <afif at debian.org>
 Build-Depends:
-	debhelper (>= 9),
+	debhelper (>= 10),
 	dh-python,
 	cmake,
 	swig,
+	python-setuptools,
 	python-all-dev,
 	python-numpy,
 	libboost-dev,
@@ -20,7 +21,7 @@ Vcs-Browser: https://anonscm.debian.org/git/debian-med/packages/unanimity
 Vcs-Git: https://anonscm.debian.org/git/debian-med/packages/unanimity
 Homepage: https://github.com/PacificBiosciences/unanimity
 
-Package: unanimity
+Package: pbccs
 Architecture: any
 Depends:
 	${shlibs:Depends},
@@ -30,12 +31,12 @@ Depends:
 Description: Pacific Biosciences nucleotide sequencing consensus
  <long_description>
 
-#Package: python-consensuscore2
-#Section: python
-#Architecture: any
-#Depends:
-#	${shlibs:Depends},
-#	${misc:Depends},
-#	${python:Depends},
-#Description: consensuscore2
-# long description of consensuscore2
+Package: python-consensuscore2
+Section: python
+Architecture: any
+Depends:
+	${shlibs:Depends},
+	${misc:Depends},
+	${python:Depends},
+Description: consensuscore2
+ long description of consensuscore2
diff --git a/debian/patches/cxx-std.patch b/debian/patches/cxx-std.patch
new file mode 100644
index 0000000..8e5d33f
--- /dev/null
+++ b/debian/patches/cxx-std.patch
@@ -0,0 +1,17 @@
+Description: Don't force -std-c++11
+ Otherwise we get:
+   error SeqAn requires C++14! You must compile your application with -std=c++14, -std=gnu++14 or -std=c++1y."
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: not-needed
+Last-Update: 2016-12-18
+--- unanimity.orig/cmake/uny-compilerflags.cmake
++++ unanimity/cmake/uny-compilerflags.cmake
+@@ -2,7 +2,7 @@
+ include(CheckCXXCompilerFlag)
+ 
+ # shared CXX flags for all source code & tests
+-set(UNY_FLAGS "-std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable")
++set(UNY_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable")
+ 
+ # gperftools support
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND APPLE)
diff --git a/debian/patches/git-version.patch b/debian/patches/git-version.patch
new file mode 100644
index 0000000..e3343e8
--- /dev/null
+++ b/debian/patches/git-version.patch
@@ -0,0 +1,20 @@
+--- unanimity.orig/cmake/uny-gitsha1.cmake
++++ unanimity/cmake/uny-gitsha1.cmake
+@@ -5,16 +5,5 @@
+ set(__find_git_sha1 YES)
+ 
+ function(find_git_sha1 _GIT_SHA1)
+-    find_package(Git QUIET REQUIRED)
+-    execute_process(COMMAND
+-        "${GIT_EXECUTABLE}" "describe" "--always" "--dirty=-dirty"
+-        WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+-        RESULT_VARIABLE res
+-        OUTPUT_VARIABLE out
+-        ERROR_QUIET
+-        OUTPUT_STRIP_TRAILING_WHITESPACE)
+-    if (NOT res EQUAL 0)
+-        message(FATAL_ERROR "Could not determine git sha1 via `git describe --always --dirty=*`")
+-    endif()
+-    set(${_GIT_SHA1} "${out}" PARENT_SCOPE)
++    set(${_GIT_SHA1} "" PARENT_SCOPE)
+ endfunction()
diff --git a/debian/patches/no-static-linking.patch b/debian/patches/no-static-linking.patch
new file mode 100644
index 0000000..a2fbbf5
--- /dev/null
+++ b/debian/patches/no-static-linking.patch
@@ -0,0 +1,13 @@
+--- unanimity.orig/cmake/uny-compilerflags.cmake
++++ unanimity/cmake/uny-compilerflags.cmake
+@@ -9,9 +9,8 @@
+     set(UNY_LINKER_FLAGS "${UNY_LINKER_FLAGS} -Wl,-no_pie")
+ endif(CMAKE_BUILD_TYPE STREQUAL "Debug" AND APPLE)
+ 
+-# static linking
+ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+-    set(UNY_LINKER_FLAGS "${UNY_LINKER_FLAGS} -static-libgcc -static-libstdc++")
++    set(UNY_LINKER_FLAGS "${UNY_LINKER_FLAGS}")
+ ENDIF()
+ 
+ # NOTE: quash clang warnings w/ Boost
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..dbfb750
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+git-version.patch
+cxx-std.patch
+no-static-linking.patch
diff --git a/debian/pbccs.install b/debian/pbccs.install
new file mode 100644
index 0000000..62c2eba
--- /dev/null
+++ b/debian/pbccs.install
@@ -0,0 +1 @@
+/usr/bin/ccs
diff --git a/debian/rules b/debian/rules
index e918bc5..647a61a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,25 +6,57 @@ export LC_ALL=C.UTF-8
 
 # for hardening you might like to uncomment this:
 # export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+#export DEB_CXXFLAGS_MAINT_APPEND=-std=c++14
 
 export INCLUDE=/usr/include
 export LIB=/usr/lib/$(DEB_HOST_MULTIARCH)
 
+export pbcopper_INCLUDE_DIRS=$(INCLUDE)
+export pbcopper_LIBRARIES=$(LIB)/libpbcopper.a
+
+export PYBUILD_NAME=consensuscore2
+
 %:
-	dh $@ --with python2 --buildsystem=cmake
+	dh $@ \
+	--package=pbccs \
+	--no-package=python-consensuscore2 \
+	--buildsystem=cmake \
+	--builddirectory=build
+	dh $@ \
+	--package=python-consensuscore2 \
+	--no-package=pbccs \
+	--with python2 \
+	--buildsystem=pybuild \
+	--builddirectory=build
+
+# We only want to run the configure step once. If we do not do this,
+# cmake attempts to run (from the second dh invocation) in the pybuild
+# build directory (which cannot be changed; pybuild ignores --builddirectory)
+# and fails.
+override_dh_auto_configure: config-main;
 
-override_dh_auto_configure:
-	dh_auto_configure -- \
+config-main:
+	dh_auto_configure --package=pbccs -- \
+	-DCMAKE_EXE_LINKER_FLAGS="-lpthread" \
 	-DUNY_build_tests=OFF \
 	-DPYTHON_SWIG=ON \
-#	-DZLIB_INCLUDE_DIRS= \
-#	-DZLIB_LIBRARIES= \
-#	-DBoost_INCLUDE_DIRS= \
-#	-DPacBioBAM_INCLUDE_DIRS= \
-#	-DPacBioBAM_LIBRARIES=$(LIB)/libpbbam.so \
-#	-DSEQAN_INCLUDE_DIRS=
-#	-Dpbcopper_INCLUDE_DIRS= \
-#	-Dpbcopper_LIBRARIES= \
+	-DZLIB_INCLUDE_DIRS=$(INCLUDE) \
+	`#-DZLIB_LIBRARIES=$(LIB)` \
+	-DBoost_INCLUDE_DIRS=$(INCLUDE) \
+	-DPacBioBAM_INCLUDE_DIRS=$(INCLUDE) \
+	-DPacBioBAM_LIBRARIES=$(LIB)/libpbbam.so \
+	-DSEQAN_INCLUDE_DIRS=$(INCLUDE) \
+	-Dpbcopper_INCLUDE_DIRS=$(INCLUDE) \
+	-Dpbcopper_LIBRARIES=$(LIB)/libpbcopper.a
+	touch $@
+
+override_dh_python2:
+	dh_python2
+	dh_numpy
+
+override_dh_auto_clean:
+	dh_auto_clean
+	$(RM) config-main
 
 #get-orig-source:
 #	. debian/get-orig-source

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



More information about the debian-med-commit mailing list