From 03e93345b1037154cbdc745960c0b57c4c87194e Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 23 Jan 2022 06:18:29 -0500 Subject: [PATCH] compose: add new package (#28371) --- .../repos/builtin/packages/compose/package.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/compose/package.py diff --git a/var/spack/repos/builtin/packages/compose/package.py b/var/spack/repos/builtin/packages/compose/package.py new file mode 100644 index 0000000000..0c73114ce5 --- /dev/null +++ b/var/spack/repos/builtin/packages/compose/package.py @@ -0,0 +1,41 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Compose(MakefilePackage): + """CompOSE: CompStar Online Supernovae Equations of State + + The online service CompOSE provides data tables for different + state of the art equations of state (EoS) ready for further usage + in astrophysical applications, nuclear physics and beyond.""" + + homepage = "https://compose.obspm.fr/home" + url = "https://compose.obspm.fr/download/code/codehdf5.zip" + maintainers = ['eschnett'] + + # Spack must not modify our url which doesn't contain a version number + def url_for_version(self, version): + return "https://compose.obspm.fr/download/code/codehdf5.zip" + + # There is no version number for the zip file itself. This is the version + # number output by the `compose` executable. + version('2.17', sha256='f3f68203a50bb898abe31ee0b3dc750a1f1164c9e5d7fb9c4546b4eaa0cd172b') + + depends_on('hdf5 +fortran') + + parallel = False + + executables = ['compose', 'test_read_hdf5', 'test_read_opacity'] + + @property + def build_targets(self): + return self.executables + + def install(self, spec, prefix): + mkdir(prefix.bin) + for f in self.executables: + install(f, prefix.bin)