Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pkg-scripts/CellProfiler-3.1.5-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
116 lines (98 sloc)
2.59 KB
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
#! /bin/bash | |
PKG=CellProfiler | |
VERSION=3.1.5 | |
BUILD=0 | |
SRC=https://github.com/CellProfiler/CellProfiler/archive/v$VERSION.tar.gz | |
PREFIX=/pkg/$PKG-$VERSION-$BUILD | |
# PREFIX=/dev/shm/pkg/$PKG-$VERSION-$BUILD | |
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/package/bin:/usr/local/bin | |
export PATH | |
set -xe | |
umask 022 | |
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp | |
test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR | |
mkdir -p $BUILD_TMPDIR/home | |
export TMPDIR=$BUILD_TMPDIR | |
export HOME=$BUILD_TMPDIR/home | |
exec </dev/null | |
mkdir -p $PREFIX | |
cat >$PREFIX/profile <<-EOF | |
PATH=$PREFIX/bin:\$PATH | |
PYTHONPATH=$PREFIX/lib/python2.7/site-packages | |
LD_LIBRARY_PATH=$PREFIX/lib\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} | |
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig\${PKG_CONFIG_PATH:+:\$PKG_CONFIG_PATH} | |
export PKG_CONFIG_PATH LD_LIBRARY_PATH PYTHONPATH | |
EOF | |
. $PREFIX/profile | |
BUILDDIR=$PREFIX/build | |
mkdir -p $BUILDDIR | |
cd $BUILDDIR | |
function at_plaininstall() { | |
local dir=$1 | |
local tar=$2 | |
local url=$3 | |
( | |
cd $BUILDDIR | |
test -e $tar || wget $url | |
test -n 'XWIPE' && rm -rf ./$dir | |
test -d $dir || tar xvf $tar | |
cd $dir | |
./configure --prefix=$PREFIX | |
make -j $(nproc) | |
make install | |
) | |
} | |
function cm_plaininstall() { | |
local dir=$1 | |
local tar=$2 | |
local url=$3 | |
local extra=$4 | |
( | |
cd $BUILDDIR | |
test -e $tar || wget $url | |
test -n 'XWIPE' && rm -rf ./$dir | |
test -d $dir || tar xvf $tar | |
mkdir -p $dir/build | |
cd $dir/build | |
echo "# extra args: '$extra'" | |
cmake .. \ | |
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | |
-DCMAKE_COLOR_MAKEFILE=OFF \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
$extra | |
make -j $(nproc) | |
make install | |
) | |
} | |
at_plaininstall \ | |
zeromq-4.2.2 \ | |
zeromq-4.2.2.tar.gz \ | |
https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
cm_plaininstall \ | |
vigra-1.11.1 \ | |
vigra-1.11.1-src.tar.gz \ | |
https://github.com/ukoethe/vigra/releases/download/Version-1-11-1/vigra-1.11.1-src.tar.gz \ | |
"-DVIGRANUMPY_INSTALL_DIR=$PYTHONPATH" | |
at_plaininstall \ | |
wxPython-src-3.0.2.0 \ | |
wxPython-src-3.0.2.0.tar.bz2 \ | |
https://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/wxPython-src-3.0.2.0.tar.bz2 | |
( | |
cd $BUILDDIR/wxPython-src-3.0.2.0/wxPython | |
python2.7 setup.py build | |
python2.7 setup.py install --prefix $PREFIX | |
# build leaves 2gig rubbish | |
cd .. | |
make clean | |
) | |
# 'the' CellProfiler | |
( | |
test -e v$VERSION.tar.gz || wget $SRC | |
test -n 'XWIPE' && rm -rf CellProfiler-$VERSION | |
test -d CellProfiler-$VERSION || tar -xf v$VERSION.tar.gz | |
cd CellProfiler-$VERSION | |
python2.7 setup.py build | |
python2.7 setup.py install --prefix $PREFIX | |
) | |
# exit 1 # don't close ... | |
exit |