Skip to content

Commit 4a25b6f

Browse files
committed
making castep compile
1 parent d035db6 commit 4a25b6f

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

packages/castep/package.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,38 @@
2323
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2424
##############################################################################
2525
from spack import *
26+
import os
2627

2728

28-
class Castep(Package):
29+
class Castep(MakefilePackage):
2930
"""
3031
CASTEP is a leading code for calculating the properties of materials from
3132
first principles.
3233
"""
3334

34-
homepage = "http://www.castep.org/"
35-
url = 'fakeurl.tar.gz'
35+
homepage = "http://www.castep.org"
36+
url = "file://%s/CASTEP-21.11.tar.gz" % os.getcwd()
3637
licensed = True
37-
only_binary = True
3838

39-
version('21.11')
39+
version('21.11', sha256='d909936a51dd3dff7a0847c2597175b05c8d0018d5afe416737499408914728f')
4040

4141
depends_on('intel-mpi')
4242
depends_on('intel-mkl')
4343
depends_on('fftw-api@3')
4444

45+
def build(self, spec, prefix):
46+
with working_dir(self.build_directory):
47+
make('ROOTDIR={}'.format(self.build_directory),
48+
'FFT=mkl',
49+
'FFTLIBDIR={}'.format(os.environ['MKLROOT']),
50+
'MATHLIBS=mkl',
51+
'MATHLIBDIR={}'.format(os.environ['MKLROOT']),
52+
'ARCH=linux_x86_64_ifort',
53+
'COMMS_ARCH=mpi'
54+
)
55+
4556
def install(self, spec, prefix):
46-
pass
57+
with working_dir(self.build_directory):
58+
make('ROOTDIR={}'.format(self.build_directory),
59+
'INSTALL_DIR={}'.format(prefix),
60+
'install')

0 commit comments

Comments
 (0)