{% set version = '1.3-4' %}

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

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

source:
  fn: flexclust_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/flexclust_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/flexclust/flexclust_{{ version }}.tar.gz
  sha256: 7bbbb63bcf3aca81d8f6cafd674c9cc25dcea0a1b320c405b07cac99ccf32ff5

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
    - r-lattice
    - r-modeltools

  run:
    - r-base
    - r-lattice
    - r-modeltools

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

about:
  home: https://CRAN.R-project.org/package=flexclust
  license: GPL-2
  summary: The main function kcca implements a general framework for k-centroids cluster analysis
    supporting arbitrary distance measures and centroid computation. Further cluster
    methods include hard competitive learning, neural gas, and QT clustering. There
    are numerous visualization methods for cluster results (neighborhood graphs, convex
    cluster hulls, barcharts of centroids, ...), and bootstrap methods for the analysis
    of cluster stability.
  license_family: GPL2

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
