| 1 | #ifndef REPOS_H |
| 2 | #define REPOS_H |
| 3 | |
| 4 | typedef struct |
| 5 | { |
| 6 | const char *name; |
| 7 | const char *url; |
| 8 | const char *fetchCmd; |
| 9 | const char *fetchFmt; |
| 10 | const char *buildCmd; |
| 11 | const char *installCmd; |
| 12 | const char *uninstallCmd; |
| 13 | } Repository; |
| 14 | |
| 15 | |
| 16 | static const Repository REPOS[] = |
| 17 | { |
| 18 | { |
| 19 | .name = "oxwm", |
| 20 | .url = "https://github.com/tonybanters/oxwm", |
| 21 | .fetchFmt = "%s %s %s", |
| 22 | .fetchCmd = "git clone", |
| 23 | .buildCmd = "zig build -Doptimize=ReleaseSmall", |
| 24 | .installCmd = "zig build -Doptimize=ReleaseSmall --prefix /usr/local", |
| 25 | .uninstallCmd = "rm /usr/local/bin/oxwm"}, |
| 26 | { |
| 27 | .name = "guix", |
| 28 | .url = "https://guix.gnu.org/install.sh", |
| 29 | .fetchFmt = "%s %s -P %s", |
| 30 | .fetchCmd = "wget", |
| 31 | .buildCmd = "chmod +x install.sh", |
| 32 | .installCmd = "./install.sh", |
| 33 | .uninstallCmd = "./install.sh --uninstall"}, |
| 34 | { |
| 35 | .name = "kilo", |
| 36 | .url = "https://github.com/antirez/kilo", |
| 37 | .fetchCmd = "git clone", |
| 38 | .fetchFmt = "%s %s %s", |
| 39 | .buildCmd = "make", |
| 40 | .installCmd = "cp kilo /usr/local/bin/kilo", |
| 41 | .uninstallCmd = "rm /usr/local/bin/kilo"}, |
| 42 | { |
| 43 | .name = "emacs", |
| 44 | .url = "https://ftpmirror.gnu.org/emacs/emacs-31.1.tar.gz", |
| 45 | .fetchCmd = "wget", |
| 46 | .fetchFmt = "%s %s -P %s", |
| 47 | .buildCmd = "tar -xvf emacs-31.1.tar.gz && cd emacs-31.1 && ./configure --with-x-toolkit=lucid && make -j$(nproc)", |
| 48 | .installCmd = "cd emacs-31.1 && make install", |
| 49 | .uninstallCmd = "cd emacs-31.1 && make uninstall"} |
| 50 | }; |
| 51 | |
| 52 | Static const size_t REPO_COUNT = sizeof (REPOS) / sizeof (REPOS[0]); |
| 53 | #endif |