Skip to content

Commit

Permalink
Merge branch 'release-v0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
cartoonist committed Oct 9, 2018
2 parents f53c338 + c15bab1 commit c7add97
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
33 changes: 33 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
KSEQPP=kseq++
DEFAULT_PREFIX=/usr/local
TEMPLATE_PATH=./lib/pkgconfig/kseq++_pc.template
PKGCONFIG_FILE=./lib/pkgconfig/kseq++.pc
INSTALL="install -v"

PREFIX="$DEFAULT_PREFIX"
if [ -n "$1" ]; then
PREFIX="$1"
else
echo "No PREFIX provided. Assuming '$DEFAULT_PREFIX'"
fi

function generate_pcfile {
prefix="$PREFIX"
version=$(git describe)
template=$(cat "$TEMPLATE_PATH")
eval "echo \"$template\"" > "$PKGCONFIG_FILE"
}

function install_files {
dest="$PREFIX/include/$KSEQPP"
pc_dest="$PREFIX/lib/pkgconfig"
src=./src
mkdir -p "$dest"
mkdir -p "$pc_dest"
find "$src" -type f | xargs -I{} -- $INSTALL -v {} "$dest"
$INSTALL "$PKGCONFIG_FILE" "$pc_dest"
}

generate_pcfile
install_files
11 changes: 11 additions & 0 deletions lib/pkgconfig/kseq++_pc.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=$prefix
exec_prefix=\${prefix}
includedir=\${prefix}/include

Name: kseq++
Description: Fast FASTA/Q parser and writer
URL: https://github.com/cartoonist/kseqpp
Version: $version
Requires: zlib
Cflags: -I\${includedir}
Libs: -lz -lbz2 -lpthread
2 changes: 1 addition & 1 deletion src/kseq++.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// versioning
#define KLIBPP_MAJOR 0
#define KLIBPP_MINOR 1
#define KLIBPP_REVISION 3
#define KLIBPP_REVISION 4

namespace klibpp {
template< typename TFile,
Expand Down

0 comments on commit c7add97

Please sign in to comment.