summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-06-11 11:47:40 -0500
committerMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-06-11 18:47:40 +0200
commit4db107353e546d2a2367cd04bfe478ff1e9168c5 (patch)
tree3d7b6b898f53f47b1461e19940f46eb357972612
parenta5c6f0412be6e4450ec9f093d87aa7b7e3083c1c (diff)
downloadspack-4db107353e546d2a2367cd04bfe478ff1e9168c5.tar.gz
spack-4db107353e546d2a2367cd04bfe478ff1e9168c5.tar.bz2
spack-4db107353e546d2a2367cd04bfe478ff1e9168c5.tar.xz
spack-4db107353e546d2a2367cd04bfe478ff1e9168c5.zip
Convert elk to MakefilePackage (#4477)
-rw-r--r--var/spack/repos/builtin/packages/elk/package.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py
index 148fbd999a..23948a1a06 100644
--- a/var/spack/repos/builtin/packages/elk/package.py
+++ b/var/spack/repos/builtin/packages/elk/package.py
@@ -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',
@@ -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)