aboutsummaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
authorforever2k38 <forever2k38@forever2k38.net>2026-09-28 19:13:12 +0200
committerforever2k38 <forever2k38@forever2k38.net>2026-09-28 19:13:12 +0200
commitf7fda4ec9a87f59d97d0b5952f4899942d57dd7c (patch)
tree99f454ae312253f619ca0fd83c478a46c35bf7cb /sys-apps
parent3512b3282bb3a8423ed613591d0300c4f529aa75 (diff)
package busybox
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/busybox/build.lua67
1 files changed, 67 insertions, 0 deletions
diff --git a/sys-apps/busybox/build.lua b/sys-apps/busybox/build.lua
new file mode 100644
index 0000000..62c63e8
--- /dev/null
+++ b/sys-apps/busybox/build.lua
@@ -0,0 +1,67 @@
+local package = {}
+
+local lfs = require("lfs")
+
+package.name = "busybox"
+package.version = "1.38.0"
+package.description = "tiny single binary coreutils"
+package.arch = { "x86_64" }
+package.license = { "GPLv2" }
+
+package.deps = {
+ build = {
+ { provides = "cc" },
+ { provides = "make" },
+ },
+}
+
+package.sources = {
+ {
+ path = "https://busybox.net/downloads/busybox-1.38.0.tar.bz2",
+ hash = "71d1f0992bc99813e4e32d718004fadbd8315b300508094e37713555a2e394ca77f16874ec8be55961c0aa4141365dba27728e203895aadb2c112a84764a28d9",
+ out = "source.tar.gz",
+ },
+}
+
+local function fix_config(path)
+ path = path or ".config"
+
+ local f = io.open(path, "r")
+
+ if not f then
+ return nil, "cannot open"
+ end
+
+ local s = f:read("*all")
+
+ f:close()
+
+ s = s:gsub("CONFIG_TC=y", "CONFIG_TC=n")
+
+ f = io.open(path, "w")
+
+ f:write(s)
+
+ f:close()
+
+ return true
+end -- tiny hack, disables TC to fix builds on kernel 6.8+
+
+package.build = function()
+ pow.extract("source.tar.gz", "source")
+
+ lfs.chdir("source/busybox-1.38.0")
+
+ os.execute("make defconfig")
+ fix_config()
+
+ local make_command = string.format("make %s", pow.config.makeopts)
+
+ os.execute(make_command)
+end
+
+package.install = function()
+ pow.install("busybox", "/bin/busybox")
+end
+
+return package