distributable:
  url: https://github.com/ImageOptim/libimagequant/archive/{{version}}.tar.gz
  strip-components: 1

versions:
  github: ImageOptim/libimagequant/tags

display-name: libimagequant

build:
  dependencies:
    github.com/lu-zero/cargo-c: '*'
    rust-lang.org/cargo: '*'

  working-directory: imagequant-sys
  script: cargo cinstall --prefix {{prefix}}

test:
  script:
    - cc test.c -limagequant -o test
    - ./test
