deb packaging: build-deb.sh + packaging/deb, icons from ico/
- scripts/build-deb.sh: binary built in ubuntu:22.04 (glibc 2.35 baseline), Depends via dpkg-shlibdeps, DEB_REVISION (0.1.28-1), changelog.Debian.gz, postinst/postrm cache refresh, REPO=1 local apt index, self-checks (version/upgrade path, stale binary, desktop-file-validate) - packaging/deb/: control.in, rcalc.desktop, appdata metainfo, changelog, hooks - ico/: new app icon in 32/48/64/96/256/512, used for the hicolor slots - convert.rs: fix clippy::approx_constant error in roundtrip test (PI constant) - README: install/update/release instructions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
rcalc (0.1.28-1) unstable; urgency=medium
|
||||
|
||||
* Upstream 0.1.28 (version from Cargo.toml), first Debian packaging.
|
||||
* Binary is built in an Ubuntu 22.04 container (glibc 2.35 baseline), so the
|
||||
package installs on Ubuntu 22.04 / 24.04 / 26.04.
|
||||
* Ships /usr/bin/rcalc, /usr/share/applications/rcalc.desktop, hicolor icons
|
||||
taken from ico/, AppStream metainfo and postinst/postrm cache refresh hooks.
|
||||
* Depends are generated from the ELF with dpkg-shlibdeps.
|
||||
* Build fix: clippy::approx_constant error in the convert round-trip test
|
||||
(3.1415927 -> std::f32::consts::PI).
|
||||
|
||||
-- alexMB5300 <prom-ing@yandex.ru> Thu, 17 Sep 2026 19:12:31 +0300
|
||||
@@ -0,0 +1,23 @@
|
||||
Package: rcalc
|
||||
Version: @VERSION@
|
||||
Architecture: @ARCHITECTURE@
|
||||
Maintainer: @MAINTAINER@
|
||||
Section: math
|
||||
Priority: optional
|
||||
Installed-Size: @INSTALLED_SIZE@
|
||||
Depends: @DEPENDS@
|
||||
Recommends: libegl1, libgl1, libx11-6, libwayland-client0
|
||||
Description: desktop calculator with programmer, engineering and convert tools
|
||||
Calculator inspired by the Windows Calculator (standard mode), written in
|
||||
Rust with the Slint UI toolkit. Modes: Standard, Engineering, Programmer,
|
||||
Convert, CRC and Settings.
|
||||
.
|
||||
Programmer mode shows HEX / DEC / OCT / BIN at once, with QWORD / DWORD /
|
||||
DINT / WORD / INT / BYTE word sizes, bitwise operators and clickable bits.
|
||||
.
|
||||
Convert mode maps a float32 to two 16-bit PLC words in every byte order
|
||||
(AB CD / CD AB / BA DC / DC BA), approximates electronic gear ratios as
|
||||
num/den and converts Char / Hex / Dec ASCII codes.
|
||||
.
|
||||
CRC mode computes Modbus RTU CRC-16 and Modbus ASCII LRC from a string of
|
||||
hex bytes, e.g. "01 03 00 00 00 0A".
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# Maintainer script of the generated rcalc .deb (see scripts/build-deb.sh).
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Refresh the XDG caches. Never fail the installation because of them: the
|
||||
# tools may be absent (minimal systems, chroot, dpkg -x in a container).
|
||||
if command -v update-desktop-database >/dev/null 2>&1; then
|
||||
update-desktop-database -q /usr/share/applications || true
|
||||
fi
|
||||
|
||||
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
|
||||
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
if command -v appstreamcli >/dev/null 2>&1; then
|
||||
appstreamcli refresh --force >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Maintainer script of the generated rcalc .deb (see scripts/build-deb.sh).
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|disappear|failed-upgrade|abort-install|abort-upgrade|purge)
|
||||
;;
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Rebuild the caches after the files were (or are about to be) removed.
|
||||
if command -v update-desktop-database >/dev/null 2>&1; then
|
||||
update-desktop-database -q /usr/share/applications || true
|
||||
fi
|
||||
|
||||
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
|
||||
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
if command -v appstreamcli >/dev/null 2>&1; then
|
||||
appstreamcli refresh --force >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- @RELEASE_DATE@ = UTC date of the build; @VERSION@ comes from Cargo.toml. -->
|
||||
<component type="desktop-application">
|
||||
<id>rcalc.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<!-- LICENSE file is missing in the repository: NOASSERTION until it is added. -->
|
||||
<project_license>NOASSERTION</project_license>
|
||||
<name>Rcalc</name>
|
||||
<summary>Calculator with programmer, engineering, convert and CRC modes</summary>
|
||||
<description>
|
||||
<p>
|
||||
Desktop calculator inspired by the Windows Calculator. Standard mode uses
|
||||
exact rational arithmetic, so 0.1 + 0.2 really gives 0.3.
|
||||
</p>
|
||||
<ul>
|
||||
<li>Standard: + − × ÷, %, ±, 1/x, x², √x, memory, formula panel</li>
|
||||
<li>Engineering: trigonometry, log/pow, DEG/RAD, SI prefixes</li>
|
||||
<li>Programmer: simultaneous HEX / DEC / OCT / BIN, QWORD … BYTE word
|
||||
sizes, bitwise ops, clickable bits</li>
|
||||
<li>Convert: float32 to two 16-bit words (AB CD / CD AB / BA DC / DC BA),
|
||||
gear ratio num/den, ASCII codes</li>
|
||||
<li>CRC: Modbus RTU CRC-16 and Modbus ASCII LRC from hex bytes</li>
|
||||
<li>Full keyboard input, three themes, three button sizes</li>
|
||||
</ul>
|
||||
</description>
|
||||
<categories>
|
||||
<category>Utility</category>
|
||||
<category>Calculator</category>
|
||||
<category>Science</category>
|
||||
</categories>
|
||||
<releases>
|
||||
<release version="@VERSION@" date="@RELEASE_DATE@"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Rcalc
|
||||
GenericName=Calculator
|
||||
Comment=Calculator with Programmer, Engineering, Convert and CRC tools
|
||||
Exec=rcalc
|
||||
Icon=rcalc
|
||||
Terminal=false
|
||||
Categories=Utility;Calculator;
|
||||
Keywords=calculator;programmer;hex;bitwise;modbus;crc;lrc;
|
||||
StartupNotify=true
|
||||
# Wayland app_id / X11 WM_CLASS — must match set_xdg_app_id("rcalc") in src/main.rs
|
||||
StartupWMClass=rcalc
|
||||
Reference in New Issue
Block a user