summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMiles Perry <37849532+Miles-Perry@users.noreply.github.com>2018-09-03 20:52:11 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2018-09-03 20:52:11 -0500
commitad8fbe3c7f8bdd7c4b6a25dea5630e5b410b78b9 (patch)
treec4082f1d09d07c863b26afe4dfc438533c2ca828 /var
parent585c69b94c7c9dd68033da33e7ddde939198e9f9 (diff)
downloadspack-ad8fbe3c7f8bdd7c4b6a25dea5630e5b410b78b9.tar.gz
spack-ad8fbe3c7f8bdd7c4b6a25dea5630e5b410b78b9.tar.bz2
spack-ad8fbe3c7f8bdd7c4b6a25dea5630e5b410b78b9.tar.xz
spack-ad8fbe3c7f8bdd7c4b6a25dea5630e5b410b78b9.zip
aperture-photometry: new package (#9119)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/aperture-photometry/APT.sh4
-rw-r--r--var/spack/repos/builtin/packages/aperture-photometry/package.py51
2 files changed, 55 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/aperture-photometry/APT.sh b/var/spack/repos/builtin/packages/aperture-photometry/APT.sh
new file mode 100644
index 0000000000..b51d30626b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aperture-photometry/APT.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# convenience wrapper for the aperture jar file
+java -jar APT.jar "$@"
+
diff --git a/var/spack/repos/builtin/packages/aperture-photometry/package.py b/var/spack/repos/builtin/packages/aperture-photometry/package.py
new file mode 100644
index 0000000000..f750856e31
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aperture-photometry/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/spack/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os.path
+
+
+class AperturePhotometry(Package):
+ """Aperture Photometry Tool APT is software for astronomical research"""
+
+ homepage = "http://www.aperturephotometry.org/aptool/"
+ url = "http://www.aperturephotometry.org/aptool/wp-content/plugins/download-monitor/download.php?id=1"
+
+ version('2.7.2', '2beca6aac14c5e0a94d115f81edf0caa9ec83dc9d32893ea00ee376c9360deb0', extension='tar.gz')
+
+ depends_on('java')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ jar_file = 'APT.jar'
+ install(jar_file, prefix.bin)
+ java = join_path(self.spec['java'].prefix, 'bin', 'java')
+ script_sh = join_path(os.path.dirname(__file__), "APT.sh")
+ script = join_path(prefix.bin, "apt")
+ install(script_sh, script)
+ set_executable(script)
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
+ filter_file('^java', java, script, **kwargs)
+ filter_file('APT.jar', join_path(prefix.bin, 'APT.jar'),
+ script, **kwargs)