aboutsummaryrefslogtreecommitdiff
path: root/.config/pkgit/repos/busybox.lua
blob: 2e4f8c3e71d6760025e10fb34929d47342c1637f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
return {
	url = "https://git.busybox.net/busybox/",
	targets = {
		default = {
			build = function()
				e,h,c = os.execute("make defconfig")
				if c ~= 0 then
					return c
				end
				e,h,c = os.execute("sed -i 's/CONFIG_TC=y/CONFIG_TC=n/' .config")
				if c ~= 0 then
					print("Configuration Failure: ", c, type(c))
					print("GIVEN UP")
					return c
				end
				e,h,c = os.execute("sed -i 's/# CONFIG_TC is not set/CONFIG_TC=n/' .config")
				if c ~= 0 then
					print("Configuration Failure: ", c, type(c))
					print("GIVEN UP")
					return c
				end
				e,h,c = os.execute("make")
				if c ~= 0 then
					print("Compilation Error: ", c, type(c))
					print("GIVEN UP")
					return c
				end
				return 0
			end,
			install = function()
				return os.execute("make CONFIG_PREFIX="..prefix.." install")
			end,
			uninstall = function()
				return os.execute("make CONFIG_PREFIX="..prefix.." uninstall")
			end,
		}
	}
}