(rule
 (target liquidsoap.config)
 (package liquidsoap)
 (alias install)
 (enabled_if %{env:LIQUIDSOAP_ENABLE_BUILD_CONFIG=true})
 (mode
  (promote
   (only liquidsoap.config)
   (until-clean)))
 (action
  (progn
   (echo
    "\nCongratulation on building liquidsoap! Here are the details of your build and configuration:\n")
   (run %{bin:liquidsoap} --build-config)
   (with-stdout-to
    %{target}
    (run %{bin:liquidsoap} --opam-config)))))

(alias
 (name default)
 (deps
  (alias_rec install)))

(alias
 (name runtest)
 (deps
  (alias_rec install)))

(alias
 (name citest)
 (deps
  (alias_rec perftest)
  (alias_rec runtest)))
