diff options
| author | dacctal <dacctalyt@gmail.com> | 2026-04-22 04:31:45 +0000 |
|---|---|---|
| committer | dacctal <dacctalyt@gmail.com> | 2026-04-22 04:31:45 +0000 |
| commit | af89c510b1bf83bf982ccfb1028f26e515de338c (patch) | |
| tree | b411a2b3ec26f2fa670e12ae73cdbca15462766a | |
| parent | 131a67b1233a1b451348bd6b8533d811d10f4b75 (diff) | |
added default config & fixed headers
| -rw-r--r-- | 0001-fix-don-t-hardcode-lua-header-path.patch | 29 | ||||
| -rw-r--r-- | Makefile | 7 | ||||
| -rw-r--r-- | bldit.lua | 4 | ||||
| -rw-r--r-- | config/build_systems.lua | 2 | ||||
| -rw-r--r-- | config/build_systems/init.lua | 35 | ||||
| -rw-r--r-- | config/init.lua | 9 | ||||
| -rw-r--r-- | config/install_directories.lua | 5 | ||||
| -rw-r--r-- | config/repositories.lua | 2 |
8 files changed, 91 insertions, 2 deletions
diff --git a/0001-fix-don-t-hardcode-lua-header-path.patch b/0001-fix-don-t-hardcode-lua-header-path.patch new file mode 100644 index 0000000..653caaa --- /dev/null +++ b/0001-fix-don-t-hardcode-lua-header-path.patch @@ -0,0 +1,29 @@ +From e3c8171d3904c04a09b4bc5fc556dad131d84aeb Mon Sep 17 00:00:00 2001 +From: frosty <gabriel@bwaaa.monster> +Date: Wed, 22 Apr 2026 00:04:03 -0400 +Subject: [PATCH] fix: don't hardcode lua header path + +--- + include/lua_build.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/lua_build.hh b/include/lua_build.hh +index 1a7df06..a7cdf39 100644 +--- a/include/lua_build.hh ++++ b/include/lua_build.hh +@@ -1,9 +1,9 @@ + #ifndef LUA_BUILD + #define LUA_BUILD + +-#include <lua5.1/lua.h> +-#include <lua5.1/lauxlib.h> +-#include <lua5.1/lualib.h> ++#include <lua.h> ++#include <lauxlib.h> ++#include <lualib.h> + + bool lua_build(const char *path); + +-- +2.52.0 + @@ -14,3 +14,10 @@ debug: src/*.cc install: pkgit install -d ${DESTDIR}${PREFIX}/bin install -m 755 pkgit ${DESTDIR}${PREFIX}/bin/pkgit + +defconfig: + @echo "Installing default config to ~/.config/pkgit ..." + @mkdir -p ~/.config/pkgit + @cp -r config/pkgit/* ~/.config/pkgit + @sed 's|\[placeholder\]|$HOME|g' config/pkgit/dirs.lua > ~/.config/pkgit/dirs.lua + @echo "default config installed" @@ -6,9 +6,9 @@ global_dependencies = {} targets = { default = { dependencies = {} - compile = function() os.execute("make") end + compile = function(name) os.execute("make") end pre_install = function() end - install = function() os.execute("make install") end + install = function(prefix) os.execute("make install") end post_install = function() end } } diff --git a/config/build_systems.lua b/config/build_systems.lua new file mode 100644 index 0000000..b4b2423 --- /dev/null +++ b/config/build_systems.lua @@ -0,0 +1,2 @@ +build_systems = {} +require "build_systems.init" diff --git a/config/build_systems/init.lua b/config/build_systems/init.lua new file mode 100644 index 0000000..5518369 --- /dev/null +++ b/config/build_systems/init.lua @@ -0,0 +1,35 @@ +build_systems["Makefile"] = function(name) + os.execute("make") +end + +build_systems["meson.build"] = function(name) + os.execute("meson setup build && meson compile -C build") +end + +build_systems["CMakeLists.txt"] = function(name) + os.execute("mkdir build && cd build && cmake ..") +end + +build_systems["Cargo.toml"] = function(name) + os.execute("cargo build --release") +end + +build_systems["v.mod"] = function(name) + os.execute("v . -o "..name) +end + +build_systems["build.zig"] = function(name) + os.execute("zig build --release=fast") +end + +build_systems["go.mod"] = function(name) + os.execute("go build") +end + +build_systems["build.ninja"] = function(name) + os.execute("ninja -C build") +end + +build_systems["configure"] = function(name) + os.execute("autoreconf -if && ./configure") +end diff --git a/config/init.lua b/config/init.lua new file mode 100644 index 0000000..3cbcc06 --- /dev/null +++ b/config/init.lua @@ -0,0 +1,9 @@ +-- initializing the path for configuration +-- DO NOT CHANGE +home_dir = os.getenv("HOME") +package.path = package.path .. ";" .. home_dir .. "/.config/pkgit/?.lua" + +-- require other lua scripts +require "build_systems" +require "repositories" +require "install_directories" diff --git a/config/install_directories.lua b/config/install_directories.lua new file mode 100644 index 0000000..f3e2ea8 --- /dev/null +++ b/config/install_directories.lua @@ -0,0 +1,5 @@ +install_directories = {} +install_directories.bin = "/home/dacc/pkgit/bin" +install_directories.lib = "/home/dacc/pkgit/lib" +install_directories.include = "/home/dacc/pkgit/include" +install_directories.pkgblds = "/home/dacc/pkgit/src" diff --git a/config/repositories.lua b/config/repositories.lua new file mode 100644 index 0000000..d1f4209 --- /dev/null +++ b/config/repositories.lua @@ -0,0 +1,2 @@ +repos = {} +repos.pkgit = "https://git.symlinx.net/pkgit" |
