package("dr_flac")
    set_kind("library", {headeronly = true})
    set_homepage("https://github.com/mackron/dr_libs")
    set_description("Single file audio decoding libraries for C/C++.")
    set_license("MIT")

    set_urls("https://github.com/mackron/dr_libs.git", {submodules = false})
    add_versions("0.13.1", "ab53fba4fcebe79643da3a40d2e7507839122e84")
    add_versions("0.12.43", "a1dd66cb680522a753bac7dff306b4a1cfd75e26")
    add_versions("0.12.42", "39ce69188eab79a913aa23423eef9da5f3dcd142")
    add_versions("0.12.41", "056b6f5e1f7cc5046aac33e6331551b6b2813292")
    add_versions("0.12.39", "7d3638f215599e4b576fe5d4be4f6820b9988e48")
    add_versions("0.12.29", "343aa923439e59e7a9f7726f70edc77a4500bdec")

    on_install(function (package)
        os.cp("dr_flac.h", package:installdir("include"))
    end)

    on_test(function (package)
        assert(package:has_cfuncs("drflac_open", {includes = "dr_flac.h"}))
    end)
