{% set version = '0.3' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-bmp
  version: {{ version|replace("-", "_") }}

source:
  fn: bmp_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/bmp_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/bmp/bmp_{{ version }}.tar.gz
  sha256: bdf790249b932e80bc3a188a288fef079d218856cf64ffb88428d915423ea649

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

test:
  commands:
    - $R -e "library('bmp')"  # [not win]
    - "\"%R%\" -e \"library('bmp')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=bmp
  license: GPL (>= 2)
  summary: Reads Windows BMP format images. Currently limited to 8 bit greyscale images and 24,32
    bit (A)RGB images. Pure R implementation without external dependencies.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'   # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'   # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
