Skip to content

Commit 4d87717

Browse files
committed
Repackage .deb with minimal dependencies
1 parent b9b2373 commit 4d87717

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

ugs-fx/build-linux-aarch64.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ $JAVA_HOME/bin/jpackage \
113113

114114
mv target/installer/ugs_*.deb "target/installer/ugs-${APP_VERSION}-aarch64.deb"
115115

116+
# Repackage using xz instead of zst
117+
cd target/installer
118+
dpkg-deb -R "ugs-${APP_VERSION}-aarch64.deb" ugs-tmp
119+
sed -i "/^Depends:/c\\Depends: libc6" "ugs-tmp/DEBIAN/control"
120+
rm "ugs-${APP_VERSION}-aarch64.deb"
121+
dpkg-deb -Zxz -b ugs-tmp "ugs-${APP_VERSION}-aarch64.deb"
122+
rm -r ugs-tmp
123+
cd ../..
116124

117125
$JAVA_HOME/bin/jpackage \
118126
--type rpm \

ugs-fx/build-linux-x64.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ $JAVA_HOME/bin/jpackage \
112112
--about-url https://universalgcodesender.com/
113113

114114
mv target/installer/ugs_*.deb "target/installer/ugs-${APP_VERSION}-x64.deb"
115-
cd target/installer
116115

117116
# Repackage using xz instead of zst
118-
ar x "ugs-${APP_VERSION}-x64.deb"
119-
zstd -d < control.tar.zst | xz > control.tar.xz
120-
zstd -d < data.tar.zst | xz > data.tar.xz
117+
cd target/installer
118+
dpkg-deb -R "ugs-${APP_VERSION}-x64.deb" ugs-tmp
119+
sed -i "/^Depends:/c\\Depends: libc6" "ugs-tmp/DEBIAN/control"
121120
rm "ugs-${APP_VERSION}-x64.deb"
122-
ar -m -c -a sdsd "ugs-${APP_VERSION}-x64.deb" debian-binary control.tar.xz data.tar.xz
121+
dpkg-deb -Zxz -b ugs-tmp "ugs-${APP_VERSION}-x64.deb"
122+
rm -r ugs-tmp
123123
cd ../..
124124

125125
$JAVA_HOME/bin/jpackage \

0 commit comments

Comments
 (0)