aboutsummaryrefslogtreecommitdiff
path: root/.config/pkgit
diff options
context:
space:
mode:
Diffstat (limited to '.config/pkgit')
-rw-r--r--.config/pkgit/builds/cmake.lua26
-rw-r--r--.config/pkgit/builds/init.lua6
-rw-r--r--.config/pkgit/builds/make.lua26
-rw-r--r--.config/pkgit/builds/meson.lua26
-rw-r--r--.config/pkgit/init.lua16
-rw-r--r--.config/pkgit/repos/boomer.lua27
-rw-r--r--.config/pkgit/repos/busybox.lua38
-rw-r--r--.config/pkgit/repos/cmark.lua16
-rw-r--r--.config/pkgit/repos/cmommy.lua16
-rw-r--r--.config/pkgit/repos/cowsay.lua14
-rw-r--r--.config/pkgit/repos/git.lua19
-rw-r--r--.config/pkgit/repos/imagemagick.lua13
-rw-r--r--.config/pkgit/repos/init.lua20
-rw-r--r--.config/pkgit/repos/musl.lua29
-rw-r--r--.config/pkgit/repos/olivine.lua19
-rw-r--r--.config/pkgit/repos/openssh.lua17
-rw-r--r--.config/pkgit/repos/pkgit.lua27
-rw-r--r--.config/pkgit/repos/scrot.lua13
-rw-r--r--.config/pkgit/repos/ssuika.lua16
-rw-r--r--.config/pkgit/repos/tinycc.lua29
-rw-r--r--.config/pkgit/repos/tux.lua10
-rw-r--r--.config/pkgit/repos/v.lua30
-rw-r--r--.config/pkgit/repos/zig.lua13
23 files changed, 466 insertions, 0 deletions
diff --git a/.config/pkgit/builds/cmake.lua b/.config/pkgit/builds/cmake.lua
new file mode 100644
index 0000000..e864889
--- /dev/null
+++ b/.config/pkgit/builds/cmake.lua
@@ -0,0 +1,26 @@
+return {
+ targets = {
+ default = {
+ build = function()
+ return os.execute("cmake -B build && cmake --build build")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." cmake --build . --target install")
+ end,
+ uninstall = function()
+ return os.execute(privilege_escalator.." xargs rm < install_manifest.txt")
+ end,
+ },
+ quiet = {
+ build = function()
+ return os.execute("cmake -B build &>/tmp/pkgit_build.log && cmake --build build &>/tmp/pkgit_build.log")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." cmake --build . --target install &>/tmp/pkgit_build.log")
+ end,
+ uninstall = function()
+ return os.execute(privilege_escalator.." xargs rm < install_manifest.txt &>/tmp/pkgit_build.log")
+ end,
+ },
+ },
+} \ No newline at end of file
diff --git a/.config/pkgit/builds/init.lua b/.config/pkgit/builds/init.lua
new file mode 100644
index 0000000..eacf17e
--- /dev/null
+++ b/.config/pkgit/builds/init.lua
@@ -0,0 +1,6 @@
+return {
+ ["Makefile"] = require("builds.make"),
+ ["Makefile.am"] = require("builds.make"),
+ ["meson.build"] = require("builds.meson"),
+ ["CMakeLists.txt"] = require("builds.cmake"),
+}
diff --git a/.config/pkgit/builds/make.lua b/.config/pkgit/builds/make.lua
new file mode 100644
index 0000000..03358ca
--- /dev/null
+++ b/.config/pkgit/builds/make.lua
@@ -0,0 +1,26 @@
+return {
+ targets = {
+ default = {
+ build = function()
+ return os.execute("make -j$(nproc)")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." make install PREFIX="..prefix)
+ end,
+ uninstall = function()
+ return os.execute(privilege_escalator.." make uninstall PREFIX="..prefix)
+ end,
+ },
+ quiet = {
+ build = function()
+ return os.execute("make &>/tmp/pkgit_build.log")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." make install PREFIX="..prefix.." &>/tmp/pkgit_build.log")
+ end,
+ uninstall = function()
+ return os.execute(privilege_escalator.." make uninstall PREFIX="..prefix.." &>/tmp/pkgit_build.log")
+ end,
+ },
+ },
+} \ No newline at end of file
diff --git a/.config/pkgit/builds/meson.lua b/.config/pkgit/builds/meson.lua
new file mode 100644
index 0000000..bfc9b14
--- /dev/null
+++ b/.config/pkgit/builds/meson.lua
@@ -0,0 +1,26 @@
+return {
+ targets = {
+ default = {
+ build = function()
+ return os.execute("meson setup build --prefix "..prefix.." && meson compile -C build")
+ end,
+ install = function()
+ return os.execute("cd build && "..privilege_escalator.." meson install")
+ end,
+ uninstall = function()
+ return os.execute("cd build && "..privilege_escalator.." ninja uninstall")
+ end,
+ },
+ quiet = {
+ build = function()
+ return os.execute("meson setup build --prefix "..prefix.." &>/tmp/pkgit_build.log && meson compile -C build &>/tmp/pkgit_build.log")
+ end,
+ install = function()
+ return os.execute("cd build && "..privilege_escalator.." meson install &>/tmp/pkgit_build.log")
+ end,
+ uninstall = function()
+ return os.execute("cd build && "..privilege_escalator.." ninja uninstall &>/tmp/pkgit_build.log")
+ end,
+ },
+ }
+} \ No newline at end of file
diff --git a/.config/pkgit/init.lua b/.config/pkgit/init.lua
new file mode 100644
index 0000000..a7bf371
--- /dev/null
+++ b/.config/pkgit/init.lua
@@ -0,0 +1,16 @@
+privilege_escalator = "/bin/doas"
+local home = os.getenv("HOME")
+prefix = home.."/.local"
+install_directories = {
+ bin = prefix.."/bin",
+ include = prefix.."/include",
+ lib = prefix.."/lib",
+ src = prefix.."/share/pkgit",
+}
+
+on_update = function()
+ return os.execute("ls")
+end
+
+repositories = require("repos.init")
+build_systems = require("builds.init")
diff --git a/.config/pkgit/repos/boomer.lua b/.config/pkgit/repos/boomer.lua
new file mode 100644
index 0000000..20f9735
--- /dev/null
+++ b/.config/pkgit/repos/boomer.lua
@@ -0,0 +1,27 @@
+return {
+ url = "https://github.com/tsoding/boomer",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("nimble build")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." cp boomer "..install_directories.bin)
+ end,
+ uninstall = function()
+ return os.execute(privilege_escalator.." rm "..install_directories.bin.."/boomer ")
+ end,
+ },
+ quiet = {
+ build = function()
+ return os.execute("nimble build &>/tmp/pkgit_build.log")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." cp boomer "..install_directories.bin.." &>/tmp/pkgit_build.log")
+ end,
+ uninstall = function()
+ return os.execute(privilege_escalator.." rm "..install_directories.bin.."/boomer &>/tmp/pkgit_build.log")
+ end,
+ },
+ },
+}
diff --git a/.config/pkgit/repos/busybox.lua b/.config/pkgit/repos/busybox.lua
new file mode 100644
index 0000000..2e4f8c3
--- /dev/null
+++ b/.config/pkgit/repos/busybox.lua
@@ -0,0 +1,38 @@
+return {
+ url = "https://git.busybox.net/busybox/",
+ targets = {
+ default = {
+ build = function()
+ e,h,c = os.execute("make defconfig")
+ if c ~= 0 then
+ return c
+ end
+ e,h,c = os.execute("sed -i 's/CONFIG_TC=y/CONFIG_TC=n/' .config")
+ if c ~= 0 then
+ print("Configuration Failure: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ e,h,c = os.execute("sed -i 's/# CONFIG_TC is not set/CONFIG_TC=n/' .config")
+ if c ~= 0 then
+ print("Configuration Failure: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ e,h,c = os.execute("make")
+ if c ~= 0 then
+ print("Compilation Error: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ return 0
+ end,
+ install = function()
+ return os.execute("make CONFIG_PREFIX="..prefix.." install")
+ end,
+ uninstall = function()
+ return os.execute("make CONFIG_PREFIX="..prefix.." uninstall")
+ end,
+ }
+ }
+} \ No newline at end of file
diff --git a/.config/pkgit/repos/cmark.lua b/.config/pkgit/repos/cmark.lua
new file mode 100644
index 0000000..4da7390
--- /dev/null
+++ b/.config/pkgit/repos/cmark.lua
@@ -0,0 +1,16 @@
+return {
+ url = "https://github.com/commonmark/cmark",
+ targets = {
+ default = {
+ build = function()
+ os.execute("make INSTALL_PREFIX="..prefix)
+ end,
+ install = function()
+ os.execute("make install INSTALL_PREFIX="..prefix)
+ end,
+ uninstall = function()
+ os.execute("make uninstall INSTALL_PREFIX="..prefix)
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/cmommy.lua b/.config/pkgit/repos/cmommy.lua
new file mode 100644
index 0000000..26ba432
--- /dev/null
+++ b/.config/pkgit/repos/cmommy.lua
@@ -0,0 +1,16 @@
+return {
+ url = "https://git.bwaaa.monster/cmommy",
+ targets = {
+ default = {
+ build = function()
+ os.execute("make")
+ end,
+ install = function()
+ os.execute("cp ./bin/mommy "..install_directories.bin)
+ end,
+ uninstall = function()
+ os.execute("rm "..install_directories.bin.."/mommy")
+ end,
+ },
+ },
+} \ No newline at end of file
diff --git a/.config/pkgit/repos/cowsay.lua b/.config/pkgit/repos/cowsay.lua
new file mode 100644
index 0000000..630d746
--- /dev/null
+++ b/.config/pkgit/repos/cowsay.lua
@@ -0,0 +1,14 @@
+return {
+ url = "https://github.com/cowsay-org/cowsay",
+ targets = {
+ default = {
+ install = function()
+ os.execute("make install prefix="..prefix)
+ end,
+ uninstall = function()
+ os.execute("make uninstall prefix="..prefix)
+ os.execute("rm -rf "..prefix.."/share/cowsay")
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/git.lua b/.config/pkgit/repos/git.lua
new file mode 100644
index 0000000..3e2d473
--- /dev/null
+++ b/.config/pkgit/repos/git.lua
@@ -0,0 +1,19 @@
+return {
+ url = "https://github.com/git/git",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("make NO_REGEX=NeedsStartEnd prefix="..prefix)
+ end,
+ install = function()
+ return os.execute("make NO_REGEX=NeedsStartEnd install prefix="..prefix)
+ end,
+ on_update = function()
+ return os.execute("echo 'HEYHEYHEYHEYHEYHEYHEY IT WORKED (git)'")
+ end,
+ uninstall = function()
+ return os.execute("make NO_REGEX=NeedsStartEnd install prefix="..prefix)
+ end,
+ },
+ },
+}
diff --git a/.config/pkgit/repos/imagemagick.lua b/.config/pkgit/repos/imagemagick.lua
new file mode 100644
index 0000000..bd04aae
--- /dev/null
+++ b/.config/pkgit/repos/imagemagick.lua
@@ -0,0 +1,13 @@
+return {
+ url = "https://github.com/ImageMagick/ImageMagick.git",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("./configure --prefix="..prefix.." && make")
+ end,
+ install = function()
+ return os.execute(privilege_escalator.." make install")
+ end,
+ },
+ }
+} \ No newline at end of file
diff --git a/.config/pkgit/repos/init.lua b/.config/pkgit/repos/init.lua
new file mode 100644
index 0000000..3109779
--- /dev/null
+++ b/.config/pkgit/repos/init.lua
@@ -0,0 +1,20 @@
+return {
+ pkgit = { url = "https://git.symlinx.net/pkgit", },
+ pipemixer = { url = "https://github.com/heather7283/pipemixer", },
+ luajit = { url = "https://luajit.org/git/luajit.git", },
+ fetchit = { url = "https://codeberg.org/nzuum/fetchit", },
+ wally = { url = "https://codeberg.org/RealFCC/wally", },
+ ssuika = require("repos.ssuika"),
+ ImageMagick = require("repos.imagemagick"),
+ olivine = require("repos.olivine"),
+ cmommy = require("repos.cmommy"),
+ tux = require("repos.tux"),
+ busybox = require("repos.busybox"),
+ boomer = require("repos.boomer"),
+ cowsay = require("repos.cowsay"),
+ scrot = require("repos.scrot"),
+ cmark = require("repos.cmark"),
+ openssh = require("repos.openssh"),
+ vlang = require("repos.v"),
+ git = require("repos.git")
+} \ No newline at end of file
diff --git a/.config/pkgit/repos/musl.lua b/.config/pkgit/repos/musl.lua
new file mode 100644
index 0000000..df535af
--- /dev/null
+++ b/.config/pkgit/repos/musl.lua
@@ -0,0 +1,29 @@
+return {
+ url = "https://git.musl-libc.org/git/musl",
+ targets = {
+ default = {
+ build = function()
+ config_cmd = "./configure --bindir="..install_directories.bin.." --libdir="..install_directories.lib.." --includedir="..install_directories.include.." --syslibdir="..install_directories.lib
+ e, h, c = os.execute(config_cmd)
+ if c ~= 0 then
+ print("Configuration Failure: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ e,h,c = os.execute("make")
+ if c ~= 0 then
+ print("Compilation Error: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ return 0
+ end,
+ install = function()
+ return os.execute("make DESTDIR=" .. prefix .. " install")
+ end,
+ uninstall = function()
+ return os.execute("make DESTDIR=" .. prefix .. " uninstall")
+ end,
+ },
+ },
+}
diff --git a/.config/pkgit/repos/olivine.lua b/.config/pkgit/repos/olivine.lua
new file mode 100644
index 0000000..74f4d01
--- /dev/null
+++ b/.config/pkgit/repos/olivine.lua
@@ -0,0 +1,19 @@
+return {
+ url = "https://gitlab.com/Oglo12/olivine.git",
+ version = "dev",
+ targets = {
+ default = {
+ build = function()
+ os.execute("make UI_BACKEND=sdl3 MODE=release PREFIX="..prefix)
+ end,
+ install = function()
+ os.execute("make install UI_BACKEND=sdl3 MODE=release PREFIX="..prefix)
+ end,
+ uninstall = function()
+ os.execute("rm "..install_directories.bin.."/olv "..install_directories.bin.."/olv-sdl3")
+ os.execute("rm -rf "..prefix.."/share/olivine/v0.0.1/lua_mod "..prefix.."/share/olivine/v0.0.1/User_Manual")
+ os.execute("rm -rf "..install_directories.src.."/olivine")
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/openssh.lua b/.config/pkgit/repos/openssh.lua
new file mode 100644
index 0000000..e2cee4d
--- /dev/null
+++ b/.config/pkgit/repos/openssh.lua
@@ -0,0 +1,17 @@
+return {
+ url = "https://github.com/openssh/openssh-portable",
+ targets = {
+ default = {
+ build = function()
+ print(os.execute("./configure --prefix="..prefix))
+ print(os.execute("make prefix="..prefix))
+ end,
+ install = function()
+ os.execute("make install prefix="..prefix)
+ end,
+ uninstall = function()
+ os.execute("make uninstall prefix="..prefix)
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/pkgit.lua b/.config/pkgit/repos/pkgit.lua
new file mode 100644
index 0000000..99e3f78
--- /dev/null
+++ b/.config/pkgit/repos/pkgit.lua
@@ -0,0 +1,27 @@
+return {
+ url = "https://git.symlinx.net/pkgit",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("make")
+ end,
+ install = function()
+ return os.execute("make install PREFIX="..prefix)
+ end,
+ uninstall = function()
+ return os.execute("make uninstall PREFIX="..prefix)
+ end,
+ },
+ quiet = {
+ build = function()
+ local output = io.popen("make"):read("*a")
+ end,
+ install = function()
+ local output = io.popen("make install PREFIX="..prefix):read("*a")
+ end,
+ uninstall = function()
+ local output = io.popen("make uninstall PREFIX="..prefix):read("*a")
+ end,
+ },
+ }
+}
diff --git a/.config/pkgit/repos/scrot.lua b/.config/pkgit/repos/scrot.lua
new file mode 100644
index 0000000..969554e
--- /dev/null
+++ b/.config/pkgit/repos/scrot.lua
@@ -0,0 +1,13 @@
+return {
+ url = "https://github.com/resurrecting-open-source-projects/scrot",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("./autogen.sh && ./configure --prefix="..prefix.." && make")
+ end,
+ install = function()
+ return os.execute("make install")
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/ssuika.lua b/.config/pkgit/repos/ssuika.lua
new file mode 100644
index 0000000..3611b2a
--- /dev/null
+++ b/.config/pkgit/repos/ssuika.lua
@@ -0,0 +1,16 @@
+return {
+ url = "https://codeberg.org/nzuum/ssuika",
+ targets = {
+ default = {
+ build = function()
+ os.execute("make")
+ end,
+ install = function()
+ os.execute("cp bin/ssuika "..install_directories.bin)
+ end,
+ uninstall = function()
+ os.execute("rm "..install_directories.bin.."/ssuika")
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/tinycc.lua b/.config/pkgit/repos/tinycc.lua
new file mode 100644
index 0000000..02f28b2
--- /dev/null
+++ b/.config/pkgit/repos/tinycc.lua
@@ -0,0 +1,29 @@
+return {
+ url = "https://repo.or.cz/tinycc.git",
+ targets = {
+ default = {
+ build = function()
+ config_cmd = "./configure --config-musl --exec-prefix="..prefix.." --prefix="..prefix.."/usr"
+ e, h, c = os.execute(config_cmd)
+ if c ~= 0 then
+ print("Configuration Failure: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ e,h,c = os.execute("make")
+ if c ~= 0 then
+ print("Compilation Error: ", c, type(c))
+ print("GIVEN UP")
+ return c
+ end
+ return 0
+ end,
+ install = function()
+ return os.execute("make install")
+ end,
+ uninstall = function()
+ return os.execute("make uninstall")
+ end,
+ }
+ }
+}
diff --git a/.config/pkgit/repos/tux.lua b/.config/pkgit/repos/tux.lua
new file mode 100644
index 0000000..4616faa
--- /dev/null
+++ b/.config/pkgit/repos/tux.lua
@@ -0,0 +1,10 @@
+return {
+ url = "https://github.com/JulB3y/tux",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("make release")
+ end,
+ }
+ }
+} \ No newline at end of file
diff --git a/.config/pkgit/repos/v.lua b/.config/pkgit/repos/v.lua
new file mode 100644
index 0000000..aa2f9c2
--- /dev/null
+++ b/.config/pkgit/repos/v.lua
@@ -0,0 +1,30 @@
+return {
+ url = "https://github.com/vlang/v",
+ targets = {
+ default = {
+ build = function()
+ print("hello")
+ return os.execute("make")
+ end,
+ install = function()
+ print("hello")
+ return os.execute("./v symlink "..install_directories.bin)
+ end,
+ uninstall = function()
+ print("hello")
+ return os.execute("rm "..install_directories.bin.."/v")
+ end,
+ },
+ --quiet = {
+ -- build = function()
+ -- return os.execute("make &> /tmp/pkgit_build.log")
+ -- end,
+ -- install = function()
+ -- return os.execute("./v symlink "..install_directories.bin.." &> /tmp/pkgit_build.log")
+ -- end,
+ -- uninstall = function()
+ -- return os.execute("rm "..install_directories.bin.."/v &> /tmp/pkgit_build.log")
+ -- end,
+ --},
+ },
+}
diff --git a/.config/pkgit/repos/zig.lua b/.config/pkgit/repos/zig.lua
new file mode 100644
index 0000000..e03a997
--- /dev/null
+++ b/.config/pkgit/repos/zig.lua
@@ -0,0 +1,13 @@
+return {
+ url = "https://codeberg.org/ziglang/zig.git",
+ targets = {
+ default = {
+ build = function()
+ return os.execute("mkdir build && cd build && cmake ..")
+ end,
+ install = function()
+ return os.execute("make install CMAKE_PREFIX_PATH="..prefix)
+ end,
+ },
+ },
+}