-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #19551, commits were: * luciphor2: replace - in version by _ * luciphor2: initial commit based on the opsin 2.4.0 recipe
- Loading branch information
1 parent
5b025c3
commit df68d1e
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -eu -o pipefail | ||
|
||
outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM | ||
mkdir -p $outdir | ||
mkdir -p $PREFIX/bin | ||
cp luciphor*jar $outdir/luciphor2.jar | ||
cp $RECIPE_DIR/luciphor2.sh $outdir/luciphor2 | ||
ln -s $outdir/luciphor2 $PREFIX/bin | ||
chmod 0755 "$outdir/luciphor2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
# Wraps opsin.jar | ||
set -o pipefail | ||
|
||
# Find original directory of bash script, resovling symlinks | ||
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128 | ||
SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
SOURCE="$(readlink "$SOURCE")" | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
JAR_DIR=$DIR | ||
java=java | ||
if [ -e "$JAVA_HOME/bin/java" ] | ||
then | ||
java="$JAVA_HOME/bin/java" | ||
fi | ||
|
||
# extract memory and system property Java arguments from the list of provided arguments | ||
# http://java.dzone.com/articles/better-java-shell-script | ||
default_jvm_mem_opts="-Xms512m -Xmx1g" | ||
jvm_mem_opts="" | ||
jvm_prop_opts="" | ||
pass_args="" | ||
for arg in "$@"; do | ||
case $arg in | ||
'-D'*) | ||
jvm_prop_opts="$jvm_prop_opts $arg" | ||
;; | ||
'-XX'*) | ||
jvm_prop_opts="$jvm_prop_opts $arg" | ||
;; | ||
'-Xm'*) | ||
jvm_mem_opts="$jvm_mem_opts $arg" | ||
;; | ||
*) | ||
pass_args="$pass_args $arg" | ||
;; | ||
esac | ||
done | ||
|
||
if [ "$jvm_mem_opts" == "" ] && [ -z ${_JAVA_OPTIONS+x} ]; then | ||
jvm_mem_opts="$default_jvm_mem_opts" | ||
fi | ||
|
||
pass_arr=($pass_args) | ||
if [[ ${pass_arr[0]} == org* ]] | ||
then | ||
eval "$java" $jvm_mem_opts $jvm_prop_opts -cp "$JAR_DIR/luciphor2.jar" $pass_args | ||
else | ||
eval "$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/luciphor2.jar" $pass_args | ||
fi | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% set name = "luciphor2" %} | ||
{% set version = "2018-06-28" %} | ||
{% set sha256 = "79adf33ff629ce80f0010ead773e2cd5e855304d0685625f4921a4ba72990435" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version|replace("-", "_") }} | ||
|
||
source: | ||
url: https://depot.galaxyproject.org/software/luciphor2/luciphor2_{{ version }}_all_all.jar | ||
sha256: {{ sha256 }} | ||
|
||
build: | ||
noarch: generic | ||
number: 0 | ||
|
||
requirements: | ||
run: | ||
- openjdk >=6 | ||
|
||
test: | ||
commands: | ||
- luciphor2 | ||
|
||
about: | ||
home: http://luciphor2.sourceforge.net/ | ||
license: Apache-2.0 | ||
summary: Luciphor2 performs PTM-site localization on MS/MS data | ||
|
||
extra: | ||
notes: | | ||
Adds a wrapper shell script "luciphor2". | ||
This shell wrapper is called "luciphor2" and is on $PATH by default. By default | ||
"-Xms512m -Xmx1g" is set in the wrapper. If you want to overwrite it you can | ||
specify these values directly after your binaries. If you have _JAVA_OPTIONS | ||
set globally this will take precedence. | ||
For example run with "luciphor -Xms512m -Xmx1g" |