{% set version = "1.0.2" %}

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

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

source:
  fn: satellite_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/satellite_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/satellite/satellite_{{ version }}.tar.gz
  sha256: 6447476bd31216e5abe504221e465677954d07419b4174ab4f4e4f7a197969c5

build:
  merge_build_host: true  # [win]
  number: 0
  script: R CMD INSTALL --build .
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-rcpp
    - r-plyr
    - r-raster
  run:
    - r-base
    - r-rcpp
    - r-plyr
    - r-raster

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

about:
  home: https://CRAN.R-project.org/package=satellite
  license: GPL (>= 3)
  license_file: LICENSE
  summary: Herein, we provide a broad variety of functions which are useful for handling, manipulating, and visualizing satellite-based remote sensing  data. These operations range from mere data import and layer handling (eg  subsetting), over Raster* typical data wrangling (eg crop, extend), to more  sophisticated (pre-)processing
    tasks typically applied to satellite imagery  (eg atmospheric and topographic correction). This functionality is  complemented by a full access to the satellite layers' metadata at any  stage and the documentation of performed actions in a separate log file.  Currently available sensors include Landsat 4-5 (TM), 7 (ETM+),
    and 8  (OLI/TIRS Combined), and additional compatibility is ensured for the Landsat  Global Land Survey data set. Moreover, support for Terra and Aqua-MODIS as  well as PROBA-V is expected to arrive shortly.

extra:
  recipe-maintainers:
    - ocefpaf
