xmake.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package("rsync")
  2. set_kind("binary")
  3. set_homepage("https://rsync.samba.org/")
  4. set_description("rsync is an open source utility that provides fast incremental file transfer.")
  5. set_license("GPL-3.0")
  6. add_urls("https://download.samba.org/pub/rsync/src/rsync-$(version).tar.gz")
  7. add_versions("3.2.3", "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e")
  8. add_deps("openssl", "xxhash", "lz4", "acl", "zstd", {host = true})
  9. on_install("linux", function (package)
  10. local cxflags = {}
  11. local ldflags = {}
  12. for _, dep in ipairs(package:orderdeps()) do
  13. local fetchinfo = dep:fetch()
  14. if fetchinfo then
  15. for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do
  16. table.insert(cxflags, "-I" .. includedir)
  17. end
  18. for _, linkdir in ipairs(fetchinfo.linkdirs) do
  19. table.insert(ldflags, "-L" .. linkdir)
  20. end
  21. for _, link in ipairs(fetchinfo.links) do
  22. table.insert(ldflags, "-l" .. link)
  23. end
  24. end
  25. end
  26. import("package.tools.autoconf").install(package, configs, {cxflags = cxflags, ldflags = ldflags})
  27. end)
  28. on_test(function (package)
  29. os.vrun("rsync --version")
  30. end)