summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/elk/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/elk/package.py')
-rw-r--r--var/spack/repos/builtin/packages/elk/package.py27
1 files changed, 10 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py
index acaf863935..6abebb4174 100644
--- a/var/spack/repos/builtin/packages/elk/package.py
+++ b/var/spack/repos/builtin/packages/elk/package.py
@@ -1,13 +1,13 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
-# For details, see https://github.com/llnl/spack
-# Please also see the LICENSE file for our notice and the LGPL.
+# For details, see https://github.com/spack/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
@@ -22,11 +22,10 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import spack
from spack import *
-class Elk(Package):
+class Elk(MakefilePackage):
'''An all-electron full-potential linearised augmented-plane wave
(FP-LAPW) code with many advanced features.'''
@@ -60,7 +59,7 @@ class Elk(Package):
# Cannot be built in parallel
parallel = False
- def configure(self, spec):
+ def edit(self, spec, prefix):
# Dictionary of configuration options
config = {
'MAKE': 'make',
@@ -90,9 +89,9 @@ class Elk(Package):
blas = 'blas.a'
lapack = 'lapack.a'
if '+blas' in spec:
- blas = spec['blas'].blas_libs.joined()
+ blas = spec['blas'].libs.joined()
if '+lapack' in spec:
- lapack = spec['lapack'].lapack_libs.joined()
+ lapack = spec['lapack'].libs.joined()
# lapack must come before blas
config['LIB_LPK'] = ' '.join([lapack, blas])
@@ -110,8 +109,8 @@ class Elk(Package):
config['F90'] = spec['mpi'].mpifc
config['F77'] = spec['mpi'].mpif77
else:
- config['F90'] = join_path(spack.build_env_path, 'f90')
- config['F77'] = join_path(spack.build_env_path, 'f77')
+ config['F90'] = spack_fc
+ config['F77'] = spack_f77
config['SRC_MPI'] = 'mpi_stub.f90'
# OpenMP support
@@ -141,14 +140,8 @@ class Elk(Package):
inc.write('{0} = {1}\n'.format(key, config[key]))
def install(self, spec, prefix):
- # Elk only provides an interactive setup script
- self.configure(spec)
-
- make()
- make('test')
-
# The Elk Makefile does not provide an install target
- mkdirp(prefix.bin)
+ mkdir(prefix.bin)
install('src/elk', prefix.bin)
install('src/eos/eos', prefix.bin)