aboutsummaryrefslogtreecommitdiff
path: root/bldit.lua
diff options
context:
space:
mode:
authordacctal <donotcontactmevia@email.invalid>2026-07-27 04:38:32 +0000
committerdacctal <donotcontactmevia@email.invalid>2026-07-27 04:38:32 +0000
commite2cda84ebbd073ece54692c6a3d785afc6148268 (patch)
tree9bb0e82a1a32af82338404e865cbd9bfd9cc6a01 /bldit.lua
parenta017a140b912b40a6f61b3d918daa6e7554e65ed (diff)
added some config stuffindev
Diffstat (limited to 'bldit.lua')
-rw-r--r--bldit.lua78
1 files changed, 41 insertions, 37 deletions
diff --git a/bldit.lua b/bldit.lua
index 04100ab..e266b7d 100644
--- a/bldit.lua
+++ b/bldit.lua
@@ -18,43 +18,47 @@
]]
-bldit_version = "1.2.0"
-package_version = "1.2.0"
-
-dependencies = {
- luajit = {
- url = "https://luajit.org/git/luajit.git",
- version = "v2.1",
- target = "default",
- },
- git = {
- url = "https://github.com/git/git",
- version = "HEAD",
- target = "default",
- },
+local bldit = {}
+bldit.version = "1.2.0"
+bldit.package_version = bldit.version
+
+
+-- fetchers, entirely made by the developer --
+local fetchers = {}
+fetchers.git = {
+ get_source = function(url, version) return pkgit.run({
+ "git clone "..url.." --branch "..version
+ }) end,
+ get_version = function(url) return io.popen(
+ "git -c 'versionsort.suffix=-' \
+ ls-remote --exit-code --refs --sort='version:refname' \
+ --tags "..url.." '*.*.*' \
+ | tail --lines=1 \
+ | cut --delimiter='/' --fields=3"
+ ):read("*a") end,
+}
+-- fetchers, entirely made by the developer --
+
+
+bldit.dependencies = {
+ luajit = {
+ url = "https://luajit.org/git/luajit.git",
+ version = "v2.1",
+ fetcher = fetchers.git,
+ recipe = recpies.make
+ }
}
-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()
- return os.execute("make &>/tmp/pkgit_build.log")
- end,
- install = function()
- return os.execute("make install PREFIX="..prefix.." &>/tmp/pkgit_build.log")
- end,
- uninstall = function()
- return os.execute("make uninstall PREFIX="..prefix.." &>/tmp/pkgit_build.log")
- end,
- },
+bldit.recipe = {
+ build = function()
+ return os.execute("make")
+ end,
+ install = function()
+ return os.execute("make install PREFIX="..user.dirs.prefix)
+ end,
+ uninstall = function()
+ return os.execute("make uninstall PREFIX="..user.dirs.prefix)
+ end,
}
+
+return bldit