{% set name = "mctc-lib" %}
{% set version = "0.2.3" %}

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

source:
  url: https://github.com/grimme-lab/{{ name }}/archive/refs/tags/v{{ version }}.tar.gz
  sha256: d35168eca59d7bc938799e89f193cfe5f52383769eb02493bec73a1ef59e409b

build:
  number: 0
  skip: true  # [win]
  script:
    - set -ex
    - meson setup _build ${MESON_ARGS:---prefix=${PREFIX} --libdir=lib} --buildtype=release
    - meson compile -C _build
    - meson test -C _build --no-rebuild --print-errorlogs  # [build_platform != target_platform]
    - meson install -C _build --no-rebuild
    - rm $PREFIX/bin/mctc-convert

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('fortran') }}
    - meson
    - ninja
    - llvm-openmp  # [osx]
    - libgomp  # [linux]

test:
  requires:
    - pkg-config
  commands:
    - pkg-config {{ name }} --exact-version {{ version }}
    - test -f $PREFIX/lib/lib{{ name }}$SHLIB_EXT

about:
  home: https://github.com/grimme-lab/mctc-lib
  license: Apache-2.0
  license_file:
    - LICENSE
  summary: >-
    Modular computation tool chain library
  description: >-
    Common tool chain to molecular structure data in various applications.
    This library provides a unified way to perform operations on molecular
    structure data, like reading and writing to common geometry file formats.
  doc_url: https://grimme-lab.github.io/mctc-lib

extra:
  recipe-maintainers:
    - awvwgk

Add recipe for package mctc-lib
Add recipe for package mctc-lib
