{% set name = "ogg" %}
{% set version = "1.3.4" %}
{% set sha256 = "fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e" %}

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

source:
  fn:  lib{{ name }}-{{ version }}.tar.gz
  url: http://downloads.xiph.org/releases/{{ name }}/lib{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0

requirements:
  build:
    - cmake  # [win]
    - {{ compiler('c') }}
    - make  # [unix]
  host:
    - pkgconfig  # [unix]
  run:

test:
  requires:
    - python {{ environ['PY_VER'] + '*' }}  # [win]
  commands:
    - test -f $PREFIX/lib/libogg.a  # [unix]
    - test -f $PREFIX/lib/libogg.dylib  # [osx]
    - test -f $PREFIX/lib/libogg.so  # [linux]
    - test -f $PREFIX/include/ogg/ogg.h  # [unix]
    - test -f $PREFIX/include/ogg/config_types.h  # [unix]
    - test -f $PREFIX/include/ogg/os_types.h  # [unix]
    - if not exist %LIBRARY_LIB%\\ogg.lib exit 1  # [win]
    - if not exist %LIBRARY_BIN%\\ogg.dll exit 1  # [win]
    - if not exist %LIBRARY_INC%\\ogg\\config_types.h exit 1  # [win]
    - if not exist %LIBRARY_INC%\\ogg\\ogg.h exit 1  # [win]
    - if not exist %LIBRARY_INC%\\ogg\\os_types.h exit 1  # [win]

about:
  home: https://www.xiph.org/
  license: BSD3
  license_file: COPYING
  summary: "OGG media container"
  description: |
    OGG media container. This is the native format and the recommended container
    for Xiph codecs.
  doc_url: https://wiki.xiph.org/

extra:
  recipe-maintainers:
    - dschreij
