{% set name = "stackvana-split" %}
{% set version = "0.2021.43" %}
{% set eups_product = "lsst_distrib" %}

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

build:
  number: 0

outputs:
  - name: stackvana-core-impl
    version: {{ version }}
    build:
      script:
        - echo "BUILDING IMPL" >> $PREFIX/stackvana-core-impl  # [unix]
        - echo "BUILDING IMPL" >> %PREFIX%/stackvana-core-impl  # [win]
    test:
      commands:
        - echo OK
  - name: stackvana-core
    version: {{ version }}
    build:
      script:
        - echo "BUILDING CORE" >> $PREFIX/stackvana-core  # [unix]
        - echo "BUILDING CORE" >> %PREFIX%/stackvana-core  # [win]
      run_exports:
        - {{ pin_subpackage('stackvana-core-impl', exact=True) }}
    requirements:
      run:
        - {{ pin_subpackage('stackvana-core-impl', exact=True) }}
    test:
      commands:
        - echo OK
  - name: stackvana-{{ eups_product }}
    version: {{ version }}
    build:
      script:
        - echo "BUILDING {{ eups_product }}" >> $PREFIX/stackvana-{{ eups_product }}  # [unix]
        - echo "BUILDING {{ eups_product }}" >> %PREFIX%/stackvana-{{ eups_product }}  # [win]
    requirements:
      host:
        - stackvana-core =={{ version }}
      run:
        - stackvana-core =={{ version }}
    test:
      commands:
        - echo OK
  - name: stackvana
    version: {{ version }}
    build:
      script:
        - echo "BUILDING STACKVANA" >> $PREFIX/stackvana  # [unix]
        - echo "BUILDING STACKVANA" >> %PREFIX%/stackvana  # [win]
    requirements:
        - {{ pin_subpackage("stackvana-" ~ eups_product, max_pin="x.x.x") }}
    test:
      commands:
        - echo OK
