{% set version = "1.10" %}

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

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

source:
  url: https://github.com/samtools/htslib/releases/download/{{ version }}/htslib-{{ version }}.tar.bz2
  sha256: 7ae44dd9faeb4c4293e9bb4815164ac28c6c6fae81fed4791df2fa878f57a972

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - curl
    - bzip2
    - xz
    - zlib
    - libdeflate
  run:
    - curl
    - bzip2
    - xz
    - zlib
    - libdeflate

test:
  commands:  # We want to make sure that libdeflate is actually linked via HTSLib
    - "otool -L $PREFIX/bin/bgzip | grep deflate"  # [osx]
    - "ldd $PREFIX/bin/bgzip | grep deflate"  # [not osx]

about:
  home: https://github.com/samtools/htslib
  license: MIT
  summary: C library for high-throughput sequencing data formats.

extra:
  identifiers:
    - biotools:HTSlib
