Skip to content

Commit 4153eec

Browse files
authored
chore: Update DEB package configuration with installed size (#1130)
1 parent fc37677 commit 4153eec

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

build/resources/deb/DEBIAN/control

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Package: sourcegit
2-
Version: 8.23
2+
Version: 2025.10
33
Priority: optional
44
Depends: libx11-6, libice6, libsm6, libicu | libicu76 | libicu74 | libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52, xdg-utils
55
Architecture: amd64
6+
Installed-Size: 60440
67
Maintainer: [email protected]
78
Description: Open-source & Free Git GUI Client

build/scripts/package.linux.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ cp -f SourceGit/* resources/deb/opt/sourcegit
5656
ln -rsf resources/deb/opt/sourcegit/sourcegit resources/deb/usr/bin
5757
cp -r resources/_common/applications resources/deb/usr/share
5858
cp -r resources/_common/icons resources/deb/usr/share
59-
sed -i -e "s/^Version:.*/Version: $VERSION/" -e "s/^Architecture:.*/Architecture: $arch/" resources/deb/DEBIAN/control
60-
dpkg-deb --root-owner-group --build resources/deb "sourcegit_$VERSION-1_$arch.deb"
59+
# Calculate installed size in KB
60+
installed_size=$(du -sk resources/deb | cut -f1)
61+
# Update the control file
62+
sed -i -e "s/^Version:.*/Version: $VERSION/" \
63+
-e "s/^Architecture:.*/Architecture: $arch/" \
64+
-e "s/^Installed-Size:.*/Installed-Size: $installed_size/" \
65+
resources/deb/DEBIAN/control
66+
# Build deb package with gzip compression
67+
dpkg-deb -Zgzip --root-owner-group --build resources/deb "sourcegit_$VERSION-1_$arch.deb"
6168

6269
rpmbuild -bb --target="$target" resources/rpm/SPECS/build.spec --define "_topdir $(pwd)/resources/rpm" --define "_version $VERSION"
6370
mv "resources/rpm/RPMS/$target/sourcegit-$VERSION-1.$target.rpm" ./

0 commit comments

Comments
 (0)