Commit c0c6ba41 authored by dsentinel's avatar dsentinel
Browse files

Initial commit. Works on macos

parent 1794b890
#!/usr/bin/env bash -x
mkdir -p $PREFIX/jar
# Drop the version # in the jar filename so the shell wrapper doesn't have to adjust.
cp ${PKG_NAME}-${PKG_VERSION}.jar $PREFIX/jar/${PKG_NAME}.jar
pwd
ls
mkdir -p $PREFIX/bin
cp ${RECIPE_DIR}/$PKG_NAME $PREFIX/bin/$PKG_NAME
{% set version = "2.1.0" %}
{% set name = "stationxml-seed-converter" %}
# TODO: Looks like conda now has java packages and JRE (well SDK) and maybe entry points
# This recipe copies the jar over and and a bash script that wraps the 'java -jar staiton...' stuff
# So it assumes that the system has java install, which is a pretty safe bet so... away we goo.
package:
name: stationxml-seed-converter
version: {{ version }}
source:
url: https://github.com/iris-edu/{{ name }}/releases/download/{{ name }}-{{ version }}/{{ name }}-{{ version }}.jar
build:
number: 0
noarch: generic
skip: True # [win]
requirements:
build:
host:
run:
test:
commands:
- {{ name }} -h
about:
home: https://github.com/iris-edu/{{ name }}
license: GNU GPL version 3
summary: Convert seismological metadata between dataless SEED and FDSN-StationXML file formats.
#!/usr/bin/env bash -x
# Here are 2 ways to find the jar short of injecting $BUID_PREFIX
# into this script and having conda relocate at install time.
# Injecting would be the best solution. If either of these fails in the future.
# Just write a sed script to inject build prefix into the path at build time.
# this works, but wouldn't if conda envs are stacked or if you run without the env activated
#java -jar ${CONDA_PREFIX}/jar/stationxml-validator.jar "$@"
# But this looks relative to where the script is, seems better. symlinks can break this, but seems safer
#echo ${BASH_SOURCE%/*}
java -jar ${BASH_SOURCE%/*}/../jar/stationxml-seed-converter.jar "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment