
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
26 lines
993 B
Python
26 lines
993 B
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 G4saiddata(Package):
|
|
"""Geant4 data from evaluated cross-sections in SAID data-base """
|
|
homepage = "http://geant4.web.cern.ch"
|
|
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4SAIDDATA.1.1.tar.gz"
|
|
|
|
version('1.1', sha256='a38cd9a83db62311922850fe609ecd250d36adf264a88e88c82ba82b7da0ed7f')
|
|
|
|
def install(self, spec, prefix):
|
|
mkdirp(join_path(prefix.share, 'data'))
|
|
install_path = join_path(prefix.share, 'data', 'G4SAIDDATA{0}'
|
|
.format(self.version))
|
|
install_tree(self.stage.source_path, install_path)
|
|
|
|
def url_for_version(self, version):
|
|
"""Handle version string."""
|
|
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4SAIDDATA.%s.tar.gz" % version
|