; NOTE: To update the list: change the version number to point to the latest
;       release in https://github.com/spdx/license-list-data/releases
;       then call "dune build --profile=regenerate"

(rule
 (targets licenses.json)
 (mode promote)
 (enabled_if (= %{profile} "regenerate"))
 (action (run curl -sLO https://raw.githubusercontent.com/spdx/license-list-data/refs/tags/v3.27.0/json/licenses.json)))

(rule
 (targets exceptions.json)
 (mode promote)
 (enabled_if (= %{profile} "regenerate"))
 (action (run curl -sLO https://raw.githubusercontent.com/spdx/license-list-data/refs/tags/v3.27.0/json/exceptions.json)))

(executable
 (name generate)
 (enabled_if (= %{profile} "regenerate"))
 (libraries ezjsonm))
