-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsamtools.build
47 lines (37 loc) · 1.49 KB
/
samtools.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
. tools.config
set -e
if [ ! -f ${PREFIX}/include/lzma.h ]; then
bash -x lzma.build
fi
if [ ! -f ${PREFIX}/include/libdeflate.h ]; then
bash -x libdeflate.build
fi
VERSION=1.20
wget -q --no-check-certificate -O samtools-${VERSION}.tar.bz2 https://github.com/samtools/samtools/releases/download/${VERSION}/samtools-${VERSION}.tar.bz2
tar xjf samtools-${VERSION}.tar.bz2
rm samtools-${VERSION}.tar.bz2
cd samtools-${VERSION}/
export CFLAGS="-fPIC `pkg-config --cflags libdeflate`"
export LDFLAGS="`pkg-config --libs libdeflate` -Wl,-rpath -Wl,${PREFIX}/lib"
export CPPFLAGS="-Wl,-rpath -Wl,${PREFIX}/lib"
./configure --prefix=${PREFIX} \
--libexecdir=${PREFIX}/share/libexec \
--enable-plugins --with-plugin-path=$PWD/htslib-${VERSION} \
--disable-libcurl --disable-bz2 \
--without-curses --with-libdeflate
make ${MAKE_FLAGS} all all-htslib
#make check
make install install-htslib
cd ..
rm -rf samtools-${VERSION}
for f in samtools bgzip htsfile; do
strip ${PREFIX}/bin/${f}
done
# not needed
rm -f ${PREFIX}/bin/{maq2sam-long,maq2sam-short,varfilter.py,zoom2sam.pl,soap2sam.pl,blast2sam.pl,export2sam.pl,bowtie2sam.pl,psl2sam.pl,seq_cache_populate.pl}
rm -f ${PREFIX}/bin/{novo2sam.pl,color-chrs.pl,tabix,md5fa,md5sum-lite,ace2sam,wgsim}
rm -f ${PREFIX}/share/man/man1/{bgzip.1,htsfile.1,tabix.1,wgsim.1}
rm -f ${PREFIX}/share/man/man1/samtools*
rm -f ${PREFIX}/share/man/man5/{faidx.5,vcf.5,sam.5}
rm -f ${PREFIX}/share/man/man7/htslib-s3-plugin.7
#rm -f ${PREFIX}/lib/libhts.a