From f98c5c9cd6662eece985321d323a3e0f2fecb11d Mon Sep 17 00:00:00 2001
From: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
Date: Tue, 16 Apr 2024 16:04:16 +0800
Subject: [PATCH] Update README (#407)
* Update README
* Write changelog
---
CHANGELOG.md | 1 +
INSTALL.md | 83 +++++++++++++++++++++++++++
README.md | 158 +++++++++++++++++++--------------------------------
3 files changed, 144 insertions(+), 98 deletions(-)
create mode 100644 INSTALL.md
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca6c8b7..bc98dfd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* CI: Configure dependabot grouping #395 - @cyqsimon
* CI refactor #399 - @cyqsimon
* CI: Temporarily disable UI tests #406 - @cyqsimon
+* Update README #407 - @cyqsimon
## Removed
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..e3e438b
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,83 @@
+# Installation
+
+- [Installation](#installation)
+ - [Arch Linux](#arch-linux)
+ - [Exherbo Linux](#exherbo-linux)
+ - [Nix/NixOS](#nixnixos)
+ - [Void Linux](#void-linux)
+ - [Fedora](#fedora)
+ - [macOS/Linux (using Homebrew)](#macoslinux-using-homebrew)
+ - [macOS (using MacPorts)](#macos-using-macports)
+ - [FreeBSD](#freebsd)
+ - [Cargo](#cargo)
+
+## Arch Linux
+
+```
+pacman -S bandwhich
+```
+
+## Exherbo Linux
+
+`bandwhich` is available in [rust repository](https://gitlab.exherbo.org/exherbo/rust/-/tree/master/packages/sys-apps/bandwhich), and can be installed via `cave`:
+
+```
+cave resolve -x repository/rust
+cave resolve -x bandwhich
+```
+
+## Nix/NixOS
+
+`bandwhich` is available in [`nixpkgs`](https://github.com/nixos/nixpkgs/blob/master/pkgs/tools/networking/bandwhich/default.nix), and can be installed, for example, with `nix-env`:
+
+```
+nix-env -iA nixpkgs.bandwhich
+```
+
+## Void Linux
+
+```
+xbps-install -S bandwhich
+```
+
+## Fedora
+
+`bandwhich` is available in [COPR](https://copr.fedorainfracloud.org/coprs/atim/bandwhich/), and can be installed via DNF:
+
+```
+sudo dnf copr enable atim/bandwhich -y && sudo dnf install bandwhich
+```
+
+## macOS/Linux (using Homebrew)
+
+```
+brew install bandwhich
+```
+
+## macOS (using MacPorts)
+
+```
+sudo port selfupdate
+sudo port install bandwhich
+```
+
+## FreeBSD
+
+```
+pkg install bandwhich
+```
+
+or
+
+```
+cd /usr/ports/net-mgmt/bandwhich && make install clean
+```
+
+## Cargo
+
+Regardless of OS, you can always fallback to the Rust package manager, `cargo`.
+For installation instructions of the Rust toolchain, see [here](https://www.rust-lang.org/tools/install).
+
+```
+cargo install bandwhich
+```
diff --git a/README.md b/README.md
index c488982..967b43a 100644
--- a/README.md
+++ b/README.md
@@ -13,16 +13,9 @@ This is a CLI utility for displaying current network utilization by process, con
- [Installation](#installation)
- [Downstream packaging status](#downstream-packaging-status)
- [Download a prebuilt binary](#download-a-prebuilt-binary)
- - [Arch Linux](#arch-linux)
- - [Exherbo Linux](#exherbo-linux)
- - [Nix/NixOS](#nixnixos)
- - [Void Linux](#void-linux)
- - [Fedora](#fedora)
- - [macOS/Linux (using Homebrew)](#macoslinux-using-homebrew)
- - [macOS (using MacPorts)](#macos-using-macports)
- - [FreeBSD](#freebsd)
- - [Building from source using `cargo`](#building-from-source-using-cargo)
- - [OpenWRT](#openwrt)
+ - [Building from source](#building-from-source)
+ - [Cross-compiling](#cross-compiling)
+ - [Android](#android)
- [Post install (Linux)](#post-install-linux)
- [1. `setcap`](#1-setcap)
- [Capabilities explained](#capabilities-explained)
@@ -51,113 +44,82 @@ For more details, see [The Future of Bandwhich #275](https://github.com/imsnif/b
### Downstream packaging status
+For detailed instructions for each platform, see [INSTALL.md](INSTALL.md).
+
### Download a prebuilt binary
-If you're on `android` or `linux`, you can download the generic binary from the [releases](https://github.com/imsnif/bandwhich/releases)
+We offer several generic binaries in [releases](https://github.com/imsnif/bandwhich/releases) for various OSes.
-### Arch Linux
+
| OS | Architecture | Support | Usage | + + +
|---|---|---|---|
| Android | aarch64 | Best effort | +
+ All modern Android devices. +Note that this is a pure binary file, not an APK suitable for general usage. + |
+
| Linux | aarch64 | Full | +64-bit ARMv8+ (servers, some modern routers, RPi-4+). | +
| armv7hf | Best effort | 32-bit ARMv7 (older routers, pre-RPi-4). | +|
| x64-gnu | Full | +Most Linux desktops & servers. | +|
| MacOS | aarch64 | Full | +Apple silicon Macs (2021+). | +
| x64 | +Intel Macs (pre-2021). | +||
| Windows | x64 | Full | +Most Windows desktops & servers. | +