56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
# mihomo OpenWrt feed
|
|
|
|
This repository is a minimal OpenWrt feed containing only the mihomo package.
|
|
It uses the Go packaging infrastructure from the official `packages` feed.
|
|
|
|
Add both feeds to `feeds.conf.default`:
|
|
|
|
```text
|
|
src-git packages https://github.com/immortalwrt/packages.git
|
|
src-git mihomo https://git.laysense.com/SerinaNya/mihomo-openwrt.git
|
|
```
|
|
|
|
Then update and install the required packages:
|
|
|
|
```sh
|
|
./scripts/feeds update packages mihomo
|
|
./scripts/feeds install -p packages golang
|
|
./scripts/feeds install -p mihomo mihomo
|
|
```
|
|
|
|
Build mihomo with:
|
|
|
|
```sh
|
|
make package/feeds/mihomo/mihomo/compile V=s
|
|
```
|
|
|
|
The official `packages` feed must remain available because it provides the Go
|
|
compiler and `golang-package.mk` used by this package.
|
|
|
|
## One-click x86/64 APK build
|
|
|
|
On a Debian or Ubuntu x86_64 host, run the script as an unprivileged user:
|
|
|
|
```sh
|
|
bash build.sh
|
|
```
|
|
|
|
The script installs the required APT packages with `sudo`, clones ImmortalWrt
|
|
`v25.12.1` into `.build/immortalwrt`, configures the generic x86/64 target, and
|
|
builds only mihomo. Generated APK files are copied to `./dist/`.
|
|
|
|
To skip APT installation on later runs:
|
|
|
|
```sh
|
|
SKIP_DEPS=1 bash build.sh
|
|
```
|
|
|
|
The build directory, job count, and source version can be overridden:
|
|
|
|
```sh
|
|
WORK_DIR=/path/to/build JOBS=8 IMMORTALWRT_VERSION=v25.12.1 bash build.sh
|
|
```
|
|
|
|
The repository and build paths must be on a case-sensitive filesystem and must
|
|
not contain spaces or non-ASCII characters.
|