spack/var/spack/repos/builtin/packages/sofa-c/package.py
Todd Gamblin 62927654dd checksums: use sha256 checksums everywhere
We'd like to use a consistent checksum scheme everywhere so that we can:

    a) incorporate archive checksums into our specs and have a
       consistent hashing algorithm across all specs.

    b) index mirrors with a consistent type of checksum, and not one that
       is dependent on how spack packages are written.

- [x] convert existing md5, sha224, sha512, sha1 checksums to sha256
2019-10-12 07:19:43 -07:00

32 lines
1.1 KiB
Python

# Copyright 2013-2019 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 SofaC(MakefilePackage):
"""Standards of Fundamental Astronomy (SOFA) library for ANSI C."""
homepage = "http://www.iausofa.org/current_C.html"
url = "http://www.iausofa.org/2018_0130_C/sofa_c-20180130.tar.gz"
version('20180130', sha256='de09807198c977e1c58ea1d0c79c40bdafef84f2072eab586a7ac246334796db')
@property
def build_directory(self):
return join_path(self.version, 'c', 'src')
def edit(self, spec, prefix):
makefile = FileFilter(join_path(self.build_directory, 'makefile'))
makefile.filter('CCOMPC = gcc', 'CCOMPC = {0}'.format(spack_cc))
def install(self, spec, prefix):
with working_dir(self.build_directory):
mkdir(prefix.include)
install('sofa.h', prefix.include)
install('sofam.h', prefix.include)
mkdir(prefix.lib)
install('libsofa_c.a', prefix.lib)