xmake.lua 1.3 KB

12345678910111213141516171819202122232425262728
  1. package("libfuse")
  2. set_homepage("https://github.com/libfuse/libfuse")
  3. set_description("FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the Linux kernel.")
  4. set_license("GPL-2.0")
  5. add_urls("https://github.com/libfuse/libfuse/releases/download/fuse-$(version)/fuse-$(version).tar.gz",
  6. "https://github.com/libfuse/libfuse.git")
  7. add_urls("https://github.com/libfuse/libfuse/releases/download/fuse-$(version)/fuse-$(version).tar.xz")
  8. add_versions("3.17.1", "2d8ae87a4525fbfa1db5e5eb010ff6f38140627a7004554ed88411c1843d51b2")
  9. add_versions("3.10.4", "9365b74fd8471caecdb3cc5adf25a821f70a931317ee9103d15bd39089e3590d")
  10. add_extsources("apt::libfuse3-dev", "pacman::fuse3")
  11. add_syslinks("pthread", "dl", "rt")
  12. add_deps("meson", "ninja")
  13. on_install("linux", function (package)
  14. local configs = {"-Dtests=false", "-Dexamples=false", "-Dutils=false"}
  15. table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
  16. import("package.tools.meson").install(package, configs)
  17. end)
  18. on_test(function (package)
  19. assert(package:has_cfuncs("fuse_version", {configs = {defines = {"FUSE_USE_VERSION=30"}}, includes = "fuse3/fuse.h"}))
  20. end)