New Packet.lua format, test parsing and entire new lua ecossystem
This commit is contained in:
		@@ -1,59 +0,0 @@
 | 
			
		||||
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
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										61
									
								
								test/bat/Packet.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								test/bat/Packet.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,61 @@
 | 
			
		||||
local arch_map = {
 | 
			
		||||
    amd64 = "x86_64",
 | 
			
		||||
    aarch64 = "aarch64",
 | 
			
		||||
    arm64 = "aarch64",
 | 
			
		||||
    ['386'] = "i686" 
 | 
			
		||||
}
 | 
			
		||||
local srcarch = arch_map[CURRENT_ARCH]
 | 
			
		||||
 | 
			
		||||
return {
 | 
			
		||||
    package = {
 | 
			
		||||
        name = "bat-bin", -- required
 | 
			
		||||
        version = "0.26.0", -- required
 | 
			
		||||
        maintainer = "robogg133", -- required
 | 
			
		||||
        description = "A cat(1) clone with syntax highlighting and Git integration.", -- required
 | 
			
		||||
        serial = 0,-- required
 | 
			
		||||
 | 
			
		||||
        plataforms = {
 | 
			
		||||
            windows = {
 | 
			
		||||
                arch = {"amd64"},
 | 
			
		||||
                sources = {
 | 
			
		||||
                    {
 | 
			
		||||
                        url = "https://github.com/sharkdp/bat/releases/download/v0.26.0/bat-v0.26.0-" ..srcarch .."-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-".. srcarch .."-unknown-linux-gnu.tar.gz",
 | 
			
		||||
                        method = "GET",
 | 
			
		||||
                        sha256 = "7efed0c768fae36f18ddbbb4a38f5c4b64db7c55a170dfc89fd380805809a44b"
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                dependencies = {
 | 
			
		||||
                    build = {},
 | 
			
		||||
                    runtime = {},
 | 
			
		||||
                    conflicts = {}
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        sources = {}
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
        
 | 
			
		||||
    build = function() 
 | 
			
		||||
    end,
 | 
			
		||||
    
 | 
			
		||||
    pkg = function() -- required 
 | 
			
		||||
    print("oi amores")
 | 
			
		||||
    end,
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										42
									
								
								test/utctimerightnow/Packet.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								test/utctimerightnow/Packet.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
local arch_map = {
 | 
			
		||||
    amd64 = "x86_64",
 | 
			
		||||
    aarch64 = "aarch64",
 | 
			
		||||
    arm64 = "aarch64",
 | 
			
		||||
    ['386'] = "i686" 
 | 
			
		||||
}
 | 
			
		||||
local srcarch = arch_map[CURRENT_ARCH]
 | 
			
		||||
 | 
			
		||||
return {
 | 
			
		||||
    package = {
 | 
			
		||||
        name = "utctimerightnow", -- required
 | 
			
		||||
        version = "0.1.0", -- required
 | 
			
		||||
        maintainer = "robogg133", -- required
 | 
			
		||||
        description = "shows utc time", -- required
 | 
			
		||||
        serial = 0,-- required
 | 
			
		||||
 | 
			
		||||
        dependencies = {
 | 
			
		||||
            build = {"go"},
 | 
			
		||||
            runtime = {},
 | 
			
		||||
            conflicts = {}
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        sources = { --optional 
 | 
			
		||||
            { 
 | 
			
		||||
                url = "https://git.opentty.xyz/robogg133/utctimerightnow.git", -- required
 | 
			
		||||
                method = "git", -- required
 | 
			
		||||
                branch = "main" -- required 
 | 
			
		||||
            --  tag = ""
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
        
 | 
			
		||||
    build = function()
 | 
			
		||||
 | 
			
		||||
    end,
 | 
			
		||||
    
 | 
			
		||||
    pkg  = function() -- required 
 | 
			
		||||
    print("goku")
 | 
			
		||||
    end,
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user