Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,12 @@ jobs:
if-no-files-found: error
# build-deb.sh renders the hicolor icon sizes with ImageMagick and refuses to build
# without it; ubuntu-24.04 runners carry no ImageMagick, rsvg or Inkscape. desktop-file-utils
# is only needed so the script's optional entry validation actually runs in CI.
# and appstream are only needed so the script's optional entry and metainfo validation
# actually runs in CI.
- name: Install packaging tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends imagemagick desktop-file-utils
sudo apt-get install -y --no-install-recommends imagemagick desktop-file-utils appstream
- name: Build .deb
env:
VERSION: ${{ needs.version.outputs.version }}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+appstream-metainfo.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Linux: software centres such as GNOME Software now show the installed `.deb` as MIT-licensed, with a description, screenshots and an age rating, instead of an unknown and possibly proprietary licence (#799).
75 changes: 75 additions & 0 deletions packaging/linux/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,81 @@ if command -v desktop-file-validate >/dev/null 2>&1; then
desktop-file-validate "$ROOT/usr/share/applications/$PKG.desktop"
fi

# --- AppStream metainfo ----------------------------------------------------------------------
# What GNOME Software and KDE Discover show on the installed app's page: licence, description,
# screenshots, age rating. Without it they listed Lagebuch as "Unknown License — may be
# proprietary" (#799). The id is the macOS bundle identifier; the launchable ties it to the entry
# above. The screenshots are the README's, fetched from GitHub at this release's tag: the release
# workflow only ever builds from a v-tag, so the URL always exists.
# A .deb opened in a software centre before installing still shows an unknown licence: PackageKit's
# apt backend reports "unknown" for every package, whatever the package carries.
SCREENSHOTS="https://raw.githubusercontent.com/CodeForFire/lagebuch/v${VERSION}/docs/screenshots"
install -d "$ROOT/usr/share/metainfo"
cat > "$ROOT/usr/share/metainfo/de.codeforfire.$PKG.metainfo.xml" <<METAINFO
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>de.codeforfire.$PKG</id>
<name>Lagebuch</name>
<summary>Einsatztagebuch, Atemschutzüberwachung und Einsatzberichte für den ELW</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<developer id="de.codeforfire">
<name>CodeForFire</name>
</developer>
<description>
<p>
Lagebuch ist das digitale Einsatztagebuch für den Einsatzleitwagen. Ein Einsatz ist eine
Datei auf dem ELW-Laptop – mit Einsatztagebuch, Kräften, Atemschutzüberwachung, Aufgaben,
CO-Messprotokoll und PDF-Bericht.
</p>
<p>
Lagebuch läuft offline: kein Internet, kein Konto, kein Server, keine Telemetrie. Die
optionale Mehrgeräte-Verbindung bleibt im LAN, TLS-gesichert mit PIN.
</p>
</description>
<launchable type="desktop-id">$PKG.desktop</launchable>
<url type="homepage">https://codeforfire.github.io/</url>
<url type="bugtracker">https://github.com/CodeForFire/lagebuch/issues</url>
<url type="vcs-browser">https://github.com/CodeForFire/lagebuch</url>
<provides>
<mediatype>application/x-lagebuch</mediatype>
</provides>
<screenshots>
<screenshot type="default">
<caption>Startseite</caption>
<image>${SCREENSHOTS}/home.png</image>
</screenshot>
<screenshot>
<caption>Einsatztagebuch</caption>
<image>${SCREENSHOTS}/etb.png</image>
</screenshot>
<screenshot>
<caption>Kräfte</caption>
<image>${SCREENSHOTS}/kraefte.png</image>
</screenshot>
<screenshot>
<caption>Atemschutzüberwachung</caption>
<image>${SCREENSHOTS}/atemschutz.png</image>
</screenshot>
<screenshot>
<caption>PDF-Bericht</caption>
<image>${SCREENSHOTS}/pdf-export.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1"/>
<releases>
<release version="$VERSION" date="$(date -u +%Y-%m-%d)"/>
</releases>
</component>
METAINFO
chmod 644 "$ROOT/usr/share/metainfo/de.codeforfire.$PKG.metainfo.xml"

# Optional for the same reason as desktop-file-validate above. --no-net keeps the build from
# depending on GitHub being reachable; it skips only the check that the screenshot URLs load.
if command -v appstreamcli >/dev/null 2>&1; then
appstreamcli validate --no-net "$ROOT/usr/share/metainfo/de.codeforfire.$PKG.metainfo.xml"
fi

# --- control metadata ------------------------------------------------------------------------
# Installed-Size is in KiB, what apt shows before installing.
#
Expand Down
Loading