Compress deb packages better

This commit is contained in:
2025-10-27 19:17:46 +03:00
parent 8e8035af36
commit 1cb0ef2f72
3 changed files with 17 additions and 14 deletions

View File

@@ -176,22 +176,22 @@ build_for_arch() {
echo "[*] Building for target: $short (RID=$rid, RPM --target $rpm_target)"
# .NET publish (self-contained) for this RID
dotnet clean "$PROJECT" -c Release
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
dotnet restore "$PROJECT"
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
dotnet publish "$PROJECT" \
-c Release -r "$rid" \
--sc \
-p:PublishSingleFile=false \
-p:SelfContained=true \
-p:IncludeNativeLibrariesForSelfExtract=true
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:StripSymbols=true
# Per-arch variables (scoped)
local RID_DIR="$rid"
local PUBDIR
PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish"
[[ -d "$PUBDIR" ]]
sudo find "$PUBDIR" -type f -name "*.so" -exec strip {} +
# Make RID_DIR visible to download helpers (they read this var)
export RID_DIR