xmake.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. package("git-crypt")
  2. set_kind("binary")
  3. set_homepage("https://www.agwa.name/projects/git-crypt/")
  4. set_description("Transparent file encryption in git")
  5. set_license("GPL-3.0")
  6. add_urls("https://github.com/AGWA/git-crypt/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/AGWA/git-crypt.git")
  8. add_versions("0.8.0", "786199c24f8b79a54d62b98c24b1113606c4ebd83125e642b228704686305e69")
  9. add_versions("0.7.0", "2210a89588169ae9a54988c7fdd9717333f0c6053ff704d335631a387bd3bcff")
  10. if is_plat("linux", "macosx", "mingw@macosx") then
  11. add_deps("openssl", {host = true})
  12. end
  13. on_install("linux", "macosx", "mingw@macosx", function (package)
  14. io.writefile("xmake.lua", [[
  15. add_rules("mode.debug", "mode.release")
  16. add_requires("openssl")
  17. target("git-crypt")
  18. set_kind("binary")
  19. add_packages("openssl")
  20. add_files("*.cpp|*-unix.cpp|*-win32.cpp")
  21. add_headerfiles("*.hpp|*-unix.hpp|*-win32.hpp")
  22. ]])
  23. import("package.tools.xmake").install(package)
  24. end)
  25. on_test(function (package)
  26. os.vrun("git-crypt --version")
  27. end)