local pkgit = require("pkgit") local cfg = {} local prefix = os.getenv("HOME") .. "/.local" cfg.dirs = { prefix = prefix, src = prefix .. "/share/pkgit", bin = prefix .. "/bin", lib = prefix .. "/lib", include = prefix .. "/include", } cfg.pkgs = { ["gmp"] = {}, ["mpfr"] = {}, ["mpc"] = {}, ["gcc"] = { url = "https://ftp.gnu.org/gnu/gcc/gcc-16.1.0/gcc-16.1.0.tar.xz", version = "16.1.0", fetcher = cfg.fetchers.tarball, dependencies = { "gmp", "mpfr", "mpc" } }, ["luajit"] = { url = "https://luajit.org/git/luajit.git", version = "v2.1", fetcher = cfg.fetchers.git, dependencies = { "gcc" }, }, ["pkgit"] = { url = "https://git.symlinx.net/pkgit", version = "HEAD", fetcher = cfg.fetchers.git, dependencies = { "luajit", }, opts = {}, recipe = cfg.recipes.make, } } cfg.fetchers = { git = { get_source = function(url, version, target_dir) return 0 end, get_version = function(url, target_dir) return "HEAD" end, }, tarball = { get_source = function(url, version, target_dir) return 0 end, get_version = function(url, target_dir) return "" end, } } cfg.fetchers.default = cfg.fetchers.git cfg.recipes = {} cfg.recipes.make = { build = function(bldit_build) return pkgit.run({ "make" }) end, install = function(bldit_install) return pkgit.run({ "make install PREFIX=" .. prefix }) end, remove = function(bldit_remove) return pkgit.run({ "make uninstall PREFIX=" .. prefix }) end, } return cfg