Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
81bdf03a
Commit
81bdf03a
authored
Nov 07, 2014
by
John Chodera (MSKCC)
Browse files
Added first drafts of OS X build and packaging scripts.
parent
3fecf857
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
devtools/packaging/scripts/osx/build.sh
devtools/packaging/scripts/osx/build.sh
+41
-0
devtools/packaging/scripts/osx/package.sh
devtools/packaging/scripts/osx/package.sh
+44
-0
No files found.
devtools/packaging/scripts/osx/build.sh
0 → 100755
View file @
81bdf03a
#!/bin/bash
# Build script for Mac OS X distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
INSTALL
=
`
pwd
`
/install
CMAKE_FLAGS
=
"-DCMAKE_INSTALL_PREFIX=
$INSTALL
"
# setting the rpath so that libOpenMMPME.so finds the right libfftw3
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+
=
" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+
=
" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"
CMAKE_FLAGS+
=
" -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_DRUDE_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_RPMD_OPENCL_LIB=OFF"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_TESTS=FALSE"
CMAKE_FLAGS+
=
" -DOPENMM_BUILD_OPENCL_DOUBLE_PRECISION_TESTS=FALSE"
# Build in subdirectory.
# Set location for FFTW3
PREFIX
=
"
${
HOME
}
/miniconda"
CMAKE_FLAGS+
=
" -DFFTW_INCLUDES=
$PREFIX
/include"
CMAKE_FLAGS+
=
" -DFFTW_LIBRARY=
$PREFIX
/lib/libfftw3f.so"
CMAKE_FLAGS+
=
" -DFFTW_THREADS_LIBRARY=
$PREFIX
/lib/libfftw3f_threads.so"
mkdir
build
cd
build
cmake ../openmm
$CMAKE_FLAGS
make
-j4
make
install
# Install Python wrappers.
export
OPENMM_INCLUDE_PATH
=
$INSTALL
/include
export
OPENMM_LIB_PATH
=
$INSTALL
/lib
cd
python
$PYTHON
setup.py
install
--prefix
=
$INSTALL
cd
..
# Copy all tests to bin directory so they will be distributed with install package.
#cp `find . -name "Test*" -type f -maxdepth 1` $PREFIX/bin
devtools/packaging/scripts/osx/package.sh
0 → 100755
View file @
81bdf03a
#!/bin/bash
# Packaging script for Mac OS X distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
# CONFIGURE HERE
export
PACKAGE_DIR
=
"packaging"
# directory to stuff packaged source distribution
export
VERSION
=
$(
sed
-nr
"s/OPENMM_VERSION:STRING=(.*)/
\1
/p"
build/CMakeCache.txt
)
export
PACKAGE_SUBDIR
=
"OpenMM-
${
VERSION
}
-Mac"
# directory where distribution will be unpacked
export
DISTRO_PREFIX
=
"OpenMM-
${
VERSION
}
-Mac"
# prefix for source distribution (e.g. ${DISTRIBUTION_NAME}.zip)
# Clean up.
rm
-rf
$PACKAGE_DIR
# Make a directory to contain packaged source distribution
mkdir
$PACKAGE_DIR
mkdir
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
for
filename
in
$(
cat
openmm/devtools/packaging/manifests/binary/manifest.txt
)
;
do
CMD
=
"cp -r install/
$filename
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
"
echo
$CMD
`
$CMD
`
done
# Add the install.sh script
CMD
=
"cp -r openmm/install.sh
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
"
echo
$CMD
`
$CMD
`
# Make Python source distribution.
echo
"Building Python source distribution..."
cd
build
make PythonSdist
cd
python/dist
tar
zxf OpenMM-
${
VERSION
}
.tar.gz
mv
OpenMM-
${
VERSION
}
python
cd
../../..
cp
-r
build/python/dist/python
$PACKAGE_DIR
/
$PACKAGE_SUBDIR
# Create archives.
cd
$PACKAGE_DIR
mkdir
compressed
tar
zcf compressed/
${
DISTRO_PREFIX
}
.tgz
$PACKAGE_SUBDIR
zip
-r
compressed/
${
DISTRO_PREFIX
}
.zip
$PACKAGE_SUBDIR
cd
..
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment