{% set name = "spiceql" %}
{% set version = "1.0.0rc1" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  - folder: .
    url: https://code.usgs.gov/astrogeology/spiceql/-/archive/{{ version }}/spiceql-{{ version }}.tar.gz
    sha256: f2aa3c290b6f0fe4a5de001844b1ef075eb2f4c8d571bab87b439e492e216b27

  # submodules
  - folder: submodules/gularkfilesystem
    url: https://github.com/gulrak/filesystem/archive/fcea331ebb8273581cef3e91a131e3d7877f7dfd.zip
    sha256: c2775dccc5d8f6d8654bd4b1ef2302b26b8cb75f140640dc2328a58d643f3818
  - folder: submodules/googletest
    url: https://github.com/google/googletest/archive/e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b.zip
    sha256: d87a66523023173ea842e5ec6eb969a54d20be2b56cd939dd6d808fda57626fa
  - folder: submodules/json
    url: https://github.com/nlohmann/json/archive/fac07e22c5d7dd0423ccf31c02db5603d27e6556.zip
    sha256: 191543fd27175d57bd6d2f56cb4f63e424cb56379acb6f367bad3ce34a2bb9c3
  - folder: submodules/hippomocks
    url: https://github.com/dascandy/hippomocks/archive/10960d027b398444ec3ec6ce2487de3db0283ff8.zip
    sha256: a4efc07eacdc35107039bd3b7b491b9fc5f95d4dabb37de83a2b0642c7231fe8
  - folder: submodules/redis-plus-plus
    url: https://github.com/sewenew/redis-plus-plus/archive/48e178c09a2fbd10d3b991e54b8a71b70791b933.zip
    sha256: 352d6d98e738429a35d0b5f4ef89b42ff4f97167dce97a0067aefa97fb73e243

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

requirements:
  build:
    - {{ compiler('cxx') }}  # [linux]
    - libgcc-ng  # [linux]
    - libstdcxx-ng  # [linux]
    - cmake >=3.14
    - pip
    - make
    - swig
    - fmt ==9.1.0
    - cpp-filesystem
    - cspice
    - cereal
    - spdlog
    - libhiredis
  host:
    - libgcc-ng  # [linux]
    - libstdcxx-ng  # [linux]
    - fmt ==9.1.0  # [osx]
    - libcxx  # [osx]
    - python
    - pip
    - cspice
    - cereal
    - spdlog
    - libhiredis
  run:
    - libgcc-ng  # [linux]
    - libstdcxx-ng  # [linux]
    - fmt ==9.1.0  # [osx]
    - libcxx  # [osx]
    - python
    - cspice
    - cereal
    - spdlog
    - libhiredis

test:
  imports:
    - pyspiceql
  commands:
    - test -e $PREFIX/lib/libSpiceQL${SHLIB_EXT}  # [unix]
    - test -e $PREFIX/include/SpiceQL/config.h  # [unix]
    - if not exist %LIBRARY_BIN%\SpiceQL.dll exit 1  # [win]
    - if not exist %LIBRARY_LIB%\SpiceQL.lib exit 1  # [win]

about:
  home: https://code.usgs.gov/astrogeology/spiceql
  summary: "This Library provides a C++ interface querying, reading and writing Naif SPICE kernels."
  license: CC0-1.0
  license: LICENSE.txt
  doc_url: https://sugar-spice.readthedocs.io/en/latest/#docs
  dev_url: https://code.usgs.gov/astrogeology/spiceql

extra:
  recipe-maintainers:
    - Kelvinrr
    - chkim-usgs
