summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gaussian/package.py76
1 files changed, 42 insertions, 34 deletions
diff --git a/var/spack/repos/builtin/packages/gaussian/package.py b/var/spack/repos/builtin/packages/gaussian/package.py
index f32b9b2b38..7a1f7e6821 100644
--- a/var/spack/repos/builtin/packages/gaussian/package.py
+++ b/var/spack/repos/builtin/packages/gaussian/package.py
@@ -2,50 +2,58 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
from spack import *
import os
class Gaussian(Package):
- """Gaussian is a computer program for computational chemistry"""
+ """Gaussian is a computer program for computational chemistry"""
homepage = "http://www.gaussian.com/"
- url = "file://{0}/g09.tgz".format(os.getcwd())
manual_download = True
- version('09', '7d4c95b535e68e48af183920df427e4e')
+ maintainers = ['antoniokaust']
+
+ version('16-B.01', sha256='0b2cf60aa85d2c8c8e7547446e60e8e8cb67eec20e5f13c4a3e4e7616dcdf122')
+ version('09-D.01', sha256='ef14885b5e334b6ec44a93bfd7225c634247dc946416af3087ab055bf05f54cd')
+
+ @property
+ def ver(self):
+ return self.version.string.split('-')[0]
+
+ @property
+ def g_root(self):
+ return join_path(self.prefix, 'g' + self.ver)
+
+ @property
+ def g_bsd(self):
+ return join_path(self.g_root, 'bsd')
+
+ def url_for_version(self, version):
+ return "file://{0}/g{1}.tgz".format(os.getcwd(), version)
def install(self, spec, prefix):
- install_tree('.', prefix.bin)
- patch_install_files = ['flc',
- 'linda8.2/opteron-linux/bin/flc',
- 'linda8.2/opteron-linux/bin/LindaLauncher',
- 'linda8.2/opteron-linux/bin/ntsnet',
- 'linda8.2/opteron-linux/bin/pmbuild',
- 'linda8.2/opteron-linux/bin/vntsnet',
- 'ntsnet'
- ]
- for filename in patch_install_files:
- if os.path.isfile(filename):
- filter_file('/mf/frisch/g09', prefix.bin, join_path(prefix.bin,
- filename), string='True')
- patch_install_files = ['linda8.2/opteron-linux/bin/ntsnet',
- 'linda8.2/opteron-linux/bin/vntsnet',
- ]
- for filename in patch_install_files:
- if os.path.isfile(filename):
- filter_file('/usr/bin/linda', prefix.bin, join_path(prefix.bin,
- filename), string='True')
+ install_tree('.', self.g_root)
+
+ @run_after('install')
+ def bsd_install(self):
+ with working_dir(self.g_root):
+ bsd_install = Executable(join_path('bsd', 'install'))
+ bsd_install()
def setup_run_environment(self, env):
- env.set('g09root', self.prefix)
- env.set('GAUSSIANHOME', self.prefix)
- env.set('GAUSS_EXEDIR', self.prefix.bin)
- env.set('G09_BASIS', self.prefix.bin.basis)
- env.set('GAUSS_LEXEDIR', join_path(self.prefix.bin, 'linda-exe'))
- env.set('GAUSS_ARCHDIR', self.prefix.bin.arch)
- env.set('GAUSS_BSDDIR', self.prefix.bin.bsd)
- env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix.bin,
- 'linda8.2', 'opteron-linux', 'lib'))
- env.prepend_path('LD_LIBRARY_PATH', self.prefix.bin)
+ env.set('g' + self.ver + 'root', self.prefix)
+
+ env.prepend_path('GAUSS_EXEDIR', self.g_root)
+ env.prepend_path('GAUSS_EXEDIR', self.g_bsd)
+
+ env.prepend_path('PATH', self.g_root)
+ env.prepend_path('PATH', self.g_bsd)
+
+ env.set('GAUSS_LEXEDIR', join_path(self.g_root, 'linda-exe'))
+ env.set('GAUSS_ARCHDIR', join_path(self.g_root, 'arch'))
+ env.set('GAUSS_BSDDIR', self.g_bsd)
+ env.set('G' + self.ver + 'BASIS', join_path(self.g_root, 'basis'))
+
+ env.prepend_path('LD_LIBRARY_PATH', self.g_root)
+ env.prepend_path('LD_LIBRARY_PATH', self.g_bsd)