# Technically not 2.1.1, but it is not version 2.1, so ....
{% set version = "2.1.1" %}

package:
  name: teensy_loader_cli
  version: {{ version }}

source:
  git_url: https://github.com/PaulStoffregen/teensy_loader_cli.git
  # Build off a recent master since 2019/08/28
  git_rev: eb61aa1a482c2ad98916229e02bb8caae2464f48

build:
  number: 0
  # For now, start with linux builds ony
  skip: True  # [not linux]
  script:
    # http://www.linuxfromscratch.org/blfs/view/6.3/general/libusb.html
    - make OS=LINUX    # [linux]
    - make OS=MACOSX   # [osx]
    - cp teensy_loader_cli  {{ PREFIX }}/bin/teensy_loader_cli  # [unix]
    - make OS=WINDOWS  # [windows]
    - cp teensy_loader_cli.exe  {{ PREFIX }}/bin/teensy_loader_cli  # [win]

requirements:
  build:
    - {{ compiler('c') }}
    - make   # [unix]
    - nmake  # [win]
  host:
    - libusb-compat  # [linux]
  run:
    - libusb-compat  # [linux]

test:
  commands:
    # Command seems to return non-zero even though it lists things successfully
    - teensy_loader_cli --list-mcus | grep Supported    # [unix]
    - teensy_loader_cli.exe --list-mcus  # [win]

about:
  home: https://www.pjrc.com/teensy/loader_cli.html
  license: GPL-3.0
  license_family: GPL
  license_file: gpl3.txt
  summary: 'The Teensy Loader is available in a command line version for advanced users who want to automate programming'

extra:
  recipe-maintainers:
    - hmaarrfk

Add a recipe for teensy_loader_cli
Add a recipe for teensy_loader_cli
