-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_vmatch
executable file
·83 lines (71 loc) · 2.5 KB
/
build_vmatch
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh -e
. uniqueness.sh
LM_SRC_DIR=$HOME/lscsa
LM_TAR_NAME=licensemanager-src-current.tar.gz
LM_DIR=licensemanager-src-current
GT_SRC_DIR=/var/www/servers/genometools.org/htdocs/pub
GT_TAR_NAME=genometools-unstable.tar.gz
GT_DIR=genometools-unstable
VMATCH_SRC_DIR=$HOME/lscsa
VMATCH_TAR_NAME=vstree-src-current.tar.gz
VMATCH_DIR=vstree-src-current
METASCRIPTS_DIR=$HOME/gtmetascripts
if ([ $LM_SRC_DIR/$LM_TAR_NAME -nt $METASCRIPTS_DIR/vmatch_build/$LM_TAR_NAME ] ||\
[ $GT_SRC_DIR/$GT_TAR_NAME -nt $METASCRIPTS_DIR/vmatch_build/$GT_TAR_NAME ] ||
[ $VMATCH_SRC_DIR/$VMATCH_TAR_NAME -nt $METASCRIPTS_DIR/vmatch_build/$VMATCH_TAR_NAME ])\
&& is_unique
then
# build libgenometools (32bit)
cp -f $GT_SRC_DIR/$GT_TAR_NAME $METASCRIPTS_DIR/vmatch_build
rm -rf $METASCRIPTS_DIR/vmatch_build/$GT_DIR
rm -rf $METASCRIPTS_DIR/vmatch_build/genometools
cd $METASCRIPTS_DIR/vmatch_build
tar xzf $GT_TAR_NAME
mv $GT_DIR genometools
cd genometools
make 32bit=yes cairo=no amalgamation=yes > /dev/null
# build license manager library (32bit)
cp -f $LM_SRC_DIR/$LM_TAR_NAME $METASCRIPTS_DIR/vmatch_build
rm -rf $METASCRIPTS_DIR/vmatch_build/$LM_DIR
rm -rf $METASCRIPTS_DIR/vmatch_build/licensemanager
cd $METASCRIPTS_DIR/vmatch_build
tar xzf $LM_TAR_NAME
mv $LM_DIR licensemanager
cd licensemanager
make
# build and test Vmatch
cp -f $VMATCH_SRC_DIR/$VMATCH_TAR_NAME $METASCRIPTS_DIR/vmatch_build
rm -rf $METASCRIPTS_DIR/vmatch_build/$VMATCH_DIR
cd $METASCRIPTS_DIR/vmatch_build
tar xzf $VMATCH_TAR_NAME
cd $VMATCH_DIR/src
VERSION=`cat VERSION`
DISTDIR="$METASCRIPTS_DIR/vmatchdistributions-$VERSION"
echo "make sure distribution directory \"$DISTDIR\" exists"
test -d $DISTDIR || mkdir -p $DISTDIR
echo "build local (32bit)"
TMPFILE=`mktemp` || exit 1
mklink.sh linux-gcc
make > /dev/null
make check > /dev/null
make dist > $TMPFILE
DISTRIBUTION=`tail -n 1 $TMPFILE`
cp -f $DISTRIBUTION $DISTDIR
# build libgenometools (64bit)
cd $METASCRIPTS_DIR/vmatch_build/genometools
make cleanup
make 64bit=yes cairo=no amalgamation=yes > /dev/null
# build license manager library (64bit)
cd $METASCRIPTS_DIR/vmatch_build/licensemanager
make 64bit=yes
echo "build local (64bit)"
cd $METASCRIPTS_DIR/vmatch_build/$VMATCH_DIR/src
TMPFILE=`mktemp` || exit 1
mklink.sh linux-gcc-64
make 64bit=yes cleanup
make 64bit=yes > /dev/null
make 64bit=yes check > /dev/null
make 64bit=yes dist > $TMPFILE
DISTRIBUTION=`tail -n 1 $TMPFILE`
cp -f $DISTRIBUTION $DISTDIR
fi