opium : convert to be an autotools package (#18708)

This commit is contained in:
t-nojiri 2020-10-16 19:08:59 +09:00 committed by GitHub
parent a481087695
commit 4b9701a195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
from spack import *
class Opium(Package):
class Opium(AutotoolsPackage):
"""DFT pseudopotential generation project"""
homepage = "https://opium.sourceforge.net/index.html"
@ -17,15 +17,19 @@ class Opium(Package):
depends_on('blas')
depends_on('lapack')
def install(self, spec, prefix):
def configure_args(self):
spec = self.spec
options = []
libs = spec['lapack'].libs + spec['blas'].libs
options = ['LDFLAGS=%s' % libs.ld_flags]
options.append('LDFLAGS=%s' % libs.ld_flags)
return options
configure(*options)
def build(self, spec, prefix):
with working_dir("src", create=False):
make("all-subdirs")
make("opium")
def install(self, spec, prefix):
# opium not have a make install :-((
mkdirp(self.prefix.bin)
install(join_path(self.stage.source_path, 'opium'),