improved sha256 checksum system and config cmd

This commit is contained in:
2025-11-03 17:59:00 -03:00
parent 885ce25fe9
commit fe0da8ad63
14 changed files with 510 additions and 51 deletions

65
test/go/Packet.lua Normal file
View File

@@ -0,0 +1,65 @@
return {
package = {
name = "go",
version = "1.25.3",
maintainer = "robogg133",
description = "A cat(1) clone with syntax highlighting and Git integration.",
serial = 0,
plataforms = {
windows = {
arch = { "amd64" },
sources = {
{
url = "https://github.com/sharkdp/bat/releases/download/v0.26.0/bat-v0.26.0-" ..
CURRENT_ARCH_NORMALIZED .. "-pc-windows-msvc.zip",
method = "GET",
sha256 = "a8a6862f14698b45e101b0932c69bc47a007f4c0456f3a129fdcef54d443d501"
}
},
dependencies = {
build = {},
runtime = {},
conflicts = {}
}
},
linux = {
arch = { "amd64" },
sources = {
{
url = "https://github.com/sharkdp/bat/releases/download/v0.26.0/bat-v0.26.0-" ..
CURRENT_ARCH_NORMALIZED .. "-unknown-linux-gnu.tar.gz",
method = "GET",
sha256 = "7efed0c768fae36f18ddbbb4a38f5c4b64db7c55a170dfc89fd380805809a44b"
}
},
dependencies = {
build = {},
runtime = {},
conflicts = {}
}
}
},
sources = {}
},
build = function()
end,
install = function()
os.chdir(pathjoin(SOURCESDIR, "bat-v0.26.0-" .. CURRENT_ARCH_NORMALIZED .. "-unknown-linux-gnu"))
os.chmod("bat", 755)
local suc, errmsg = os.copy("bat", pathjoin(PACKETDIR, BIN_DIR, "bat"))
if not suc then
error("failed to copy bat: " .. errmsg)
end
os.copy("bat.1", pathjoin(PACKETDIR, "/usr/share/man/man1/bat.1"))
setflags("man", "manual", "/usr/share/man/man1/bat.1")
end,
}