Skip to content

Commit

Permalink
Merge branch 'feat/debian' into dev
Browse files Browse the repository at this point in the history
Initial debianisation of axe. Likely to change, but here it is
  • Loading branch information
kdm9 committed Feb 24, 2015
2 parents 41c67ca + 4c96bbe commit 234ac94
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ build
*.so
tags
version

# debian
version
axe-deb
axe-demuxer_*
23 changes: 14 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
ENABLE_TESTING()

IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_BUILD_TYPE Release)
ENDIF()

IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/version")
Expand All @@ -22,25 +22,26 @@ ELSE()
OUTPUT_VARIABLE AXE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDIF()

MESSAGE(STATUS "${CMAKE_BUILD_TYPE} build of axe version: ${AXE_VERSION}")

###############################
## Find Packages and Headers ##
###############################

# all are now handled by libqes
# Done by libqes' CML.txt

##########################
## Set Compiler Options ##
##########################

IF (CMAKE_COMPILER_IS_GNUCC)
SET(AXEWRN "${AXEWRN} -Woverride-init -Wnormalized=id -Wlogical-op")
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
IF (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
ENDIF()
SET(AXEWRN "${AXEWRN} -Woverride-init -Wnormalized=id -Wlogical-op")
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
IF (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
ENDIF()
ENDIF()

# Set CFLAGS
Expand All @@ -59,13 +60,17 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${AXEWRN}")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/datrie
${CMAKE_SOURCE_DIR}/src/libqes/src
${CMAKE_SOURCE_DIR}/src/gsl)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lib)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/libqes/src)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/src/axe_config.h.in
${CMAKE_BINARY_DIR}/axe_config.h)

ADD_SUBDIRECTORY(docs)
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(src)
SET(LIBQES_AS_SUBMODULE True) # stop libqes installing itself
ADD_SUBDIRECTORY(src/libqes)
7 changes: 7 additions & 0 deletions deb-clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -ex

rm -f axe-demuxer*
rm -f version
rm -rf axe-deb
20 changes: 20 additions & 0 deletions deb-make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e
set -x

test -d .git

PKG_DIR=axe-deb
SRC_DIRS="src/ docs/ tests/ CMakeLists.txt debian/ version"

# grab version from changelog
VERSION="$(head -n 1 debian/changelog |perl -pe 's/.*\((.+)-.*/$1/')"

echo $VERSION >version
rm -rf $PKG_DIR/* axe_*.orig.tar.gz
mkdir -p $PKG_DIR
cp -r $SRC_DIRS $PKG_DIR


tar czf axe-demuxer_${VERSION}.orig.tar.gz $SRC_DIRS
2 changes: 2 additions & 0 deletions debian/axe-demuxer.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/bin
usr/share/man/man1
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
axe-demuxer (0.2.1-1) UNRELEASED; urgency=medium

* Initial debian release. (Closes: #XXXXX)

-- Kevin Murray <[email protected]> Mon, 26 Jan 2015 11:00:07 +1100
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
18 changes: 18 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: axe-demuxer
Maintainer: Kevin Murray <[email protected]>
Section: science
Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper (>= 9),
cmake,
zlib1g-dev
Homepage: https://github.com/kdmurray91/axe

Package: axe-demuxer
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Trie-based DNA sequencing read demultiplexer
AXE very rapidly selects the optimal barcode present in a sequence read, even
in the presence of sequencing errors. The algorithm is able to handle
combinatorial barcoding, barcodes of differing length, and several mismatches
per barcode.
22 changes: 22 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: axe
Source: https://github.com/kdmurray91/axe

Files: *
Copyright: 2014 Kevin Murray
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
dh $@ --buildsystem=cmake

1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
22 changes: 11 additions & 11 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
FIND_PROGRAM(SPHINXBUILD sphinx-build)
IF(SPHINXBUILD)
SET(ALLSPHINXOPTS -q -D latex_paper_size=a4)
ADD_CUSTOM_TARGET(doc_html
COMMAND ${SPHINXBUILD} -b html ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/html
SET(ALLSPHINXOPTS -q -D latex_paper_size=a4)
ADD_CUSTOM_TARGET(doc_html
COMMAND ${SPHINXBUILD} -b html ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/html
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ADD_CUSTOM_TARGET(doc_onehtml
COMMAND ${SPHINXBUILD} -b singlehtml ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/single
)
ADD_CUSTOM_TARGET(doc_onehtml
COMMAND ${SPHINXBUILD} -b singlehtml ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/single
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ADD_CUSTOM_TARGET(doc_man
COMMAND ${SPHINXBUILD} -b man ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/man
)
ADD_CUSTOM_TARGET(doc_man
COMMAND ${SPHINXBUILD} -b man ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/man
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
)
ADD_CUSTOM_TARGET(doc_clean
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}/doc"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ADD_CUSTOM_TARGET(doc ALL DEPENDS doc_man doc_onehtml)
INSTALL(DIRECTORY "${CMAKE_BINARY_DIR}/doc/man/" DESTINATION "man" PATTERN ".*" EXCLUDE)
INSTALL(FILES ${CMAKE_BINARY_DIR}/doc/man/axe.1 DESTINATION "share/man/man1")
SET_DIRECTORY_PROPERTIES(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc/)
ENDIF()

4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Axe library (libaxe.a)
CONFIGURE_FILE(axe_config.h.in ${CMAKE_BINARY_DIR}/axe_config.h)
FILE(GLOB DATRIE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/datrie/*.c)
FILE(GLOB GSL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/gsl/*.c)
SET(AXELIB_SRCS ${DATRIE_SRCS} ${GSL_SRCS} axe.c)

ADD_LIBRARY(axelib STATIC ${AXELIB_SRCS})
TARGET_LINK_LIBRARIES(axelib ${AXE_DEPENDS_LIBS} qes_static)
TARGET_LINK_LIBRARIES(axelib qes_static)
SET_TARGET_PROPERTIES(axelib PROPERTIES OUTPUT_NAME axe)

# Executable
Expand Down
2 changes: 1 addition & 1 deletion src/libqes

0 comments on commit 234ac94

Please sign in to comment.