Skip to content

Commit

Permalink
Merge pull request conda-forge#28498 from hpdcj/main
Browse files Browse the repository at this point in the history
Create recipe for hpv-meta in version 1.0 for conda-forge.
  • Loading branch information
xhochy authored Dec 18, 2024
2 parents b1b1e3d + 2dae191 commit 652f5f8
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
31 changes: 31 additions & 0 deletions recipes/hpv-kite/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Stop on error
set -o errexit

# add dependency-license-report plugin
sed -i "s/^\(\s*\)id 'java'/&\n\1id 'com.github.jk1.dependency-license-report' version 'latest.release'/" build.gradle

# build package with hpv-kite
chmod +x ./gradlew
./gradlew clean build jar createDependenciesJar
./gradlew generateLicenseReport

# create destination folder for conda command and the libraries
mkdir -p $PREFIX/bin/
mkdir -p $PREFIX/libexec/hpv-kite/

# copy jar files into output dir
cp build/libs/*.jar $PREFIX/libexec/hpv-kite/

# create executable scripts
tee ${PREFIX}/bin/hpv-kite << EOF
#!/bin/sh
exec \${JAVA_HOME}/bin/java -jar \${CONDA_PREFIX}/libexec/hpv-kite/hpv-kite-${PKG_VERSION}.jar "\$@"
EOF

tee ${PREFIX}/bin/hpv-kite.cmd << EOF
call %JAVA_HOME%\bin\java -jar %CONDA_PREFIX%\libexec\hpv-kite\hpv-kite-${PKG_VERSION}.jar %*
EOF

chmod +x $PREFIX/bin/hpv-kite
45 changes: 45 additions & 0 deletions recipes/hpv-kite/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% set name = "hpv-kite" %}
{% set version = "1.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/hpdcj/HPV-KITE/archive/refs/tags/{{ version }}.tar.gz
sha256: e928ceb741b4b1fd3ade33e6204530e5998c4b5091f4a9d7f2e094bdef897ec7

build:
noarch: generic
number: 0

requirements:
build:
- openjdk =21
- sed
run:
- openjdk >=17

test:
commands:
- hpv-kite

about:
home: https://github.com/hpdcj/HPV-KITE
summary: "HPV-Kite: HPV K-mer Index Tversky Estimator application"
description: |
HPV-Kite is a Java application that detects HPV within samples.
It can be used for DNA and/or RNA FASTQ files.
KITE stands for K-mer Index Tversky Estimator, as the application leverages
k-mer analysis combined with the Tversky index.
HPV-Kite not only expedites viral detection but also maintains comparable
sensitivity to existing approaches.
license: BSD-3-Clause
license_file:
- LICENSE
- build/reports/dependency-license/


extra:
recipe-maintainers:
- faramir

0 comments on commit 652f5f8

Please sign in to comment.