aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-06-03 15:45:37 +0000
committerdacctal <dacctal@symlinx.net>2026-06-03 15:45:37 +0000
commit9e988b65e5084bd0044b8acbf47e23c382e2d95e (patch)
tree390b02a3ffb2893e04d8f2c7afc698a6c6333f10
parent4f1e0517c6f68bafba38244fd607074079df64b5 (diff)
added uninstall functions for make and meson in default configuration file
-rw-r--r--CONTRIBUTING.md9
-rw-r--r--README.md5
-rw-r--r--config/init.lua17
3 files changed, 30 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..9d3c4bd
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,9 @@
+# Basics
+To contribute to pkgit, you should go to the xmpp muc `pkgit@muc.symlinx.net` and drop your patch file which *should* contain the changes you made.
+
+# How big can the patches be?
+You should only make one effective change per patch.
+Multiple files can be changed per patch, but only as needed to apply the one change.
+Do not change two separated things in one patch.
+If one change is not related to another, make two patches.
+Unless the patch fundamentally changes how the user interacts with pkgit, you should not change `README.md`.
diff --git a/README.md b/README.md
index fc157e3..011efa2 100644
--- a/README.md
+++ b/README.md
@@ -183,6 +183,7 @@ repositories = {
pre_install = function() ... end
install = function() ... end
post_install = function() ... end
+ uninstall = function() ... end
}
}
--[[
@@ -205,6 +206,7 @@ build_systems = {
pre_install = function() ... end
install = function() ... end
post_install = function() ... end
+ uninstall = function() ... end
}
}
```
@@ -274,6 +276,7 @@ targets = {
os.execute("make install")
end,
post_install = function() end,
+ uninstall = function() end,
}
--[[
could also have targets for 'client'
@@ -284,4 +287,4 @@ targets = {
```
# Contributing to pkgit
-To contribute to pkgit, you should go to the xmpp muc *pkgit@muc.symlinx.net* and drop your patch file which *should* contain the commits you made.
+If you want to contribute to pkgit, please refer to CONTRIBUTING.md
diff --git a/config/init.lua b/config/init.lua
index e7145a9..f3c36d5 100644
--- a/config/init.lua
+++ b/config/init.lua
@@ -18,6 +18,23 @@ build_systems = {
build = function()
os.execute("make")
end,
+ install = function()
+ os.execute("make install PREFIX="..prefix)
+ end,
+ uninstall = function()
+ os.execute("make uninstall PREFIX="..prefix)
+ end,
+ },
+ ["meson.build"] = {
+ build = function()
+ os.execute("meson setup build --prefix "..prefix.." && meson compile -C build")
+ end,
+ install = function()
+ os.execute("cd build && meson install")
+ end,
+ uninstall = function()
+ os.execute("cd build && ninja uninstall")
+ end,
},
["CMakeLists.txt"] = {
build = function()