xmake.lua 1.0 KB

123456789101112131415161718192021222324
  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.xz")
  6. add_versions("3.10.4", "9365b74fd8471caecdb3cc5adf25a821f70a931317ee9103d15bd39089e3590d")
  7. if is_plat("linux") then
  8. add_extsources("apt::fuse3", "pacman::fuse3")
  9. add_syslinks("pthread", "dl", "rt")
  10. end
  11. add_deps("meson")
  12. on_install("linux", function (package)
  13. local configs = {"-Dtests=false", "-Dexamples=false", "-Dutils=false"}
  14. table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
  15. import("package.tools.meson").install(package, configs)
  16. end)
  17. on_test(function (package)
  18. assert(package:has_cfuncs("fuse_version", {configs = {defines = {"FUSE_USE_VERSION=30"}}, includes = "fuse3/fuse.h"}))
  19. end)