{% set version = "1.1-9" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/dbscan_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/dbscan/dbscan_{{ version }}.tar.gz
  sha256: b4303c268b1817ea992db7201cbcb8a707b142cb843f16d05d727fac941fdd33

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp >=1.0.0
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=1.0.0

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

about:
  home: https://github.com/mhahsler/dbscan
  license: GPL-2.0-or-later
  summary: A fast reimplementation of several density-based algorithms of the DBSCAN family for spatial data. Includes the DBSCAN (density-based spatial clustering of applications with noise) and OPTICS (ordering points to identify the clustering structure) clustering algorithms HDBSCAN (hierarchical DBSCAN) and the LOF
    (local outlier factor) algorithm. The implementations use the kd-tree data structure (from library ANN) for faster k-nearest neighbor search. An R interface to fast kNN and fixed-radius NN search is also provided.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: dbscan
# Version: 1.1-4
# Date: 2019-08-05
# Title: Density Based Clustering of Applications with Noise (DBSCAN) and Related Algorithms
# Authors@R: c(person("Michael", "Hahsler", role = c("aut", "cre", "cph"), email = "mhahsler@lyle.smu.edu"), person("Matthew", "Piekenbrock", role = c("aut", "cph")), person("Sunil", "Arya", role = c("ctb", "cph")), person("David", "Mount", role = c("ctb", "cph")))
# Description: A fast reimplementation of several density-based algorithms of the DBSCAN family for spatial data. Includes the DBSCAN (density-based spatial clustering of applications with noise) and OPTICS (ordering points to identify the clustering structure) clustering algorithms HDBSCAN (hierarchical DBSCAN) and the LOF (local outlier factor) algorithm. The implementations use the kd-tree data structure (from library ANN) for faster k-nearest neighbor search. An R interface to fast kNN and fixed-radius NN search is also provided.
# Imports: Rcpp (>= 0.12.12), graphics, stats, methods
# LinkingTo: Rcpp
# Suggests: fpc, microbenchmark, testthat, dendextend, igraph, knitr, DMwR
# VignetteBuilder: knitr
# URL: https://github.com/mhahsler/dbscan
# BugReports: https://github.com/mhahsler/dbscan/issues
# License: GPL (>= 2)
# Copyright: ANN library is copyright by University of Maryland, Sunil Arya and David Mount. All other code is copyright by Michael Hahsler and Matthew Piekenbrock.
# SystemRequirements: C++11
# NeedsCompilation: yes
# Packaged: 2019-08-05 16:28:50 UTC; hahsler
# Author: Michael Hahsler [aut, cre, cph], Matthew Piekenbrock [aut, cph], Sunil Arya [ctb, cph], David Mount [ctb, cph]
# Maintainer: Michael Hahsler <mhahsler@lyle.smu.edu>
# Repository: CRAN
# Date/Publication: 2019-08-05 17:50:02 UTC
