aboutsummaryrefslogtreecommitdiff
path: root/config/init.lua
blob: f3c36d558adcd32b46c2d341da898fa6516deef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
local home = os.getenv("HOME")
local prefix = home.."/.local"
install_directories = {
  bin	    = prefix.."/bin",
  include	= prefix.."/include",
  lib	    = prefix.."/lib",
  src     = prefix.."/share/pkgit",
}

repositories = {
  pkgit = {
    url = "https://git.symlinx.net/pkgit",
  },
}

build_systems = {
  ["Makefile"] = {
    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()
      os.execute("cmake -B build")
      os.execute("cmake --build build")
    end,
  },
}