Debian packaging

This commit is contained in:
2026-10-22 21:33:31 -05:00
parent 82f10f835b
commit 18948efd17
2 changed files with 47 additions and 1 deletions

View File

@@ -177,7 +177,9 @@ From then on, `sudo apt upgrade` picks up new releases.
- **Serve the whole directory.** It holds `pool/`, the signed `dists/`, the
public key (`mtgc.asc`) and `mtgc.sources`, which carries the key inline so
machines don't need a separate keyring step. `conf/` and `db/` are
machines don't need a separate keyring step. It also has a `README.html`
with these install steps, for anyone who opens the address in a browser.
`conf/` and `db/` are
reprepro's own state; they're harmless to serve but aren't needed. The
newest three versions are kept, so a bad release can be undone with
`sudo apt install mtgc=<older version>`.

View File

@@ -141,6 +141,50 @@ EOF
sed 's/^$/./; s/^/ /' "$dir/$PACKAGE.asc"
} >"$dir/$PACKAGE.sources"
# A landing page for whoever opens the repo's address in a browser.
cat >"$dir/README.html" <<EOF
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mtgc apt repo</title>
<style>
:root { color-scheme: light dark; --bg: #fff; --fg: #1d1d1f; --muted: #6e6e73; --code: #f2f2f4; }
@media (prefers-color-scheme: dark) { :root { --bg: #161618; --fg: #ececee; --muted: #9a9aa0; --code: #242428; } }
body { margin: 0 auto; max-width: 42rem; padding: 2rem 1rem; background: var(--bg); color: var(--fg);
font: 16px/1.55 system-ui, sans-serif; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }
p { margin: .5rem 0; }
.muted { color: var(--muted); }
pre { background: var(--code); padding: .75rem 1rem; border-radius: 6px; overflow-x: auto; }
code { font: .9em ui-monospace, monospace; }
</style>
</head>
<body>
<h1>mtgc for Debian &amp; Ubuntu</h1>
<p class="muted">An apt repository for the mtgc desktop app (amd64).</p>
<h2>Install</h2>
<p>Add the repo once. The file includes the signing key, so you don't need a separate keyring step.</p>
<pre><code>sudo curl -fsSLo /etc/apt/sources.list.d/$PACKAGE.sources $repo_url/$PACKAGE.sources
sudo apt update &amp;&amp; sudo apt install $PACKAGE</code></pre>
<p>From then on, <code>sudo apt upgrade</code> picks up new releases.</p>
<h2>Requirements</h2>
<p>A 64-bit x86 system with glibc 2.43 or newer (check with <code>ldd --version</code>).
Older releases, such as Ubuntu 24.04 and Debian 13, can't install it.</p>
<h2>Uninstall</h2>
<pre><code>sudo apt remove $PACKAGE
sudo rm /etc/apt/sources.list.d/$PACKAGE.sources</code></pre>
<p class="muted">Signing key: <a href="$PACKAGE.asc">$PACKAGE.asc</a>, fingerprint <code>$fpr</code></p>
</body>
</html>
EOF
mkdir -p "$dir/conf"
cat >"$dir/conf/distributions" <<EOF
Codename: $SUITE