{% set version = '2.0.2' %}

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

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

source:
  fn: pkgconfig_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/pkgconfig_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pkgconfig/pkgconfig_{{ version }}.tar.gz
  sha256: 25997754d1adbe7a251e3bf9879bb52dced27dd8b84767d558f0f644ca8d69ca

build:
  merge_build_host: True  # [win]
  number: 1

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

requirements:
  build:
    - {{posix}}zip               # [win]

  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/r-lib/pkgconfig
  license: MIT
  summary: Set configuration options on a per-package basis. Options set by a given package only
    apply to that package, other packages are unaffected.
  license_family: MIT
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\MIT'  # [win]

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