|
@@ -1,29 +1,42 @@
|
|
package("eudev")
|
|
package("eudev")
|
|
-
|
|
|
|
- set_homepage("https://dev.gentoo.org/~blueness/eudev/")
|
|
|
|
|
|
+ set_homepage("https://github.com/eudev-project/eudev")
|
|
set_description("A fork of systemd with the aim of isolating udev from any particular flavor of system initialization.")
|
|
set_description("A fork of systemd with the aim of isolating udev from any particular flavor of system initialization.")
|
|
|
|
+ set_license("GPL-2.0")
|
|
|
|
+
|
|
|
|
+ add_urls("https://github.com/eudev-project/eudev/archive/refs/tags/$(version).tar.gz",
|
|
|
|
+ "https://github.com/eudev-project/eudev.git")
|
|
|
|
|
|
- add_urls("https://dev.gentoo.org/~blueness/eudev/eudev-$(version).tar.gz")
|
|
|
|
- add_versions("3.2.9", "89618619084a19e1451d373c43f141b469c9fd09767973d73dd268b92074d4fc")
|
|
|
|
|
|
+ add_versions("v3.2.14", "c340e6c51dfc5531ac0c0fa84a34b72162acf525f9023eb9cf4931b782c8f177")
|
|
|
|
+ add_versions("v3.2.9", "7d281276b480da3935d1acb239748c2c9db01a8043aad7e918ce57a223d8cd24")
|
|
|
|
|
|
- if is_plat("linux") then
|
|
|
|
- add_deps("autoconf", "automake", "libtool", "pkg-config", "gperf")
|
|
|
|
- end
|
|
|
|
|
|
+ add_configs("kmod", {description = "Enable loadable modules support", default = false, type = "boolean"})
|
|
|
|
+ add_configs("selinux", {description = "Enable optional SELINUX support", default = false, type = "boolean", readonly = true})
|
|
|
|
+ add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
|
|
|
|
|
|
- on_install("linux", function (package)
|
|
|
|
- local configs = {}
|
|
|
|
- if package:config("shared") then
|
|
|
|
- table.insert(configs, "--enable-shared=yes")
|
|
|
|
- else
|
|
|
|
- table.insert(configs, "--enable-shared=no")
|
|
|
|
|
|
+ add_deps("autotools", "pkg-config", "gperf")
|
|
|
|
+
|
|
|
|
+ on_load(function (package)
|
|
|
|
+ if package:config("kmod") then
|
|
|
|
+ package:add("deps", "libkmod")
|
|
end
|
|
end
|
|
- if package:config("pic") ~= false then
|
|
|
|
- table.insert(configs, "--with-pic")
|
|
|
|
|
|
+ end)
|
|
|
|
+
|
|
|
|
+ on_install("linux", "cross", function (package)
|
|
|
|
+ io.replace("autogen.sh", "./make.sh", "", {plain = true}) --remove doc build
|
|
|
|
+ if package:config("kmod") then
|
|
|
|
+ io.replace("configure.ac", "libkmod >= 15", "libkmod >= v15", {plain = true})
|
|
|
|
+ io.replace("src/udev/udev-builtin-kmod.c", "#include <libkmod.h>", "#include <libkmod/libkmod.h>", {plain = true})
|
|
end
|
|
end
|
|
|
|
+
|
|
|
|
+ local configs = {"--disable-manpages"}
|
|
|
|
+ table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
|
|
|
|
+ table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
|
|
|
|
+ table.insert(configs, "--enable-kmod=" .. (package:config("kmod") and "yes" or "no"))
|
|
|
|
+ table.insert(configs, "--enable-selinux=" .. (package:config("selinux") and "yes" or "no"))
|
|
|
|
+ table.insert(configs, "--enable-programs=" .. (package:config("tools") and "yes" or "no"))
|
|
import("package.tools.autoconf").install(package, configs)
|
|
import("package.tools.autoconf").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|
|
-
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|
|
assert(package:has_cfuncs("udev_new", {includes = "libudev.h"}))
|
|
assert(package:has_cfuncs("udev_new", {includes = "libudev.h"}))
|
|
end)
|
|
end)
|