Skip to content
Snippets Groups Projects
Commit f49a7f51 authored by Marco Biasini's avatar Marco Biasini
Browse files

Merge branch 'develop' into mmcifparser

parents 801fe308 2dda488f
No related branches found
No related tags found
No related merge requests found
Showing
with 365 additions and 198 deletions
......@@ -12,6 +12,7 @@ CTestTestfile.cmake
.*
!.gitignore
CMakeCache.txt
version.hh
config.hh
*.pyc
index.txt
......
......@@ -4,13 +4,17 @@
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
project(OpenStructure CXX C)
set (OST_VERSION_MAJOR 1)
set (OST_VERSION_MINOR 2)
set (OST_VERSION_PATCH 0)
set (OST_VERSION_STRING ${OST_VERSION_MAJOR}.${OST_VERSION_MINOR}.${OST_VERSION_PATCH} )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_support)
include(OST)
option(USE_SHADER "whether to compile with shader support"
OFF)
option(SET_RPATH "embed rpath upon make install"
option(USE_RPATH "embed rpath upon make install"
OFF)
option(COMPILE_TMTOOLS "whether to compile the tmalign and tmscore programs"
OFF)
......@@ -30,8 +34,10 @@ option(ENABLE_SPNAV "whether 3DConnexion devices should be supported"
OFF)
option(STATIC_PROPERTY_WORKAROUND "workaround for static property bug with some boost/boost_python combinations" OFF)
option(DEPLOYMENT "switch on deployment settings" OFF)
option(COMPILE_TESTS "wheter unit tests should be compiled by default" OFF)
option(COMPILE_TESTS "whether unit tests should be compiled by default" OFF)
option(ENABLE_STATIC "whether static libraries should be compiled" OFF)
option(DEBIAN_STYLE_LIBEXEC "whether 'libexec' should be put under 'lib/openstructure" OFF)
if (CXX)
set(CMAKE_CXX_COMPILER ${CXX})
endif()
......@@ -110,6 +116,12 @@ else()
set(_PROFILE OFF)
endif()
if (DEBIAN_STYLE_LIBEXEC)
set(_DEBIAN_STYLE_LIBEXEC ON)
else()
set(_DEBIAN_STYLE_LIBEXEC OFF)
endif()
add_definitions(-DEIGEN2_SUPPORT)
if (COMPOUND_LIB)
......@@ -218,16 +230,17 @@ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
message(STATUS
"OpenStructure will be built with the following options:\n"
" Install Prefix (-DPREFIX) : ${CMAKE_INSTALL_PREFIX}\n"
" RPath in install (-DUSE_RPATH) : ${_USE_RPATH}\n"
" Graphical interface (-DENABLE_GUI) : ${_UI}\n"
" OpenGL support (-DENABLE_GFX) : ${_OPENGL}\n"
" Image Processing support (-DENABLE_IMG) : ${_IMG}\n"
" Shader support (-DUSE_SHADER) : ${_SHADER}\n"
" Numpy support (-DUSE_NUMPY) : ${_NUMPY}\n"
" Optimize (-DOPTIMIZE) : ${_OPT}\n"
" Profiling support (-DPROFILE) : ${_PROFILE}\n"
" Double Precision (-DUSE_DOUBLE_PRECISION) : ${_DOUBLE_PREC}\n"
" Compound Lib (-DCOMPOUND_LIB) : ${_COMP_LIB}\n"
" TMAlign and TMScore (-DCOMPILE_TMTOOLS) : ${_TM_TOOLS}\n"
" Static Libraries (-DENABLE_STATIC) : ${ENABLE_STATIC}")
" Install Prefix (-DPREFIX) : ${CMAKE_INSTALL_PREFIX}\n"
" RPath in install (-DUSE_RPATH) : ${_USE_RPATH}\n"
" Graphical interface (-DENABLE_GUI) : ${_UI}\n"
" OpenGL support (-DENABLE_GFX) : ${_OPENGL}\n"
" Image Processing support (-DENABLE_IMG) : ${_IMG}\n"
" Shader support (-DUSE_SHADER) : ${_SHADER}\n"
" Numpy support (-DUSE_NUMPY) : ${_NUMPY}\n"
" Optimize (-DOPTIMIZE) : ${_OPT}\n"
" Profiling support (-DPROFILE) : ${_PROFILE}\n"
" Double Precision (-DUSE_DOUBLE_PRECISION) : ${_DOUBLE_PREC}\n"
" Compound Lib (-DCOMPOUND_LIB) : ${_COMP_LIB}\n"
" TMAlign and TMScore (-DCOMPILE_TMTOOLS) : ${_TM_TOOLS}\n"
" Static Libraries (-DENABLE_STATIC) : ${ENABLE_STATIC}\n"
" Debian-style 'libexec' (-DDEBIAN_STYLE_LIBEXEC) : ${_DEBIAN_STYLE_LIBEXEC}")
\ No newline at end of file
......@@ -187,6 +187,9 @@ macro(module)
get_target_property(_DEFS ${_LIB_NAME} COMPILE_DEFINITIONS)
set_target_properties(${_LIB_NAME} PROPERTIES
COMPILE_DEFINITIONS OST_MODULE_${_UPPER_LIB_NAME})
set_target_properties(${_LIB_NAME} PROPERTIES
VERSION ${OST_VERSION_STRING}
SOVERSION ${OST_VERSION_MAJOR}.${OST_VERSION_MINOR})
set_target_properties(${_LIB_NAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${LIB_STAGE_PATH}
ARCHIVE_OUTPUT_DIRECTORY ${LIB_STAGE_PATH}
......@@ -310,6 +313,40 @@ macro(executable)
endmacro()
#-------------------------------------------------------------------------------
# Synopsis
# executable_libexec(NAME exe_name SOURCES source1 source2 LINK link1 link2)
#
# Description:
# Compile, link and stage a C++ executable into the libexec directory
#-------------------------------------------------------------------------------
macro(executable_libexec)
parse_argument_list(_ARG
"NAME;SOURCES;LINK;DEPENDS_ON" "NO_RPATH;STATIC" ${ARGN})
if (NOT _ARG_NAME)
message(FATAL_ERROR "invalid use of executable(): a name must be provided")
endif()
add_executable(${_ARG_NAME} ${_ARG_SOURCES})
set_target_properties(${_ARG_NAME}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${LIBEXEC_STAGE_PATH}")
if (APPLE AND NOT _ARG_NO_RPATH AND NOT _ARG_STATIC)
set_target_properties(${_ARG_NAME} PROPERTIES
LINK_FLAGS "-Wl,-rpath,@loader_path/../lib")
endif()
if (_ARG_LINK)
target_link_libraries(${_ARG_NAME} ${_ARG_LINK})
endif()
if (ENABLE_STATIC AND _ARG_STATIC)
set(TARGET_SUFFIX _static)
target_link_libraries(${_ARG_NAME} ${STATIC_LIBRARIES})
endif()
foreach(_DEP ${_ARG_DEPENDS_ON})
target_link_libraries(${_ARG_NAME} ${_DEP}${TARGET_SUFFIX})
endforeach()
install(TARGETS ${_ARG_NAME} DESTINATION ${LIBEXEC_PATH})
endmacro()
#-------------------------------------------------------------------------------
# Synopsis:
# substitute(IN_FILE in_file OUT_FILE out_file DICT a=b c=d)
......@@ -583,7 +620,7 @@ macro(ost_unittest)
endif()
if (WIN32)
target_link_libraries(${_test_name} ${BOOST_UNIT_TEST_LIBRARIES} "${_ARG_PREFIX}_${_ARG_MODULE}")
add_custom_target("${_test_name}_run"
add_custom_target("${_test_name}_run":
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${_test_name}.exe || echo
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/..
COMMENT "running checks for module ${_ARG_MODULE}"
......@@ -722,7 +759,6 @@ macro(setup_stage)
set(STAGE_DIR "${CMAKE_BINARY_DIR}/stage")
set(EXECUTABLE_OUTPUT_PATH ${STAGE_DIR}/bin )
set(HEADER_STAGE_PATH ${STAGE_DIR}/include )
set(LIBEXEC_STAGE_PATH ${STAGE_DIR}/libexec/openstructure )
set(SHARED_DATA_PATH ${STAGE_DIR}/share/openstructure )
if (UNIX AND NOT APPLE)
......@@ -736,6 +772,16 @@ macro(setup_stage)
set(LIB_DIR lib )
set(LIB_STAGE_PATH "${STAGE_DIR}/lib" )
endif()
if (_DEBIAN_STYLE_LIBEXEC)
set(LIBEXEC_PATH ${LIB_DIR}/openstructure/libexec )
else()
set(LIBEXEC_PATH libexec/openstructure )
endif()
if (_DEBIAN_STYLE_LIBEXEC)
set(LIBEXEC_STAGE_PATH ${LIB_STAGE_PATH}/openstructure/libexec )
else()
set(LIBEXEC_STAGE_PATH ${STAGE_DIR}/libexec/openstructure )
endif()
include_directories("${HEADER_STAGE_PATH}")
link_directories(${LIB_STAGE_PATH})
......
......@@ -4,13 +4,3 @@ HOW TO USE THE BUNDLE SCRIPTS:
2. Move to the <OpenStructure folder>/deployment/linux folder and start the create_bundle.py script using python
3. In <OpenStructure> you'll find a tar.gz file. That's the bundle!
4. If the process stops without completing, run the reset_repository.py script or delete the <OpenStructure Folder> and restart from scratch
HOW TO USE THE QMEAN BUNDLE SCRIPTS:
1. Checkout a copy of the OpenStructure repository.
2. Check out a copy of the scratch repository in modules/scratch
3. Create a folder called ChemLib in the <OpenStructure Folder> and copy the compunds.chemlib file into it.
4. Move to the <OpenStructure folder>/deployment/linux folder and start the create_qmeqn_bundle.py script using python
3. In <OpenStructure> you'll find a tar.gz file. That's the bundle!
4. If the process stops without completing, run the reset_qmean_repository.py script or delete the <OpenStructure Folder> and restart from scratch
\ No newline at end of file
......@@ -12,7 +12,7 @@ if len(sys.argv) < 3:
print 'usage: create_bundle.py additional_label system_python_version'
sys.exit()
system_python_version=sys.argv[2]
system_python_version='python'+sys.argv[2]
system_python_bin='/usr/bin/'+system_python_version
system_python_libs='/usr/lib/'+system_python_version
second_system_python_libs_flag=True
......@@ -43,28 +43,21 @@ date_pattern='%Y-%b-%d'
build=datetime.date.today()
directory_name='openstructure-linux-'+archstring+'-'+additional_label+'-'+str(build)
print 'Hardcoding package python binary path in openstructure executables'
subprocess.call('mv scripts/ost.in scripts/ost.in.backup',shell=True,cwd='../../')
subprocess.call('sed "s/@PYTHON_BINARY@/\$DNG_ROOT\/bin\/'+python_bin_in_bundle+'/g" scripts/ost.in.backup > scripts/ost.in.prepreprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export LD_LIBRARY_PATH/ export LD_LIBRARY_PATH/g" scripts/ost.in.prepreprepre > scripts/ost.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONHOME/ export PYTHONHOME/g" scripts/ost.in.preprepre > scripts/ost.in.prepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONPATH/ export PYTHONPATH/g" scripts/ost.in.prepre > scripts/ost.in.pre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export QT_PLUGIN_PATH/ export QT_PLUGIN_PATH/g" scripts/ost.in.pre > scripts/ost.in',shell=True,cwd='../../')
subprocess.call('mv scripts/dng.in scripts/dng.in.backup',shell=True,cwd='../../')
subprocess.call('sed "s/\#export LD_LIBRARY_PATH/ export LD_LIBRARY_PATH/g" scripts/dng.in.backup > scripts/dng.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONHOME/ export PYTHONHOME/g" scripts/dng.in.preprepre > scripts/dng.in.prepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONPATH/ export PYTHONPATH/g" scripts/dng.in.prepre > scripts/dng.in.pre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export QT_PLUGIN_PATH/ export QT_PLUGIN_PATH/g" scripts/dng.in.pre > scripts/dng.in',shell=True,cwd='../../')
subprocess.call('mv scripts/ost_config.in scripts/ost_config.in.backup',shell=True,cwd='../../')
subprocess.call('sed "s/@PYTHON_BINARY@/\$DNG_ROOT\/bin\/'+python_bin_in_bundle+'/g" scripts/ost_config.in.backup > scripts/ost_config.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONHOME/ export PYTHONHOME/g" scripts/ost_config.in.preprepre > scripts/ost_config.in.prepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONPATH/ export PYTHONPATH/g" scripts/ost_config.in.prepre > scripts/ost_config.in.pre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export QT_PLUGIN_PATH/ export QT_PLUGIN_PATH/g" scripts/ost_config.in.pre > scripts/ost_config.in',shell=True,cwd='../../')
#print 'Downloading Chemlib dictionary'
#subprocess.call('wget ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif', shell=True, cwd='../../')
#print 'Compiling Openstructure'
#subprocess.call('cmake ./ -DCMAKE_BUILD_TYPE=Release -DPREFIX='+directory_name+' -DBoost_COMPILER='+boost_string+'-DENABLE_IMG=OFF -DENABLE_UI=OFF -DENABLE_GFX=OFF', shell=True,cwd='../../')
#subprocess.call('cmake ./ -DCMAKE_BUILD_TYPE=Release -DPREFIX='+directory_name+' s-DENABLE_IMG=OFF -DENABLE_UI=OFF -DENABLE_GFX=OFF', shell=True,cwd='../../')
#subprocess.call('make -j5',shell=True,cwd='../../')
#print 'Converting Chemlib dictionary'
#subprocess.call('stage/bin/chemdict_tool create components.cif compounds.chemlib', shell=True, cwd='../../')
#print '\nStaging Chemlib dictionary'
##print 'Converting Chemlib dictionary'
##subprocess.call('stage/bin/chemdict_tool create components.cif compounds.chemlib', shell=True, cwd='../../')
print '\nStaging Chemlib dictionary'
print 'Compiling Openstructure'
#subprocess.call('cmake ./ -DCMAKE_BUILD_TYPE=Release -DPREFIX='+directory_name+' -DBoost_COMPILER='+boost_string+' -DCOMPOUND_LIB=ChemLib/compounds.chemlib -DENABLE_IMG=ON -DENABLE_UI=ON -DENABLE_GFX=ON -DOPTIMIZE=ON',shell=True,cwd='../../')
subprocess.call('cmake ./ -DCMAKE_BUILD_TYPE=Release -DPREFIX='+directory_name+' -DCOMPOUND_LIB=ChemLib/compounds.chemlib -DENABLE_IMG=ON -DENABLE_UI=ON -DENABLE_GFX=ON -DOPTIMIZE=ON',shell=True,cwd='../../')
subprocess.call('make -j2',shell=True,cwd='../../')
print 'Removing obsolete packages and package directory'
......@@ -73,13 +66,14 @@ print 'Creating new package directory'
subprocess.call('mkdir '+directory_name,shell=True,cwd='../../')
subprocess.call('mkdir '+directory_name+'/bin',shell=True,cwd='../../')
print 'Copy python executable into stage for dependency detection'
print system_python_bin
subprocess.call('cp '+system_python_bin+ ' stage/bin/python',shell=True,cwd='../../')
print 'Copy python libraries into the stage for dependency detection'
subprocess.call('cp -pRL '+system_python_libs+' stage/'+libdir,shell=True,cwd='../../')
subprocess.call('rm -fr stage/'+libdir+'/'+system_python_version+'/dist-packages',shell=True,cwd='../../')
subprocess.call('cp -pRL '+system_python_libs+' stage/'+libdir+'/python',shell=True,cwd='../../')
subprocess.call('rm -fr stage/'+libdir+'/python/dist-packages',shell=True,cwd='../../')
if second_system_python_libs_flag==True:
subprocess.call('cp -pRL '+second_system_python_libs+'/sip* stage/'+libdir+'/'+system_python_version,shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/PyQt* stage/'+libdir+'/'+system_python_version,shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/sip* stage/'+libdir+'/python/',shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/PyQt* stage/'+libdir+'/python/',shell=True,cwd='../../')
print 'Creating new dependency list'
so_list=[]
walk_list=os.walk('../../stage')
......@@ -104,22 +98,21 @@ for entry in sorted_dep_list:
exclude=True
if exclude==False:
filtered_dep_list.append(entry)
print 'Installing OpenStructure into package directory structure'
subprocess.call('make install',shell=True,cwd='../../')
print 'Copy libraries in the package directory structure'
subprocess.call('mkdir '+directory_name+'/'+libdir,shell=True,cwd='../../')
for entry in filtered_dep_list:
subprocess.call('cp '+entry+' '+directory_name+'/'+libdir,shell=True,cwd='../../')
print 'Copy python executable into package directory structure'
subprocess.call('cp '+system_python_bin+ ' '+directory_name+'/bin/python',shell=True,cwd='../../')
print 'Copy python libraries into package directory structure'
subprocess.call('cp -pRL '+system_python_libs+' '+directory_name+'/'+libdir,shell=True,cwd='../../')
subprocess.call('rm -fr '+directory_name+'/'+libdir+'/'+system_python_version+'/dist-packages',shell=True,cwd='../../')
subprocess.call('cp -pRL '+system_python_libs+' '+directory_name+'/'+libdir+'/python',shell=True,cwd='../../')
subprocess.call('rm -fr '+directory_name+'/'+libdir+'/python/dist-packages',shell=True,cwd='../../')
if second_system_python_libs_flag==True:
subprocess.call('cp -pRL '+second_system_python_libs+'/sip* '+directory_name+'/'+libdir+'/'+system_python_version,shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/PyQt* '+directory_name+'/'+libdir+'/'+system_python_version,shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/sip* '+directory_name+'/'+libdir+'/python/',shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/PyQt* '+directory_name+'/'+libdir+'/python/',shell=True,cwd='../../')
print 'Copy Qt 4 plugins into package directory structure'
subprocess.call('cp -pRL '+qt4_plugins+' '+directory_name+'/bin/',shell=True,cwd='../../')
print 'Installing OpenStructure into package directory structure'
subprocess.call('make install',shell=True,cwd='../../')
print 'Copying supplementary material into package directory structure'
subprocess.call('cp -pRL stage/share/openstructure '+directory_name+'/share/',shell=True,cwd='../../')
print 'Copying examples into package directory structure'
......@@ -140,11 +133,8 @@ print 'removing dokk and harmony examples from bundle'
subprocess.call('rm -rf '+directory_name+'/share/openstructure/examples/code_fragments/dokk',shell=True,cwd='../../')
subprocess.call('rm -rf '+directory_name+'/share/openstructure/examples/code_fragments/harmony',shell=True,cwd='../../')
print 'De-hardcoding package python binary path from openstructure executables'
subprocess.call('rm scripts/ost.in',shell=True,cwd='../../')
subprocess.call('rm scripts/ost.in.pre*',shell=True,cwd='../../')
subprocess.call('rm scripts/dng.in',shell=True,cwd='../../')
subprocess.call('rm scripts/dng.in.pre*',shell=True,cwd='../../')
subprocess.call('mv scripts/ost.in.backup scripts/ost.in',shell=True,cwd='../../')
subprocess.call('mv scripts/dng.in.backup scripts/dng.in',shell=True,cwd='../../')
subprocess.call('rm scripts/ost_config.in',shell=True,cwd='../../')
subprocess.call('rm scripts/ost_config.in.pre*',shell=True,cwd='../../')
subprocess.call('mv scripts/ost_config.in.backup scripts/ost_config.in',shell=True,cwd='../../')
subprocess.call('tar cfz '+directory_name+'.tgz '+directory_name,shell=True,cwd='../../')
import os
import shutil
import subprocess
import string
import sys
# custom parameters
boost_string='\".so.1.40.0\"'
system_python_bin='/usr/bin/python2.6'
name_python_bin='python2.6'
system_python_libs='/usr/lib/python2.6'
second_system_python_libs_flag=True
second_system_python_libs='/usr/lib/pymodules/python2.6'
qt4_plugins='/usr/lib/qt4/plugins'
additional_label='ubuntu'
list_of_excluded_libraries=['ld-linux','libexpat','libgcc_s','libglib','cmov','libice','libSM','libX','libg','libGL.so','libfontconfig','libfreetype','libdrm','libxcb','libICE']
currdir=os.getcwd()
if currdir.find('deployment')==-1 or currdir.find('linux')==-1:
print '\n'
print 'ERROR: Please run this script from the deployment/linux directory'
print '\n'
sys.exit()
print '\n'
print 'WARNING: If this script does not run to completion, please run the reset_repository_qmean.py script before restarting'
print '\n'
print 'Detecting architecture and revision'
uname_output=subprocess.Popen('uname -a', shell=True, cwd='../../',stdout=subprocess.PIPE).stdout
uname_line=uname_output.readlines()
if uname_line[0].find('x86_64') !=-1:
libdir='lib64'
archstring='64bit'
else:
libdir='lib'
archstring='32bit'
svninfo_output=subprocess.Popen('svn info', shell=True, cwd='../../',stdout=subprocess.PIPE).stdout
svninfo_lines=svninfo_output.readlines()
svninfo_split=string.split(svninfo_lines[4])
revstring=svninfo_split[1]
directory_name='qmean-'+archstring+'-'+additional_label+'-rev'+revstring
print 'Stripping subversion information to avoid accidental commit'
subprocess.call('rm -rf $(find . -name .svn)',shell=True,cwd='../../')
print 'Tweaking scripts for bundle use'
subprocess.call('mv scripts/ost.in scripts/ost.in.backup',shell=True,cwd='../../')
subprocess.call('sed "s/@PYTHON_BINARY@/\$DNG_ROOT\/bin\/'+name_python_bin+'/g" scripts/ost.in.backup > scripts/ost.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export LD_LIBRARY_PATH/ export LD_LIBRARY_PATH/g" scripts/ost.in.prepreprepre > scripts/ost.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONHOME/ export PYTHONHOME/g" scripts/ost.in.preprepre > scripts/ost.in.prepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONPATH/ export PYTHONPATH/g" scripts/ost.in.prepre > scripts/ost.in.pre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export QT_PLUGIN_PATH/ export QT_PLUGIN_PATH/g" scripts/ost.in.pre > scripts/ost.in',shell=True,cwd='../../')
subprocess.call('mv modules/scratch/qmean/scripts/qmean.in modules/scratch/qmean/scripts/qmean.in.backup',shell=True,cwd='../../')
subprocess.call('sed "s/@PYTHON_BINARY@/\$DNG_ROOT\/bin\/'+name_python_bin+'/g" modules/scratch/qmean/scripts/qmean.in.backup > modules/scratch/qmean/scripts/qmean.in.prepreprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export LD_LIBRARY_PATH/ export LD_LIBRARY_PATH/g" modules/scratch/qmean/scripts/qmean.in.prepreprepre > modules/scratch/qmean/scripts/qmean.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONHOME/ export PYTHONHOME/g" modules/scratch/qmean/scripts/qmean.in.preprepre > modules/scratch/qmean/scripts/qmean.in.prepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONPATH/ export PYTHONPATH/g" modules/scratch/qmean/scripts/qmean.in.prepre > modules/scratch/qmean/scripts/qmean.in.pre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export QT_PLUGIN_PATH/ export QT_PLUGIN_PATH/g" modules/scratch/qmean/scripts/qmean.in.pre > modules/scratch/qmean/scripts/qmean.in',shell=True,cwd='../../')
subprocess.call('mv scripts/dng.in scripts/dng.in.backup',shell=True,cwd='../../')
subprocess.call('sed "s/\#export LD_LIBRARY_PATH/ export LD_LIBRARY_PATH/g" scripts/dng.in.backup > scripts/dng.in.preprepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONHOME/ export PYTHONHOME/g" scripts/dng.in.preprepre > scripts/dng.in.prepre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export PYTHONPATH/ export PYTHONPATH/g" scripts/ost.in.prepre > scripts/ost.in.pre',shell=True,cwd='../../')
subprocess.call('sed "s/\#export QT_PLUGIN_PATH/ export QT_PLUGIN_PATH/g" scripts/dng.in.pre > scripts/dng.in',shell=True,cwd='../../')
print 'Downloading Chemlib dictionary'
subprocess.call('wget ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif', shell=True, cwd='../../')
print 'Compiling Openstructure/Qmean'
subprocess.call('cmake ./ -DCMAKE_BUILD_TYPE=Release -DPREFIX='+directory_name+' -DBoost_COMPILER='+boost_string+' -DONLY_QMEAN=ON -DENABLE_IMG=OFF -DENABLE_UI=OFF -DENABLE_GFX=OFF -DCOMPOUND_LIB=ChemLib/compounds.chemlib', shell=True,cwd='../../')
subprocess.call('make',shell=True,cwd='../../')
print 'Converting Chemlib dictionary'
subprocess.call('stage/bin/chemdict_tool create components.cif compounds.chemlib', shell=True, cwd='../../')
print '\nStaging Chemlib dictionary'
subprocess.call('cmake ./ -DCOMPOUND_LIB=compounds.chemlib',shell=True,cwd='../../')
subprocess.call('make',shell=True,cwd='../../')
print 'Removing obsolete packages and package directory'
subprocess.call('rm -fr qmean-*',shell=True,cwd='../../')
print 'Creating new package directory'
subprocess.call('mkdir '+directory_name,shell=True,cwd='../../')
subprocess.call('mkdir '+directory_name+'/bin',shell=True,cwd='../../')
so_list=[]
print 'Creating new dependency list'
walk_list=os.walk('../../stage')
for dir_entry in walk_list:
for file_entry in dir_entry[2]:
if file_entry.find('.so')==len(file_entry)-3 or file_entry=='gosty':
filepath=os.path.join(dir_entry[0],file_entry)
so_list.append(filepath)
dep_list=[]
for so_entry in so_list:
dep=subprocess.Popen('perl ./ldd-rec.pl '+so_entry,shell=True,stdout=subprocess.PIPE,cwd='./').stdout
dep_so_entry=dep.readlines()
for dep_entry in dep_so_entry:
dep_list.append(dep_entry[:-1])
sorted_dep_list=sorted(list(set(dep_list)))
print 'Filtering system libraries from depenedency list'
filtered_dep_list=[]
for entry in sorted_dep_list:
exclude=False
for exclusion in list_of_excluded_libraries:
if entry.find(exclusion)!=-1:
exclude=True
if exclude==False:
filtered_dep_list.append(entry)
print 'Copy libraries in the package directory structure'
subprocess.call('mkdir '+directory_name+'/'+libdir,shell=True,cwd='../../')
for entry in filtered_dep_list:
subprocess.call('cp '+entry+' '+directory_name+'/'+libdir,shell=True,cwd='../../')
print 'Copy python executable into package directory structure'
subprocess.call('cp '+system_python_bin+ ' '+directory_name+'/bin',shell=True,cwd='../../')
print 'Copy python libraries into package directory structure'
subprocess.call('cp -pRL '+system_python_libs+' '+directory_name+'/'+libdir,shell=True,cwd='../../')
if second_system_python_libs_flag==True:
subprocess.call('cp -pRL '+second_system_python_libs+'/* '+directory_name+'/'+libdir+'/'+name_python_bin,shell=True,cwd='../../')
print 'Copy Qt 4 plugins into package directory structure'
subprocess.call('cp -pRL '+qt4_plugins+' '+directory_name+'/bin/',shell=True,cwd='../../')
print 'Installing OpenStructure into package directory structure'
subprocess.call('make install',shell=True,cwd='../../')
print 'Copy examples into package directory structure'
subprocess.call('cp -pRL examples '+directory_name+'/share/openstructure/',shell=True,cwd='../../')
print 'Removing headers from package directory structure'
subprocess.call('rm -fr '+directory_name+'/include',shell=True,cwd='../../')
print 'Copying supplementary material into package directory structure'
subprocess.call('cp -pRL stage/share/openstructure '+directory_name+'/share/',shell=True,cwd='../../')
print 'Copy qmean examples into package directory structure'
subprocess.call('cp -pRL modules/scratch/qmean/examples '+directory_name+'',shell=True,cwd='../../')
print 'Copy readme and license files into package directory structure'
subprocess.call('cp -pRL modules/scratch/qmean/LICENSE.txt '+directory_name+'',shell=True,cwd='../../')
subprocess.call('cp -pRL modules/scratch/qmean/README.txt '+directory_name+'',shell=True,cwd='../../')
print 'Resetting script to non-bundle versions'
subprocess.call('rm scripts/ost.in',shell=True,cwd='../../')
subprocess.call('rm scripts/ost.in.pre*',shell=True,cwd='../../')
subprocess.call('rm scripts/dng.in',shell=True,cwd='../../')
subprocess.call('rm modules/scratch/qmean/scripts/qmean.in',shell=True,cwd='../../')
subprocess.call('rm modules/scratch/qmean/scripts/qmean.in.pre*',shell=True,cwd='../../')
subprocess.call('rm scripts/dng.in.pre*',shell=True,cwd='../../')
subprocess.call('mv scripts/ost.in.backup scripts/ost.in',shell=True,cwd='../../')
subprocess.call('mv scripts/dng.in.backup scripts/dng.in',shell=True,cwd='../../')
subprocess.call('mv modules/scratch/qmean/scripts/qmean.in.backup modules/scratch/qmean/scripts/qmean.in',shell=True,cwd='../../')
subprocess.call('tar cfz '+directory_name+'.tgz '+directory_name,shell=True,cwd='../../')
1. Checkout OpenStructure into a directory called strictly:'openstructure-<version>' (currently is 1.1d - 1.1 develop)
2. Remove all the .git* files and directories from the source
3. Create a compressed file with the source directory called strictly 'openstructure_<version>.orig.tar.gz'
(At the same level as the source directory)
4. Copy the 'debian' directory into the top level of the source directory
5. Go into the top level of the source directory
6. Build package with 'debuilder -uc -us'
7. You can find the built package at the same level as the source directory and the source zipped file
===============OPENSTRUCTURE molecular modelling framework ===============
OpenStructure is the next generation molecular modelling tailored at anybody
using 3D Structures or electron density maps.
Please refer to www.openstructure.org for more information or try out
directly one of the binary packages available for download.
Thank you for you interest and enjoy the straightforward way of handling
protein structure data!
Please do not hesitate to contact us for feedback or troubleshooting:
ost-users@maillist.unibas.ch
=============== The OpenStructure Team ===================================
openstructure (1.1d-0ubuntu1) natty; urgency=low
* Initial release
-- Valerio Mariani <valerio.mariani@unibas.ch> Wed, 13 Jul 2011 15:41:35 +0200
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
.TH CHEMDICT_TOOL: "1" "July 2011" "User Commands"
.SH NAME
chemdict_tool \- compound libary creation tool for OpenStructure
.SH SYNOPSIS
chemdict_tool action <compound\-dict> <db> (pdb|charmm|amber|opls)
.SH OPTIONS
Supported actions are:
.TP
create
\- creates a new db
.TP
update
\- update existing db
.SS "supported actions are:"
.TP
create
\- creates a new db
.TP
update
\- update existing db
.SH "SEE ALSO"
The full documentation for
.B usage:
is maintained as a Texinfo manual. If the
.B info
and
.B usage:
programs are properly installed at your site, the command
.IP
.B info usage:
.PP
should give you access to the complete manual.
7
Source: openstructure
Section: science
Priority: extra
Maintainer: Valerio Mariani <valerio.mariani@unibas.ch>
Build-Depends: debhelper (>= 7.0.50~),cmake,desktop-file-utils,libboost-all-dev,libeigen2-dev,qt4-dev-tools,libqt4-dev,libqt4-opengl-dev,python-qt4-dev,pyqt4-dev-tools,libfftw3-dev,libpng12-dev,libtiff4-dev,python-dev
Standards-Version: 3.9.1
Homepage: http://www.openstructure.org
Package: openstructure
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python-sip, python-qt4
Description: Open-source computational structural biology framework
The Openstructure project aims to provide an open-source, modular, flexible,
molecular modelling and visualization environment. It is targeted at
interested method developers in the field of structural bioinformatics.
Package: openstructure-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, openstructure
Description: Open-source computational structural biology framework
The Openstructure project aims to provide an open-source, modular, flexible,
molecular modelling and visualization environment. It is targeted at
interested method developers in the field of structural bioinformatics.
Format: http://dep.debian.net/deps/dep5
Upstream-Name: openstructure
Source: http://www.openstructure.org
Files: *
Copyright: 2008-2011 Torsten Schwede <torsten.schwede@unibas.ch>
License: LGPL-3.0
Files: debian/*
Copyright: 2011 Valerio Mariani <valerio.mariani@unibas.ch>
License: LGPL-3.0
License: LGPL-3.0
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".
Files: modules/db/src/sqlite3.h, modules/db/src/sqlite.c
Copyright: 2011 Valerio Mariani <valerio.mariani@unibas.ch>
License: None
2001 September 15
.
The author disclaims copyright to this source code. In place of
a legal notice, here is a blessing:
.
May you do good and not evil.
May you find forgiveness for yourself and forgive others.
May you share freely, never taking more than you give.
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
.TH DNG "1" "July 2011" "User Commands"
.SH NAME
dng \- GUI for OpenStructure
.SH SYNOPSIS
.B dng
[\fIoptions\fR] [\fIfiles to load\fR]
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-v\fR VLEVEL, \fB\-\-verbosity_level\fR=\fIVLEVEL\fR
sets the verbosity level [default: 2]
.TP
\fB\-s\fR SCRIPT, \fB\-\-script\fR=\fISCRIPT\fR
executes a script (syntax: \fB\-s\fR SCRIPT [options] [args])
Anything that follows this option is passed to the
script
.TP
\fB\-p\fR PDB_IDS, \fB\-\-pdb_id\fR=\fIPDB_IDS\fR
PDB file ID. The file will be retrieved from PDB
.TP
\fB\-b\fR BUILDER, \fB\-\-builder\fR=\fIBUILDER\fR
Type of builder used by the progam (either RULE_BASED
or HEURISTIC) [default: HEURISTIC]
.TP
\fB\-c\fR COMPLIB, \fB\-\-compound_library\fR=\fICOMPLIB\fR
Compound library for the RULE_BASED builder (only used
if \fB\-\-builder\fR option is set to RULE_BASED, otherwise
ignored [default: compounds.chemlib]
.TP
\fB\-q\fR QUERY, \fB\-\-query\fR=\fIQUERY\fR
Selection query to be highlighted automatically upon
loading (only used together with \fB\-p\fR option or when a
PDB file is loaded, otherwise ignored [default: None]
.TP
\fB\-S\fR, \fB\-\-stereo\fR
try to get a quad\-buffer stereo visual
[Desktop Entry]
Name=OpenStructure
GenericName=Open-Source Computational Structural Biology Framework
Exec=dng
Icon=openstructure
Terminal=false
Type=Application
Categories=Education;Science;
debian/ost.1
debian/dng.1
debian/chemdict_tool.1
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
.TH OST "1" "July 2011" "User Commands"
.SH NAME
ost: \- command-line console for OpenStructure
.SH SYNOPSIS
.B ost
[\fIost options\fR] [\fIscript to execute\fR] [\fIscript parameters\fR]
.SH OPTIONS
.TP
\fB\-i\fR, \fB\-\-interactive\fR
start interpreter interactively (must be first
parameter, ignored otherwise)
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-v\fR VLEVEL, \fB\-\-verbosity_level\fR=\fIVLEVEL\fR
sets the verbosity level [default: 2]
#!/bin/sh
# postinst script for openstructure
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
ldconfig
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
%:
dh $@ --buildsystem cmake
override_dh_auto_configure:
cmake ./ -DPREFIX=debian/openstructure/usr -DOPTIMIZE=ON -DCOMPOUND_LIB=compounds.chemlib
override_dh_auto_build:
make -j6
override_dh_auto_install:
make install
rm debian/openstructure/usr/bin/ldt
mkdir -p debian/openstructure-dev/usr
mv debian/openstructure/usr/include debian/openstructure-dev/usr/
mkdir -p debian/openstructure/usr/share/pixmaps/
cp modules/gui/share/images/logo-small.png debian/openstructure/usr/share/pixmaps/openstructure.png
mkdir -p debian/openstructure/usr/share/applications/
cp debian/openstructure.desktop debian/openstructure/usr/share/applications/
desktop-file-validate debian/openstructure/usr/share/applications/openstructure.desktop
3.0 (quilt)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment