From c526f4a0374fbd46ce0ea7e4841ca09df5f57712 Mon Sep 17 00:00:00 2001 From: Daniel Brahneborg Date: Mon, 8 Dec 2025 07:35:54 +0100 Subject: [PATCH] README: build on Linux --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c2d5bcc..c24ea12 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,22 @@ It assumes UFW for now. - For a.b.c.0 and a.b.c.1 you will get a block on a.b.c.0/31. - For a.b.c.0 and a.b.c.255 you will get a block on a.b.c.0/24. -- You will also get a block on a.b.0.0/16, if there are at least 4 blacklisted IP blocks on the form a.b.z.0, for any z. +- If there are at least 4 blacklisted IP blocks on the form a.b.z.0, for multiple values of z, you will also get a block on a.b.0.0/16. ## Building -The easiest way to build this is to use Docker. +### On a Linux machine. + +- The Dockerfile shows which tools and libraries are needed, even though in your particular Linux distribution the packages may be called something else. +- Then go to the src directory and run `cmake .` and `make`. + +### On a non-Linux machine. + +Here we use Docker. 1. Install the Docker command line client on your machine. 1. Run `./build.sh`. This will build a binary for aarch64 or x84_64, depending on your host. -1. You can also add the parameter `arm` or `x86` to the `./build.sh` script to build for a particular architecture. +1. You can add the parameter `arm` or `x86` to the `./build.sh` script to build for a particular architecture, if your host machine supports that. 1. The result will be a binary in the `bin` sub directory. 1. You can then run `./run.sh` for an interactive environment. In this case the full repo will be copied to new `repo-x` directory (where `x` depends on the architecture), so your changes do not disappear when the Docker container exits. This script also takes the parameter `arm` or `x86`.