xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package("xmlto")
  2. set_kind("binary")
  3. set_homepage("https://pagure.io/xmlto")
  4. set_description("Convert XML to another format (based on XSL or other tools)")
  5. set_license("GPL-2.0")
  6. add_urls("https://releases.pagure.org/xmlto/xmlto-$(version).tar.bz2",
  7. "https://pagure.io/xmlto.git")
  8. add_versions("0.0.28", "1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276")
  9. add_deps("util-linux")
  10. on_install("macosx", "linux", function (package)
  11. import("package.tools.autoconf")
  12. local envs = autoconf.buildenvs(package)
  13. local getopt = package:dep("util-linux"):fetch()
  14. for _, dir in ipairs(getopt.linkdirs) do
  15. local prefix = path.directory(dir)
  16. local opt_path = path.join(prefix, "bin", "getopt")
  17. if os.isfile(opt_path) then
  18. envs.GETOPT = opt_path
  19. end
  20. end
  21. local config = {"--disable-dependency-tracking"}
  22. autoconf.install(package, config, {envs = envs})
  23. end)
  24. on_test(function (package)
  25. os.vrun("xmlto --version")
  26. end)