-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script to build nightly versions from the devel branches
- Loading branch information
1 parent
13ad46c
commit ec8eb8a
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/sh | ||
|
||
# github repository to pull from | ||
repname=samtools | ||
|
||
# directory to do the pull and build | ||
TMPDIR=`readlink -f $TMPDIR` | ||
|
||
# directory to install into | ||
PREFIX=`readlink -f $PREFIX` | ||
|
||
# clean up TMPDIR | ||
mkdir -p $TMPDIR | ||
rm -fr $TMPDIR/* | ||
cd $TMPDIR | ||
|
||
# build each repository in turn | ||
for repo in htslib htslib-plugins samtools bcftools; do | ||
echo Building $repo | ||
git clone git@github.com:$repname/$repo.git | ||
cd $repo | ||
version=`git log -1 --format="%h"` | ||
date=`date +"%d %B %Y"` | ||
rm -fr .git* | ||
sed -i "s/PACKAGE_VERSION[ ][ ]*=.*/PACKAGE_VERSION = $version/" Makefile | ||
if [ -e htsfile.1 ]; then | ||
sed -i "s/^.TH.*/.TH htsfile 1 \"$date\" \"htslib-$version\" \"Bioinformatics tools\"/" htsfile.1 | ||
fi | ||
if [ -e tabix.1 ]; then | ||
sed -i "s/^.TH.*/.TH tabix 1 \"$date\" \"htslib-$version\" \"Bioinformatics tools\"/" tabix.1 | ||
fi | ||
if [ -e samtools.1 ]; then | ||
sed -i "s/^.TH.*/.TH samtools 1 \"$date\" \"samtools-$version\" \"Bioinformatics tools\"/" samtools.1 | ||
fi | ||
if [ -e misc/wgsim.1 ]; then | ||
sed -i "s/^.TH.*/.TH wgsim 1 \"$date\" \"samtools-$version\" \"Bioinformatics tools\"/" misc/wgsim.1 | ||
fi | ||
if [ -e README ]; then | ||
sed -i "s/samtools-.*/samtools-$version # Within the unpacked release directory/" README | ||
sed -i "s/htslib-.*/htslib-$version/" README | ||
fi | ||
if [ -e bam.h ]; then | ||
sed -i "s/BAM_VERSION.*/BAM_VERSION \"$version+\"/" bam.h | ||
fi | ||
|
||
if [ -e doc/bcftools.1 ]; then | ||
echo make DOC_VERSION=\"$version\" DOC_DATE=`date +"%Y-%m-%d"` docs | ||
make -n DOC_VERSION=\"$version\" DOC_DATE=`date +"%Y-%m-%d"` docs | ||
fi | ||
cd .. | ||
done | ||
|
||
# Build htslib plugins | ||
cd $TMPDIR/htslib-plugins | ||
IRODS_HOME=/software/solexa/pkg/irods/4.1.10/usr HTSDIR=$TMPDIR/htslib make | ||
make prefix=$PREFIX/htslib-plugins/nightly install | ||
|
||
# Build htslib | ||
cd $TMPDIR/htslib | ||
autoreconf -i | ||
./configure --prefix=$PREFIX/htslib/nightly --enable-libcurl --enable-plugins --with-plugin-dir=$PREFIX/htslib-plugins/nightly/libexec/htslib | ||
make | ||
make test | ||
make install | ||
|
||
# Build samtools | ||
cd $TMPDIR/samtools | ||
autoreconf -i | ||
./configure --prefix=$PREFIX/samtools/nightly --with-htslib=$TMPDIR/htslib | ||
make | ||
make test | ||
make install | ||
|
||
# Build bcftools | ||
cd $TMPDIR/bcftools | ||
make HTSDIR=$TMPDIR/htslib | ||
make | ||
make test | ||
make prefix=$PREFIX/bcftools/nightly install | ||
|