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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/awsMethods_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/awsMethods/awsMethods_{{ version }}.tar.gz
  sha256: 74defd06cd5e94c4e810916b93436673c8bc1dca4ba7295ce1f47b799b62dcf7

build:
  merge_build_host: True  # [win]
  number: 1000
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: http://www.wias-berlin.de/software/imaging/
  license: GPL (>= 2)
  summary: Defines the method extract and provides 'openMP' support as needed in several packages.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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