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

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

source:
  fn: sjmisc_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/sjmisc_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sjmisc/sjmisc_{{ version }}.tar.gz
  sha256: 8f3551913baa08e2d7c0b0c9c4677bd534bc6a5a7fe25f0c0861ba2cb2c3d215

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-broom >=0.4.5
    - r-crayon
    - r-dplyr
    - r-haven >=1.1.2
    - r-magrittr
    - r-purrr
    - r-rlang
    - r-sjlabelled >=1.0.13
    - r-stringdist >=0.9.4
    - r-stringr >=1.2.0
    - r-tidyr
  run:
    - r-base
    - r-broom >=0.4.5
    - r-crayon
    - r-dplyr
    - r-haven >=1.1.2
    - r-magrittr
    - r-purrr
    - r-rlang
    - r-sjlabelled >=1.0.13
    - r-stringdist >=0.9.4
    - r-stringr >=1.2.0
    - r-tidyr

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

about:
  home: https://github.com/strengejacke/sjmisc, https://strengejacke.github.io/sjmisc
  license: GPL-3
  summary: Collection of miscellaneous utility functions, supporting data  transformation tasks
    like recoding, dichotomizing or grouping variables,  setting and replacing missing
    values. The data transformation functions  also support labelled data, and all integrate
    seamlessly into a  'tidyverse'-workflow.
  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:
    - ccwang002
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
