From 6c5abdf4d4f058d6022285d4e5bf6f90751ffc94 Mon Sep 17 00:00:00 2001 From: robogg133 Date: Fri, 31 Oct 2025 13:32:03 -0300 Subject: [PATCH] new Packet.lua format, testing it with bat --- Packet.lua | 36 ------------------------------ test/Packet.lua | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 36 deletions(-) delete mode 100644 Packet.lua create mode 100644 test/Packet.lua diff --git a/Packet.lua b/Packet.lua deleted file mode 100644 index d143814..0000000 --- a/Packet.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - package = { - name = "packets", - id = "packets@1.0.0", - version = "1.0.0", - author = "robogg133", - description = "fast, opensource, easy to use package manager.", - type = "remote", - serial = 0, - - build_dependencies = {["go"] = ">=1.25.1"}, - - git_url = "https://github.com/roboogg133/packets.git", - git_branch = "main" - - }, - - - prepare = function(container) - git.clone("https://github.com/roboogg133/packets.git", container.dir("/data")) - os.remove(container.dir("/data/.git")) - - end, - - build = function() - os.execute("go build ./data/cmd/packets") - end, - - install = function(container) - os.copy(container.dir("./packets"), BIN_DIR) - end, - - remove = function () - os.remove(path_join(BIN_DIR, "packets")) - end -} \ No newline at end of file diff --git a/test/Packet.lua b/test/Packet.lua new file mode 100644 index 0000000..a71eb18 --- /dev/null +++ b/test/Packet.lua @@ -0,0 +1,59 @@ +return { + package = { + name = "bat-bin", + version = "0.26.0", + mantainer = "robogg133", + description = "fast, opensource, easy to use package manager.", + serial = 0, + + plataforms = { + windows = { + arch = {"x86_64"}, + sources = { + ["https://github.com/sharkdp/bat/releases/download/v0.26.0/bat-v0.26.0-aarch64-unknown-linux-gnu.tar.gz"] = {method = "GET"} + }, + dependencies = { + build = {}, + runtime = {}, + conflicts = {} + } + }, + linux = { + arch = {"x86_64"}, + sources = { + ["https://github.com/sharkdp/bat/releases/download/v0.26.0/bat-v0.26.0-aarch64-unknown-linux-gnu.tar.gz"] = {method = "GET"} + }, + dependencies = { + build = {}, + runtime = {}, + conflicts = {} + } + }, + all = { + sources = {} + } + }, + + + + }, + + + prepare = function(container) + git.clone("https://github.com/roboogg133/packets.git", container.dir("/data")) + os.remove(container.dir("/data/.git")) + + end, + + build = function() + os.execute("go build ./data/cmd/packets") + end, + + install = function(container) + os.copy(container.dir("./packets"), BIN_DIR) + end, + + remove = function () + os.remove(path_join(BIN_DIR, "packets")) + end +} \ No newline at end of file