✨ build: add build.sh
This commit is contained in:
@@ -7,7 +7,7 @@ Add both feeds to `feeds.conf.default`:
|
||||
|
||||
```text
|
||||
src-git packages https://github.com/immortalwrt/packages.git
|
||||
src-git mihomo <repository-url>
|
||||
src-git mihomo https://git.laysense.com/SerinaNya/mihomo-openwrt.git
|
||||
```
|
||||
|
||||
Then update and install the required packages:
|
||||
@@ -26,3 +26,30 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user