Skip to content

Commit

Permalink
Build script, build instructions, build statically
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 15, 2020
1 parent ee20f5b commit a8583f2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
project(Haploflow)

set(Boost_USE_STATIC_LIBS ON)
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

find_package(Boost 1.55 COMPONENTS system filesystem program_options REQUIRED)
find_package(Boost 1.54 COMPONENTS system filesystem program_options REQUIRED)

include_directories(
${Boost_INCLUDE_DIRS}
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ This README lists the requirements, installation information and a short tutoria
If using Haploflow, please cite:
A. Fritz, A. Bremges, Z.-L. Deng, T.-R. Lesker, T. Ganzenmüller, F. Klawonn, A. Dilthey, A.C. McHardy, "Haploflow: strain-resolved viral genome assembly with applications to SARS-CoV-2 and HCMV", DOI to come

## Requirements
## Build requirements
- CMake >= 2.8
- Boost >= 1.55
- Boost >= 1.54

## Installation
First, clone this repository using `git clone` _address_, then enter the directory which you cloned Haploflow to and create a build folder,
e.g. `mkdir build`. Enter this new directory and run cmake with `cd build; cmake ..`. This will create a Makefile which you can then run
to create the Haploflow executable: `make`
This should create a `haploflow` executable in your build directory.
to create the Haploflow executable: `make`. This should create a `haploflow` executable in your build directory.
When building on Ubuntu >= 14.04, build.sh will perform these steps, build a manpage and produce a tar file as build/haploflow.tar.gz

## Installation
The haploflow executable can be directly executed. If using the haploflow.tar.gz file, it can be unpacked (with tar xvf haploflow.tar.gz)
to / as user root, which will install the executable and man page in locations which should already be in the path / manpath. The tar.gz
file can also be unpacked to any other location (eg. home dir) and the executable run from that location.


## Short tutorial
Using the executable you can show the help and parameters using `./haploflow --help`. This lists the parameters as follows:
Expand Down
22 changes: 22 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

echo "Build assumes Ubuntu >= 14.04"

sudo apt install cmake libboost-all-dev ruby-ronn git build-essential

DIR=`pwd`

mkdir -p build
cd build
cmake ..
make

sudo cp haploflow /usr/local/bin

cd ..
ronn -r --pipe haploflow.md > haploflow.1
mkdir -p /usr/local/man/man1
sudo cp haploflow.1 /usr/local/man/man1

cd /
tar czvf $DIR/build/haploflow.tar.gz usr/local/bin/haploflow usr/local/man/man1/haploflow.1

0 comments on commit a8583f2

Please sign in to comment.