Files
shater/ci/pack-luci.sh
T
omarandClaude Opus 4.8 ef1c563293
build / aarch64_cortex-a53 (push) Successful in 3m0s
build / x86_64 (push) Successful in 4m4s
docs(status): full 05-feature-catalog verification matrix; bump to r7
Records live-VM proof for EVERY MVP/T1 catalog item (nodes/subs/HAPP/hwid, all six
balancer strategies, chains, full rule matcher set incl. MAC/iface/geosite/geoip,
egress iface/tunnel/proxy, lists, DNS DoH/FakeIP/nftset/hijack/DoT-block/IPv6,
reliability commit-confirm/rollback/watchdog/kill-switch/hotplug, per-client &
per-rule stats, LuCI CRUD via Playwright, CI both arches, feed install+upgrade).
Two bugs found & fixed during the sweep (balancer observatory; group probe_url
override). PKG_RELEASE -> 7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 14:27:07 +03:00

40 lines
1.6 KiB
Bash

#!/bin/bash
# Build luci-app-shater as a pure-data .ipk (PKGARCH=all) with plain tar — no SDK,
# no luci-base compilation. Runs on the CI runner. Arg $1 = output dir.
set -e
OUT="$(mkdir -p "${1:?output dir required}" && cd "$1" && pwd)"
REL="0.1.0-r7"
W="$(mktemp -d)"; mkdir -p "$W/data" "$W/control"
cp -a luci-app-shater/root/. "$W/data/"
mkdir -p "$W/data/www"; cp -a luci-app-shater/htdocs/. "$W/data/www/"
find "$W/data" -name '.gitkeep' -delete 2>/dev/null || true
isize=$(du -sk "$W/data" | cut -f1)
cat > "$W/control/control" <<EOF
Package: luci-app-shater
Version: ${REL}
Depends: luci-base, xrayctl, shater-core
Section: luci
Architecture: all
Installed-Size: ${isize}
Maintainer: shater
Description: LuCI web UI for shater (xray transparent-proxy control-plane).
EOF
cat > "$W/control/postinst" <<'EOF'
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -n "${IPKG_INSTROOT}" ] && exit 0
[ -f /etc/uci-defaults/40_luci-shater ] && { sh /etc/uci-defaults/40_luci-shater && rm -f /etc/uci-defaults/40_luci-shater; }
rm -f /tmp/luci-indexcache* 2>/dev/null; rm -rf /tmp/luci-modulecache 2>/dev/null
/etc/init.d/rpcd reload 2>/dev/null
exit 0
EOF
chmod 0755 "$W/control/postinst"
echo "2.0" > "$W/debian-binary"
( cd "$W/control" && tar --numeric-owner --owner=0 --group=0 -czf ../control.tar.gz ./control ./postinst )
( cd "$W/data" && tar --numeric-owner --owner=0 --group=0 -czf ../data.tar.gz . )
( cd "$W" && tar --numeric-owner --owner=0 --group=0 -czf "$OUT/luci-app-shater_${REL}_all.ipk" ./debian-binary ./data.tar.gz ./control.tar.gz )
echo "built $OUT/luci-app-shater_${REL}_all.ipk"