{% set version = '0.3.0' %}

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

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

source:
  fn: ini_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ini_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ini/ini_{{ version }}.tar.gz
  sha256: d2af3de005a2075b1e2c2b55d6d88f0dbab4aaf888f686f06ec9c8b81e9d7879

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

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/dvdscripter/ini
  license: GPL-3
  summary: Parse simple '.ini' configuration files to an structured list. Users can manipulate
    this resulting list with lapply() functions. This same structured list can be used
    to write back to file after modifications.
  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
