Skip to content
Snippets Groups Projects
Commit dcefa4e2 authored by Valerio Mariani's avatar Valerio Mariani
Browse files

New bundling script

Removed the directories with scripts to create rpm and deb as in the future we will use Andi's cpack
parent 8196a26e
Branches master
No related tags found
No related merge requests found
Showing
with 60 additions and 586 deletions
...@@ -3,4 +3,5 @@ HOW TO USE THE BUNDLE SCRIPTS: ...@@ -3,4 +3,5 @@ HOW TO USE THE BUNDLE SCRIPTS:
1. Checkout a copy of the OpenStructure repository. 1. Checkout a copy of the OpenStructure repository.
2. Move to the <OpenStructure folder>/deployment/linux folder and start the create_bundle.py script using python 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! 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 4. If the process stops without completing, reset the repository with 'git
reset --hard HEAD' from the top level directory
...@@ -4,31 +4,56 @@ import subprocess ...@@ -4,31 +4,56 @@ import subprocess
import string import string
import sys import sys
import datetime import datetime
import sip
import PyQt4
# custom parameters # parameters that can be modified
qt4_plugins_location='/usr/lib/i386-linux-gnu/qt4/plugins'
ssl_crypto_location='/lib/i386-linux-gnu/'
chemlib_dictionary_location='/home/bundler/compounds.chemlib'
list_of_excluded_libraries=[
'ld-linux',
'libexpat',
'libgcc_s',
'libglib',
'cmov',
'libice',
'libSM',
'libX',
'libg',
'libGL.so',
'libfontconfig',
'libfreetype',
'libdrm',
'libxcb',
'libICE',
'libnvidia',
'libc'
]
if len(sys.argv) < 3: if len(sys.argv) < 2:
print 'usage: create_bundle.py additional_label system_python_version' print 'usage: create_bundle.py additional_label'
sys.exit() sys.exit()
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
second_system_python_libs='/usr/lib/pymodules/'+system_python_version
python_bin_in_bundle='python'
qt4_plugins='/usr/lib/qt4/plugins'
additional_label=sys.argv[1] additional_label=sys.argv[1]
list_of_excluded_libraries=['ld-linux','libexpat','libgcc_s','libglib','cmov','libice','libSM','libX','libg','libGL.so','libfontconfig','libfreetype','libdrm','libxcb','libICE','libnvidia','libc']
currdir=os.getcwd() currdir=os.getcwd()
if currdir.find('deployment')==-1 or currdir.find('linux')==-1: if currdir.find('deployment')==-1 or currdir.find('linux')==-1:
print '\n' print '\n'
print 'ERROR: Please run this script from the deployment/linux directory' print 'ERROR: Please run this script from the deployment/linux directory'
print '\n' print '\n'
sys.exit() sys.exit()
print "WARNING: If this script does not run to completion, please run 'git reset --hard HEAD' in the main directory (two up from here) before restarting"
system_python_version=sys.version_info
system_python_executable='python'+str(system_python_version[0])+'.'+str(system_python_version[1])
system_python_bin='/usr/bin/'+system_python_executable
system_python_libs='/usr/lib/'+system_python_executable
qt4_module_location=os.path.dirname(PyQt4.__file__)
sip_module_location=os.path.dirname(sip.__file__)
print '\n' print '\n'
print 'WARNING: If this script does not run to completion, please run the reset_repository.py script before restarting'
print '\n' print '\n'
print 'Detecting architecture and revision' print 'Detecting architecture and revision'
uname_output=subprocess.Popen('uname -a', shell=True, cwd='../../',stdout=subprocess.PIPE).stdout uname_output=subprocess.Popen('uname -a', shell=True, cwd='../../',stdout=subprocess.PIPE).stdout
...@@ -39,26 +64,16 @@ if uname_line[0].find('x86_64') !=-1: ...@@ -39,26 +64,16 @@ if uname_line[0].find('x86_64') !=-1:
else: else:
libdir='lib' libdir='lib'
archstring='32bit' archstring='32bit'
date_pattern='%Y-%b-%d' directory_name='openstructure-linux-'+archstring+'-'+additional_label
build=datetime.date.today()
directory_name='openstructure-linux-'+archstring+'-'+additional_label+'-'+str(build)
print 'Hardcoding package python binary path in openstructure executables' print 'Hardcoding package python binary path in openstructure executables'
subprocess.call('rm -f scripts/ost_config.in.pre* scripts/ost_config.in.backup',shell=True,cwd='../../')
subprocess.call('mv scripts/ost_config.in scripts/ost_config.in.backup',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/@PYTHON_BINARY@/\$DNG_ROOT\/bin\/python/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 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 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='../../') 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 'Compiling Openstructure' print 'Compiling Openstructure'
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('cmake ./ -DCMAKE_BUILD_TYPE=Release -DPREFIX='+directory_name+' -DCOMPOUND_LIB='+chemlib_dictionary_location+' -DENABLE_IMG=ON -DENABLE_GUI=ON -DENABLE_GFX=ON -DOPTIMIZE=ON',shell=True,cwd='../../')
subprocess.call('make -j2',shell=True,cwd='../../') subprocess.call('make -j2',shell=True,cwd='../../')
print 'Removing obsolete packages and package directory' print 'Removing obsolete packages and package directory'
subprocess.call('rm -fr openstructure-linux*',shell=True,cwd='../../') subprocess.call('rm -fr openstructure-linux*',shell=True,cwd='../../')
...@@ -66,14 +81,12 @@ print 'Creating new package directory' ...@@ -66,14 +81,12 @@ print 'Creating new package directory'
subprocess.call('mkdir '+directory_name,shell=True,cwd='../../') subprocess.call('mkdir '+directory_name,shell=True,cwd='../../')
subprocess.call('mkdir '+directory_name+'/bin',shell=True,cwd='../../') subprocess.call('mkdir '+directory_name+'/bin',shell=True,cwd='../../')
print 'Copy python executable into stage for dependency detection' 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='../../') subprocess.call('cp '+system_python_bin+ ' stage/bin/python',shell=True,cwd='../../')
print 'Copy python libraries into the stage for dependency detection' print 'Copy python libraries into the stage for dependency detection'
subprocess.call('cp -pRL '+system_python_libs+' stage/'+libdir+'/python',shell=True,cwd='../../') subprocess.call('cp -pRL '+system_python_libs+' stage/'+libdir+'/',shell=True,cwd='../../')
subprocess.call('rm -fr stage/'+libdir+'/python/dist-packages',shell=True,cwd='../../') subprocess.call('rm -fr stage/'+libdir+'/'+system_python_executable+'/dist-packages',shell=True,cwd='../../')
if second_system_python_libs_flag==True: subprocess.call('cp -pRL '+sip_module_location+'/sip* stage/'+libdir+'/'+system_python_executable+'/',shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/sip* stage/'+libdir+'/python/',shell=True,cwd='../../') subprocess.call('cp -pRL '+qt4_module_location+' stage/'+libdir+'/'+system_python_executable+'/',shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/PyQt* stage/'+libdir+'/python/',shell=True,cwd='../../')
print 'Creating new dependency list' print 'Creating new dependency list'
so_list=[] so_list=[]
walk_list=os.walk('../../stage') walk_list=os.walk('../../stage')
...@@ -106,13 +119,12 @@ for entry in filtered_dep_list: ...@@ -106,13 +119,12 @@ for entry in filtered_dep_list:
print 'Copy python executable into package directory structure' print 'Copy python executable into package directory structure'
subprocess.call('cp '+system_python_bin+ ' '+directory_name+'/bin/python',shell=True,cwd='../../') subprocess.call('cp '+system_python_bin+ ' '+directory_name+'/bin/python',shell=True,cwd='../../')
print 'Copy python libraries into package directory structure' print 'Copy python libraries into package directory structure'
subprocess.call('cp -pRL '+system_python_libs+' '+directory_name+'/'+libdir+'/python',shell=True,cwd='../../') subprocess.call('cp -pRL '+system_python_libs+' '+directory_name+'/'+libdir+'/'+system_python_executable+'/',shell=True,cwd='../../')
subprocess.call('rm -fr '+directory_name+'/'+libdir+'/python/dist-packages',shell=True,cwd='../../') subprocess.call('rm -fr '+directory_name+'/'+libdir+'/'+system_python_executable+'/dist-packages',shell=True,cwd='../../')
if second_system_python_libs_flag==True: subprocess.call('cp -pRL '+sip_module_location+'/sip* '+directory_name+'/'+libdir+'/'+system_python_executable+'/',shell=True,cwd='../../')
subprocess.call('cp -pRL '+second_system_python_libs+'/sip* '+directory_name+'/'+libdir+'/python/',shell=True,cwd='../../') subprocess.call('cp -pRL '+qt4_module_location+' '+directory_name+'/'+libdir+'/'+system_python_executable+'/',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' print 'Copy Qt 4 plugins into package directory structure'
subprocess.call('cp -pRL '+qt4_plugins+' '+directory_name+'/bin/',shell=True,cwd='../../') subprocess.call('cp -pRL '+qt4_plugins_location+' '+directory_name+'/bin/',shell=True,cwd='../../')
print 'Copying supplementary material into package directory structure' print 'Copying supplementary material into package directory structure'
subprocess.call('cp -pRL stage/share/openstructure '+directory_name+'/share/',shell=True,cwd='../../') subprocess.call('cp -pRL stage/share/openstructure '+directory_name+'/share/',shell=True,cwd='../../')
print 'Copying examples into package directory structure' print 'Copying examples into package directory structure'
...@@ -122,19 +134,19 @@ subprocess.call('cp deployment/README.html '+directory_name,shell=True,cwd='../. ...@@ -122,19 +134,19 @@ subprocess.call('cp deployment/README.html '+directory_name,shell=True,cwd='../.
print 'Creating executables at the top level of the package directory structure' print 'Creating executables at the top level of the package directory structure'
subprocess.call('ln -sf bin/dng ./dng',shell=True,cwd='../../'+directory_name) subprocess.call('ln -sf bin/dng ./dng',shell=True,cwd='../../'+directory_name)
subprocess.call('ln -sf bin/ost ./ost',shell=True,cwd='../../'+directory_name) subprocess.call('ln -sf bin/ost ./ost',shell=True,cwd='../../'+directory_name)
subprocess.call('ln -sf bin/lddt ./lddt',shell=True,cwd='../../'+directory_name)
print 'Copying additional libraries in the package directory structure' print 'Copying additional libraries in the package directory structure'
subprocess.call('cp /usr/lib/libssl.so.0.9.8 '+directory_name+'/'+libdir,shell=True,cwd='../../') subprocess.call('cp '+ssl_crypto_location+'/libssl.so* '+directory_name+'/'+libdir,shell=True,cwd='../../')
subprocess.call('cp /usr/lib/libcrypto.so.0.9.8 '+directory_name+'/'+libdir,shell=True,cwd='../../') subprocess.call('cp '+ssl_crypto_location+'/libcrypto.so* '+directory_name+'/'+libdir,shell=True,cwd='../../')
print 'Removing headers from package directory structure' print 'Copying python headers in the package directory structure'
subprocess.call('rm -fr '+directory_name+'/include',shell=True,cwd='../../') subprocess.call('mkdir -p '+directory_name+'/local/include/',shell=True,cwd='../../')
subprocess.call('cp -r /usr/include/'+system_python_executable+' '+directory_name+'/local/include/',shell=True,cwd='../../')
print 'Stripping pyc files from bundle' print 'Stripping pyc files from bundle'
subprocess.call('rm -rf $(find . -name *.pyc)',shell=True,cwd='../../') subprocess.call('rm -rf $(find . -name *.pyc)',shell=True,cwd='../../')
print 'removing dokk and harmony examples from bundle' 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/dokk',shell=True,cwd='../../')
subprocess.call('rm -rf '+directory_name+'/share/openstructure/examples/code_fragments/harmony',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' print 'Compressing the bundle'
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='../../') subprocess.call('tar cfz '+directory_name+'.tgz '+directory_name,shell=True,cwd='../../')
print "Done. Please run 'git reset --hard HEAD' in the top directory before restarting."
import os,os.path
import shutil
import sys
import tarfile
import subprocess
import re
def get_libdir():
machine=os.uname()[4]
if machine.find('x86_64') !=-1:
return 'lib64'
else:
return 'lib'
def get_arch():
machine=os.uname()[4]
if machine.find('x86_64') !=-1:
return '64bit'
else:
return '32bit'
def clean(standalonedir):
if os.path.exists(standalonedir):
shutil.rmtree(standalonedir)
def copy_stage(stagedir,standalonedir):
libdir=get_libdir()
copytree_ex(os.path.join(stagedir,'bin'),os.path.join(standalonedir,'bin'))
copytree_ex(os.path.join(stagedir,libdir),os.path.join(standalonedir,libdir))
if os.path.exists(os.path.join(stagedir,'share')):
copytree_ex(os.path.join(stagedir,'share'),os.path.join(standalonedir,'share'))
def collect_deps(binaries,exclude_list):
dependencies=set()
for binary in binaries:
collect_deps_recursive_(binary,dependencies,exclude_list)
return dependencies
def collect_deps_recursive_(binary,collected,exclude_list):
ldd_stdout=subprocess.Popen(['ldd',binary],stdout=subprocess.PIPE).stdout
output=ldd_stdout.readlines()
new_dependencies=set()
for entry in output:
if entry.find("statically linked")!=-1:
continue
sp=entry.split('(0x')
if len(sp)>0: # only continue if line is dependency
sp2=sp[0].split('=>',1)[-1].split()
if sp2: #ensure libname exists (fix for virtual linux-gate)
text=sp2[0]
if not text.split('.')[0].split('/')[-1] in exclude_list and not text in collected:
collect_deps_recursive_(text,collected,exclude_list)
collected.add(text)
def copy_deps(binaries,standalonedir,exclude_list):
dependencies=set()
walk_list=os.walk(standalonedir)
binaries_list=[]
for dir_entry in walk_list:
for file_entry in dir_entry[2]:
if file_entry.endswith('.so') or file_entry in binaries:
filepath=os.path.join(dir_entry[0],file_entry)
binaries_list.append(filepath)
dependencies=collect_deps(binaries_list,exclude_list)
for dep in dependencies:
shutil.copy2(dep,os.path.join(standalonedir,get_libdir()))
def copy_examples(stagedir):
#todo
pass
def copy_qt_plugins():
#todo
pass
def process_scripts(scripts,standalonedir):
for script in scripts:
fp=open(os.path.join(standalonedir,'bin',script),'r')
text=fp.read()
fp.close()
text=re.sub('#export PYTHONPATH','export PYTHONPATH',text)
fp=open(os.path.join(standalonedir,'bin',script),'w')
fp.write(text)
fp.close()
def create_package(name,standalonedir):
try:
import pysvn
try:
client=pysvn.Client()
svn_info=client.info('.')
revstring='-rev'+str(svn_info['revision'.number])
except pysvn.ClientError:
print 'No svn directory found. Addin no revision number.'
revstring=''
except ImportError:
print 'Pysvn not installed. Adding no revision number.'
revstring=''
tar_name=name+'-linux-'+get_arch()+revstring+'.tgz'
if os.path.exists(tar_name):
os.remove(tar_name)
tar = tarfile.open(tar_name, "w:gz")
tar.add(standalonedir,name+'-linux-'+get_arch()+revstring)
tar.close()
def ignorer(dirpath,files):
ignores=[]
for f in files:
base=os.path.splitext(f)[0]
if f.endswith('.py'):
if base+'.pyc' in files or base+'.pyo' in files:
ignores.append(f)
elif f.endswith('.pyc'):
if base+'.pyo' in files:
ignores.append(f)
return ignores
def copy_python_dirs(standalonedir):
dirs=sys.path[1:]
dirs.sort() #get toplevel dir to the beginning
toplevel=dirs[0]
shutil.copytree(toplevel,os.path.join(standalonedir,get_libdir(),'python'),ignore=ignorer)
for d in dirs[1:]:
if not d.startswith(toplevel) and os.path.isdir(d):
toplevel=d
copytree_ex(toplevel,os.path.join(standalonedir,get_libdir(),'python'),ignore=ignorer)
def copytree_ex(source,destination, symlinks=False,ignore=None):
if not os.path.exists(destination):
shutil.copytree(source,destination,symlinks,ignore)
elif os.path.isdir(destination):
files=os.listdir(source)
if ignore:
ignores=ignore(source,files)
else:
ignores=[]
for f in files:
srcname=os.path.join(source,f)
dstname=os.path.join(destination,f)
if os.path.isdir(os.path.join(source,f)):
copytree_ex(srcname,dstname,symlinks,ignore=ignorer)
elif f not in ignores:
if symlinks and os.path.islink(srcname):
linkto = os.readlink(srcname)
os.symlink(linkto, dstname)
else:
shutil.copy2(srcname, dstname)
else:
raise IOError("destination is not a directory")
############ main script ####################
stagedir='../../stage'
ost_stagedir='../../../openstructure/stage'
standalonedir=os.path.join(os.getcwd(),'standalone')
binaries=['gosty']
exclude_list=['ld-linux','libexpat','libgcc_s','libglib','cmov','libice','libSM','libX','libg','libGL','libfontconfig','libfreetype','libdrm','libxcb','libICE']
scripts=['dng','ost']
#compile_stage()
clean(standalonedir)
print 'copying stage'
copy_stage(stagedir,standalonedir)
print 'copying ost stage'
copy_stage(ost_stagedir,standalonedir)
print 'copying python'
shutil.copy(sys.executable,os.path.join(stagedir,'bin'))
copy_python_dirs(standalonedir)
print 'copying dependencies'
binaries.append(sys.executable)
copy_deps(binaries,standalonedir,exclude_list)
print 'copying examples'
copy_examples(stagedir)
print 'copying plugins'
copy_qt_plugins()
print 'processing scripts'
process_scripts(scripts,standalonedir)
print 'creating package'
create_package('openstructure','standalone')
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)
compounds.chemlib
[Desktop Entry]
Name=OpenStructure
GenericName=Open-Source Computational Structural Biology Framework
Exec=dng
Icon=openstructure
Terminal=false
Type=Application
Categories=Science;
Name: openstructure
Version: 1.1
Release: 0.1d%{?dist}
Summary: Open-source computational structural biology framework
# The entire source code is LGPLv3 except the following files:
# modules/db/src/sqlite3.h, modules/db/src/sqlite.c
# which have no license
License: LGPLv3 and unlicensed
URL: www.openstructure.org
# The source for this package was pulled from upstream's git. Use the
# following commands to generate the tarball:
# git clone https://dng.biozentrum.unibas.ch/git/ost.git openstructure-1.1d
# cp /import/bc2/home/schwede/GROUP/OpenStructure/compounds.chemlib \
# openstructure-1.1d/
# tar -cJvf openstructure-1.1d.tar.xz openstructure-1.1d
Source0: %{name}-%{version}d.tar.xz
Source1: %{name}.desktop
BuildRequires: boost-devel,fftw-devel,eigen2-devel,libtiff-devel,libpng-devel,sip-devel,PyQt4-devel,cmake,desktop-file-utils
Requires: sip,PyQt4
%description
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.
%prep
%setup -n openstructure-1.1d
%build
%cmake . -DPREFIX=%{buildroot}/usr -DOPTIMIZE=ON -DCOMPOUND_LIB=compounds.chemlib
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}-%{version}
mkdir -p %{buildroot}/%{_datadir}/pixmaps
cp LICENSE.txt %{buildroot}/%{_defaultdocdir}/%{name}-%{version}/
cp ReadMe.txt %{buildroot}/%{_defaultdocdir}/%{name}-%{version}/
cp modules/gui/share/images/logo-small.png %{buildroot}/%{_datadir}/pixmaps/openstructure.png
rm %{buildroot}/%{_bindir}/ldt
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications %{SOURCE1}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/libost*
%{_libdir}/openstructure
%{_datadir}/openstructure
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%doc
%{_defaultdocdir}/%{name}-%{version}/LICENSE.txt
%{_defaultdocdir}/%{name}-%{version}/ReadMe.txt
%changelog
* Wed Jul 20 2011 Valerio Mariani <valerio.mariani@unibas.ch> 1.1-1d
- Initial release
%package devel
Summary: Open-source computational structural biology framework
Requires: openstructure
%description devel
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.
%files devel
%{_includedir}/*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment