{% set version = "1.0.10" %}

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

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

source:
  fn: sjlabelled_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/sjlabelled_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/sjlabelled/sjlabelled_{{ version }}.tar.gz
  sha256: cbf83e3c91fc2b82f44419934fe24a2e5428db93b10aa95a01854ebc10d65af7

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

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

requirements:
  build:
    - r-base
    - r-broom
    - r-dplyr >=0.7.1
    - r-haven >=1.0.0
    - r-magrittr
    - r-prediction
    - r-purrr >=0.2.2.2
    - r-rlang
    - r-snakecase >=0.8.1
    - r-tibble >=1.3.3

  run:
    - r-base
    - r-broom
    - r-dplyr >=0.7.1
    - r-haven >=1.0.0
    - r-magrittr
    - r-prediction
    - r-purrr >=0.2.2.2
    - r-rlang
    - r-snakecase >=0.8.1
    - r-tibble >=1.3.3

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

about:
  home: https://github.com/strengejacke/sjlabelled
  license: GPL-3
  summary: Collection of functions dealing with labelled data, like reading and  writing data
    between R and other statistical software packages like 'SPSS', 'SAS' or 'Stata',
    and working with labelled data. This includes easy ways  to get, set or change value
    and variable label attributes, to convert  labelled vectors into factors or numeric
    (and vice versa), or to deal with  multiple declared missing values.
  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
    - cbrueffer
    - ccwang002
