This repository has been archived by the owner on Jan 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild_cellprofiler.sh
71 lines (61 loc) · 2.17 KB
/
build_cellprofiler.sh
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
#!/bin/bash
#
# This script will be run as the cpbuild user inside the virtual build
# machine. It is started from the Fabric script fabfile.py.
# Stop at first error.
set -e
# Print each command before executing it.
set -x
function makeall {
export GITHOME=/usr/CellProfiler/src/CellProfiler
export JAVA_HOME=$GITHOME/jdk1.7.0_21
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:/usr/CellProfiler/lib/
export PATH=/usr/CellProfiler/bin:$PATH
export HOSTTYPE=amd64
export BLAS=/usr/lib64
export LAPACK=/usr/lib64
cd $GITHOME
make -f Makefile.CP2.standard.64 all || true
/usr/CellProfiler/bin/python -m easy_install pyzmq
make -f Makefile.CP2.standard.64 all
}
function downloadjava {
url='http://cellprofiler.org/linked_files/CPPackageHost/'
javajdk='jdk-7u21-linux-x64.tar.gz'
javajre='jre-7u21-linux-x64.tar.gz'
javajdkrpm='jdk-7u21-linux-x64.rpm'
javajrerpm='jre-7u21-linux-x64.rpm'
cd /usr/CellProfiler/src/CellProfiler
wget $url/$javajdk
}
function installjava {
cd /usr/CellProfiler/src/CellProfiler
tar xf jdk-7u21-linux-x64.tar.gz
cd jdk1.7.0_21
unzip -q -o src.zip
}
function tarup {
cd $HOME
tar cvzf cellprofiler.tar.gz --exclude=/usr/CellProfiler/src /usr/CellProfiler
}
function clean {
cd /usr/CellProfiler/src/CellProfiler
rm ./*.tar.gz
rm ./*.tar.bz2
}
echo This is inside "$0"
# Install dependencies as RPM packages. These are the build dependencies;
# not all of them are required to run the finished software.
sudo yum -q -y install python-setuptools gcc gcc-c++ wget vim gtk2-devel git svn gcc-gfortran cmake mesa-libGL mesa-libGL-devel blas atlas lapack blas-devel atlas-devel lapack-devel xorg-x11-xauth* xorg-x11-xkb-utils* unzip dejavu-lgc-sans-fonts qt-devel openssl openssl-devel xclock bzip2 bzip2-devel bzip2-libs libXtst make
# Create directories.
sudo mkdir /usr/CellProfiler
sudo chown cpbuild:cpbuild /usr/CellProfiler
mkdir /usr/CellProfiler/src
mkdir /usr/CellProfiler/src/CellProfiler
# Get the source code for CellProfiler.
git clone https://github.com/CellProfiler/CellProfiler.git /usr/CellProfiler/src/CellProfiler
downloadjava
installjava
makeall
clean
tarup