mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-07 17:01:36 +03:00
Fix openwrt build
This commit is contained in:
18
.github/build_openwrt_packages.sh
vendored
18
.github/build_openwrt_packages.sh
vendored
@@ -28,20 +28,24 @@ esac
|
|||||||
|
|
||||||
PKG_VERSION="${VERSION//-/\~}"
|
PKG_VERSION="${VERSION//-/\~}"
|
||||||
|
|
||||||
|
FPM_DIR=$(mktemp -d)
|
||||||
|
sed "s|release/|$PROJECT/release/|g;s|^LICENSE|$PROJECT/LICENSE|" "$PROJECT/.fpm_openwrt" > "$FPM_DIR/.fpm"
|
||||||
|
trap 'rm -rf "$FPM_DIR"' EXIT
|
||||||
|
|
||||||
for ARCH in $ARCHITECTURES; do
|
for ARCH in $ARCHITECTURES; do
|
||||||
cp "$PROJECT/.fpm_openwrt" "$PROJECT/.fpm"
|
TMP_DEB=$(mktemp -p "$DIST" _openwrt_XXXXXX.deb)
|
||||||
fpm -t deb \
|
rm -f "$TMP_DEB"
|
||||||
|
(cd "$FPM_DIR" && fpm -t deb \
|
||||||
-v "$PKG_VERSION" \
|
-v "$PKG_VERSION" \
|
||||||
-p "$DIST/_openwrt_tmp.deb" \
|
-p "$TMP_DEB" \
|
||||||
--architecture all \
|
--architecture all \
|
||||||
"$BINARY_PATH=/usr/bin/sing-box"
|
"$BINARY_PATH=/usr/bin/sing-box")
|
||||||
rm -f "$PROJECT/.fpm"
|
|
||||||
|
|
||||||
bash "$PROJECT/.github/deb2ipk.sh" \
|
bash "$PROJECT/.github/deb2ipk.sh" \
|
||||||
"$ARCH" \
|
"$ARCH" \
|
||||||
"$DIST/_openwrt_tmp.deb" \
|
"$TMP_DEB" \
|
||||||
"$DIST/sing-box-extended_${VERSION}_openwrt_${ARCH}.ipk"
|
"$DIST/sing-box-extended_${VERSION}_openwrt_${ARCH}.ipk"
|
||||||
rm -f "$DIST/_openwrt_tmp.deb"
|
rm -f "$TMP_DEB"
|
||||||
|
|
||||||
if command -v apk &>/dev/null; then
|
if command -v apk &>/dev/null; then
|
||||||
bash "$PROJECT/.github/build_openwrt_apk.sh" \
|
bash "$PROJECT/.github/build_openwrt_apk.sh" \
|
||||||
|
|||||||
@@ -514,12 +514,6 @@ archives:
|
|||||||
- compressed-mips
|
- compressed-mips
|
||||||
- compressed-android
|
- compressed-android
|
||||||
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-compressed'
|
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-compressed'
|
||||||
- id: archive-openwrt
|
|
||||||
<<: *template
|
|
||||||
builds:
|
|
||||||
- openwrt
|
|
||||||
- openwrt-mips
|
|
||||||
name_template: '{{ .ProjectName }}-{{ .Version }}-openwrt-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
|
||||||
source:
|
source:
|
||||||
enabled: false
|
enabled: false
|
||||||
name_template: '{{ .ProjectName }}-{{ .Version }}.source'
|
name_template: '{{ .ProjectName }}-{{ .Version }}.source'
|
||||||
|
|||||||
Reference in New Issue
Block a user