diff options
author | xfzhao <xfzhao@iastate.edu> | 2020-01-03 03:22:09 -0600 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-01-03 10:22:09 +0100 |
commit | 100593b83a186834b3881e122f16656c3ee104a5 (patch) | |
tree | 030104739d734bad95372533bbafb22dbb093a72 /var | |
parent | 729e43ffac23ba512da0014cfef83f3e3d3e2919 (diff) | |
download | spack-100593b83a186834b3881e122f16656c3ee104a5.tar.gz spack-100593b83a186834b3881e122f16656c3ee104a5.tar.bz2 spack-100593b83a186834b3881e122f16656c3ee104a5.tar.xz spack-100593b83a186834b3881e122f16656c3ee104a5.zip |
new package: bref3 (#14256)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/bref3/bref.sh | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/bref3/package.py | 46 |
2 files changed, 50 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bref3/bref.sh b/var/spack/repos/builtin/packages/bref3/bref.sh new file mode 100644 index 0000000000..5a182fe01c --- /dev/null +++ b/var/spack/repos/builtin/packages/bref3/bref.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# convenience wrapper for the jar file +java $JAVA_ARGS $JAVA_OPTS -jar bref.jar "$@" + diff --git a/var/spack/repos/builtin/packages/bref3/package.py b/var/spack/repos/builtin/packages/bref3/package.py new file mode 100644 index 0000000000..521f2f1043 --- /dev/null +++ b/var/spack/repos/builtin/packages/bref3/package.py @@ -0,0 +1,46 @@ +# 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 * +import os.path + + +class Bref3(Package): + """Bref3: Converts from VCF format to bref3 format.""" + + homepage = "http://faculty.washington.edu/browning/beagle/beagle.html" + + version('2019-11-25', sha256='969c0881050c4a48d19be9ea64bf49fa68c1403b69f9f739bbfd865dda639b2d', + expand=False, url='http://faculty.washington.edu/browning/beagle/bref3.25Nov19.28d.jar') + version('2019-07-12', sha256='8a9c3b6c38e36ef4c05a61108f083005fd985026c67d75a8173088f88816a202', + expand=False, url='https://faculty.washington.edu/browning/beagle/bref3.12Jul19.0df.jar') + version('2018-01-27', sha256='4d32f0b6d536c88d5332d961309466c8c3dd9572907a3755450d26d7ba841083', + expand=False, url='https://faculty.washington.edu/browning/beagle/bref.27Jan18.7e1.jar') + depends_on('java@8', type='run') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + jar_file = os.path.basename(self.stage.archive_file) + install(jar_file, prefix.bin) + + # Set up a helper script to call java on the jar file, + # explicitly codes the path for java and the jar file. + + if self.version >= Version('2019'): + script = prefix.bin.bref3 + else: + script = prefix.bin.bref + + script_sh = join_path(os.path.dirname(__file__), "bref.sh") + install(script_sh, script) + set_executable(script) + + # Munge the helper script to explicitly point to java and the + # jar file. + java = self.spec['java'].prefix.bin.java + kwargs = {'ignore_absent': False, 'backup': False, 'string': False} + filter_file('^java', java, script, **kwargs) + filter_file('bref.jar', join_path(prefix.bin, jar_file), + script, **kwargs) |