summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/aspera-cli/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/aspera-cli/package.py')
-rw-r--r--var/spack/repos/builtin/packages/aspera-cli/package.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/aspera-cli/package.py b/var/spack/repos/builtin/packages/aspera-cli/package.py
new file mode 100644
index 0000000000..3a903208f1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aspera-cli/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2018 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 *
+from glob import glob
+
+
+class AsperaCli(Package):
+ """The Aspera CLI client for the Fast and Secure Protocol (FASP)."""
+
+ homepage = "https://asperasoft.com"
+ url = "https://download.asperasoft.com/download/sw/cli/3.7.7/aspera-cli-3.7.7.608.927cce8-linux-64-release.sh"
+
+ version('3.7.7', 'e92140d809e7e65112a5d1cd49c442cf',
+ url='https://download.asperasoft.com/download/sw/cli/3.7.7/aspera-cli-3.7.7.608.927cce8-linux-64-release.sh',
+ expand=False)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PATH', self.prefix.cli.bin)
+
+ def install(self, spec, prefix):
+ runfile = glob(join_path(self.stage.path, 'aspera-cli*.sh'))[0]
+ # Update destination path
+ filter_file('INSTALL_DIR=~/.aspera',
+ 'INSTALL_DIR=%s' % prefix,
+ runfile,
+ string=True)
+ # Install
+ chmod = which('chmod')
+ chmod('+x', runfile)
+ runfile = which(runfile)
+ runfile()