aboutsummaryrefslogtreecommitdiff
path: root/yeetfile.js
blob: 730e7d1c9035e5e5d52e8a532ac9d7ace299ddbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
go.install();

["amd64", "arm64"].forEach(goarch => rpm.build({
    name: "anubis",
    description: "Anubis weighs the souls of incoming HTTP requests and uses a sha256 proof-of-work challenge in order to protect upstream resources from scraper bots.",
    homepage: "https://xeiaso.net/blog/2025/anubis",
    license: "MIT",
    goarch,

    build: (out) => {
        // install Anubis binary
        go.build("-o", `${out}/usr/bin/anubis`);

        // install systemd unit
        yeet.run("mkdir", "-p", `${out}/usr/lib/systemd/system`);
        yeet.run("cp", "run/anubis@.service", `${out}/usr/lib/systemd/system/anubis@.service`);

        // install default config
        yeet.run("mkdir", "-p", `${out}/etc/anubis`);
        yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
    },
}));