xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728
  1. package("bluez")
  2. set_homepage("http://www.bluez.org")
  3. set_description("Library for the Bluetooth protocol stack for Linux")
  4. set_license("GPL-2.0-or-later")
  5. add_urls("https://git.kernel.org/pub/scm/bluetooth/bluez.git")
  6. add_versions("5.70", "c56970cbea3b5482a586b7570e79a28e7d84d295")
  7. add_versions("5.69", "bbe41152d4c1c3fd608f3d933dba445a790a5331")
  8. add_versions("5.68", "d764f78f27653bc1df71c462e9aca7a18bc75f9f")
  9. on_install("linux", function (package)
  10. os.cp("lib/*.h", "bluetooth/")
  11. io.writefile("xmake.lua", [[
  12. target("bluez")
  13. set_kind("$(kind)")
  14. add_files("lib/*.c")
  15. add_includedirs(".")
  16. add_headerfiles("lib/(*.h)", {prefixdir = "bluetooth"})
  17. ]])
  18. local configs = {}
  19. configs.kind = package:config("shared") and "shared" or "static"
  20. import("package.tools.xmake").install(package, configs)
  21. end)
  22. on_test(function (package)
  23. assert(package:has_cfuncs("str2ba", {includes = "bluetooth/bluetooth.h"}))
  24. end)