{% set name = "metadmg" %}
{% set version = "0.4.2" %}
{% set sha256 = "e86b715323dd59c5087fb837306db324be19aaf7b4a1d4d8eb0b2894600da87b" %}

package:
  name: {{ name }}
  version: {{ version }}

source:
  git_url: https://github.com/metaDMG-dev/metaDMG-cpp.git
  git_rev: v{{ version }}
  sha256: {{ sha256 }}
  patches:
    - 0001-Makefile.patch

build:
  number: 0
  run_exports:
    - {{ pin_subpackage(name, max_pin="x.x") }}

requirements:
  build:
    - make
    - {{ compiler('cxx') }}
    - pkg-config
  host:
    - openssl
    - htslib
    - gsl
    - eigen
    - curl
    - zlib
    - bzip2
    - xz
  run:
    - openssl
    - htslib
    - gsl
    - eigen

test:
  commands:
    - metaDMG-cpp 2>&1 | grep 'metaDMG-cpp'
    - metaDMG-cpp getdamage 2>&1 | grep 'getdamage'
    - metaDMG-cpp lca 2>&1 | grep 'lca'
    - compressbam 2>&1 | grep 'compressbam'
    - extract_reads 2>&1 | grep 'extract_reads'

about:
  home: "https://github.com/metaDMG-dev/metaDMG-cpp"
  license: "GPL-3.0-or-later, MIT"
  license_family: "GPL3"
  summary: "metaDMG-cpp: fast and efficient method for estimating mutation and damage rates in ancient DNA data."
  dev_url: "https://github.com/metaDMG-dev/metaDMG-cpp"
  doc_url: "https://github.com/metaDMG-dev/metaDMG-cpp/blob/v{{ version }}/README.md"

extra:
  additional-platforms:
    - linux-aarch64
    - osx-arm64
  recipe-maintainers:
    - ANGSD
    - rahenriksen
  identifiers:
    - doi:10.1101/2022.12.06.519264
  skip-lints:
    - uses_vcs_url
