Skip to content

Commit

Permalink
sra-tools: Add version 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Aug 15, 2022
1 parent ef52cb7 commit 9a2ae77
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 132 deletions.
108 changes: 0 additions & 108 deletions sra-tools-2.11.2.build.sh

This file was deleted.

77 changes: 53 additions & 24 deletions sra-tools-2.11.2-0.build.sh → sra-tools-3.0.0-0.build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#! /bin/bash
#! /bin/bash -x

COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.2; exec bash /dev/shm/runme-$COOKIE.sh $1

PKG=sra-tools
VERSION=2.11.2
VERSION=3.0.0
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
Expand All @@ -10,9 +12,9 @@ if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi
ARCHIVE=${PREFIX}/build/archive

#URL's
NGS="https://github.com/ncbi/ngs/archive/${VERSION}.tar.gz"
VDB="https://github.com/ncbi/ncbi-vdb/archive/${VERSION}.tar.gz"
SRA="https://github.com/ncbi/sra-tools/archive/${VERSION}.tar.gz"
#NGS="https://github.com/ncbi/ngs-tools/archive/refs/tags/${VERSION}.tar.gz"
VDB="https://github.com/ncbi/ncbi-vdb/archive/refs/tags/${VERSION}.tar.gz"
SRA="https://github.com/ncbi/sra-tools/archive/refs/tags/${VERSION}.tar.gz"

#BUILD Dirs
NGS_DIR=`echo $NGS |cut -d"/" -f5`
Expand All @@ -38,7 +40,7 @@ function get_extract () {
set -xe
umask 022

BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
Expand All @@ -54,15 +56,21 @@ cat >$PREFIX/profile <<-EOF
EOF
. $PREFIX/profile

export MAKEFLAGS="-j $(nproc)"
NJOBS=$(( $(nproc) * 4 / 5 + 1 ))

export MAKEFLAGS="-j $NJOBS"

BUILDDIR=$PREFIX/build

mkdir -p $BUILDDIR

cd $PREFIX
if [ ! -e lib ]; then
mkdir lib
fi
if [ ! -e lib64 ]; then
ln -s lib lib64
fi

cd $BUILDDIR

Expand All @@ -72,37 +80,58 @@ do
get_extract $i
done

ngstools-build() {

cd ${BUILDDIR}/${NGS_DIR}

./configure --prefix=${PREFIX} \
--build-prefix=${BUILDDIR}/ngs-outdir
echo -e "\n\n++++++++++++++ngs+++++++++++++++++\n\n"

}

make -C ngs-sdk
make -C ngs-java
#ngs-build()

make -C ngs-sdk install
make -C ngs-java install
vdb-build() {

cd ${BUILDDIR}/${VDB_DIR}

./configure --prefix=${PREFIX} \
--with-ngs-sdk-prefix=${BUILDDIR}/ngs-outdir \
--build-prefix=${BUILDDIR}/ncbi-outdir

make
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
.
make ${MAKEFLAGS}

make install

}

vdb-build

#ngs-build() {
#jetzt neu im repo von sratools
#}

sratools-build() {

echo -e "\n\n++++++++++++++sra-tools++++++++++++++++\n\n"

cd ${BUILDDIR}/${SRA_DIR}

./configure --with-ngs-sdk-prefix=${BUILDDIR}/ngs-outdir \
--with-ncbi-vdb-sources=${BUILDDIR}/${VDB_DIR} \
--with-ncbi-vdb-build=${BUILDDIR}/ncbi-outdir \
--prefix=${PREFIX} \
--build-prefix=${BUILDDIR}/sra-tools-outdir
test -d obj || mkdir obj
cd obj
test -e ngs || ln -s ../ngs .

VDB_SRCDIR=${BUILDDIR}/${VDB_DIR} make
cd ${BUILDDIR}/${SRA_DIR}

cmake \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DVDB_LIBDIR=${PREFIX}/lib \
-DVDB_BINDIR=${BUILDDIR}/${VDB_DIR} \
-DVDB_INCDIR=${BUILDDIR}/${VDB_DIR}/interfaces \
-DCMAKE_VERBOSE_MAKEFILE=ON \
.

make ${MAKEFLAGS}

make install
}
sratools-build

exit

0 comments on commit 9a2ae77

Please sign in to comment.