{% set name = 'freetds' %}
{% set version = "1.2.20" %}
{% set sha256 = "a6ed2ed10dbd21b14826d598a373f41e501a42cd4afe4cbd3fc5363094aa2c20" %}

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

source:
  fn: freetds-{{ version }}.tar.gz
  url: http://www.freetds.org/files/stable/{{ name }}-{{ version }}.tar.bz2
  sha256: {{ sha256 }}

build:
  number: 0
  run_exports:
    # https://abi-laboratory.pro/tracker/timeline/freetds/
    - {{ pin_subpackage('freetds') }}

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - openssl
    - unixodbc  # [unix]
    - krb5      # [unix]
    - readline  # [not win]
    - make   # [not win]
    - cmake  # [win]
    - jom  # [win]
    - libiconv  # [osx]
    - perl  # [win]
  run:
    - krb5     # [unix]
    # Should be taken care of by run_exports
    # - unixodbc  # [unix]
    # - readline  # [not win]

test:
  commands:
    - tsql -C
    - conda inspect linkages freetds  # [linux or osx]
    - conda inspect objects freetds  # [osx]

about:
  home: http://www.freetds.org/
  license: LGPL
  license_file: 
    - COPYING_LIB.txt
  summary: FreeTDS is a free implementation of Sybase's DB-Library, CT-Library, and ODBC libraries
  license_family: LGPL
  doc_url: http://www.freetds.org/docs.html
  dev_url: https://github.com/FreeTDS/freetds

extra:
  recipe-maintainers:
    - mariusvniekerk
