{% set version = "1.2.1" %}

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

source:
    git_url: git@github.com:PCMSolver/pcmsolver.git      # [linux]
    git_url: https://github.com/PCMSolver/pcmsolver.git  # [osx]
    git_tag: v{{ version }}  # v1.2.1  fa7c826

build:
    number: 0                                            # [linux]
    number: 0                                            # [osx]
    binary_relocation: true
    skip: true                                           # [win]
    run_exports:
        - {{ pin_subpackage('pcmsolver', max_pin='x.x.x') }}
    ignore_run_exports:
        # unused libraries
        - libgfortran-ng

requirements:
    build:
        - cmake >=3.1
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        - {{ compiler('fortran') }}
    host:
        - python {{ python }}
        - zlib {{ zlib }}
    run:
        - {{ pin_compatible('python', max_pin='x.x') }}

test:
    commands:
        - export PLPSP=$PREFIX/lib{{ PYMOD_INSTALL_LIBDIR }}
        # Verify library
        - test -f $PREFIX/lib/libpcm$SHLIB_EXT
        - test -f $PREFIX/bin/go_pcm.py
        - test -f $PLPSP/pcmsolver/pcmparser.py
        # Inspect linkage
        - ldd -r -u $PREFIX/lib/libpcm.so    # [linux]
        - ldd -v $PREFIX/lib/libpcm.so       # [linux]
        - otool -L $PREFIX/lib/libpcm.dylib  # [osx]
        - conda-inspect linkages pcmsolver --show-files

about:
    home: https://github.com/PCMSolver/pcmsolver
    dev_url: https://github.com/PCMSolver/pcmsolver
    doc_url: http://pcmsolver.readthedocs.org/en/latest/
    doc_source_url: https://github.com/PCMSolver/pcmsolver/tree/master/doc
    license: LGPL-3.0
    license_url: https://opensource.org/licenses/LGPL-3.0
    license_file: LICENSE
    license_family: LGPL
    summary: "R. di Remigio & L. Frediani's Polarizable Continuum Model (PCM) API"
    # description: >

# Notes
# -----
# * If `-DENABLE_OPENMP=ON`, add `intel-openmp` back to req/host and req/run
