xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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.4.1", "2924bcb3a1ed8b551fc101f740b9f0fe0a202b115027647cf69850d65fd88c52")
  8. add_versions("3.2.3", "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e")
  9. add_deps("openssl", "xxhash", "lz4", "acl", "zstd", {host = true})
  10. on_install("linux", function (package)
  11. local cxflags = {}
  12. local ldflags = {}
  13. for _, dep in ipairs(package:orderdeps()) do
  14. local fetchinfo = dep:fetch()
  15. if fetchinfo then
  16. for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do
  17. table.insert(cxflags, "-I" .. includedir)
  18. end
  19. for _, linkdir in ipairs(fetchinfo.linkdirs) do
  20. table.insert(ldflags, "-L" .. linkdir)
  21. end
  22. for _, link in ipairs(fetchinfo.links) do
  23. table.insert(ldflags, "-l" .. link)
  24. end
  25. end
  26. end
  27. import("package.tools.autoconf").install(package, configs, {cxflags = cxflags, ldflags = ldflags})
  28. end)
  29. on_test(function (package)
  30. os.vrun("rsync --version")
  31. end)