distributable:
  url: https://s3.amazonaws.com/json-c_releases/releases/json-c-{{ version.raw }}.tar.gz
  strip-components: 1

versions:
  github: json-c/json-c/tags
  strip:
    - /^json-c-/
    - /-\d{8}/ # calver

build:
  dependencies:
    cmake.org: 3
  working-directory: build
  script: |
    cmake .. -DCMAKE_INSTALL_PREFIX="{{prefix}}" -DCMAKE_BUILD_TYPE=Release
    make --jobs {{ hw.concurrency }} install

test:
  script: |
    cc fixture.c -ljson-c
    ./a.out
