feat: packages and a signed repository for Debian and Fedora

The code works on those distributions now; there was still nothing to
install. This adds the two packages and, more to the point, somewhere for
them to live that hands out updates - a package a user has to notice a new
version of and download again is not much better than a checkout.

Both are built from `make install` and nothing else. A packaging script that
lists the installed files a second time is a second description of the
layout, and the two drift the first time a file moves; here the Makefile
stays the only place that says where anything goes. The .deb is staged and
wrapped with dpkg-deb, the .rpm goes through a spec whose %install is the
same make invocation. Both are architecture-independent, so one file each
covers Debian, Ubuntu and their derivatives on one side and Fedora, RHEL and
openSUSE on the other.

The version is not written down twice either. The Makefile has it, the
control file and the spec take it as a placeholder, and check-version.sh
refuses a tag that disagrees - otherwise a v1.0.4 release quietly ships a
program that reports 1.0.3.

The release workflow builds both in a Debian and a Fedora container, signs
the RPM where there is a native rpm-sign, attaches both to the GitHub
release, and then adds them to an APT and a DNF repository on gh-pages,
regenerating the indexes over every version ever published so that pinning
and going back to one still work. Missing the signing key is not an error:
it builds, it says in the log that the repositories were left alone, and the
packages are still on the release.

There is also a check workflow, which is the first time shellcheck actually
runs on this.

Neither package carries a maintainer script. The units are enabled per user
by the program itself, so there is nothing for a package to do as root - and
nothing it could do about the changes in a user's home either, which is why
both descriptions say to run `disable` before removing.

packaging/README.md has the two things that cannot be automated: making the
signing key, and pointing Pages at the branch.
This commit is contained in:
Felitendo committed 2026-08-24 10:40:15 +02:00
1 parent 36498f2acf
commit a053b4e555
15 files changed
+764 -4

No files matched your search

+53 -3
View File
@@ -14,9 +14,9 @@ paru -S middleclick-autoscroll # Arch and its derivatives
middleclick-autoscroll enable
```
There is no package for anything else yet, so elsewhere it is `make && sudo
make install` from a checkout and then the same one command. See
[Building from source](#building-from-source).
For Debian, Ubuntu, Fedora and openSUSE there is a package repository — see
[Installing](#installing) for the three lines that add it. Updates then arrive
with the rest of the system's.
That is the whole setup. Nothing else has to be configured, and no file has to
be edited.
@@ -205,6 +205,51 @@ Run this before uninstalling the package.
See `man middleclick-autoscroll` for the details.
## Installing
**Arch, CachyOS, EndeavourOS, Manjaro**
```bash
paru -S middleclick-autoscroll
```
**Debian, Ubuntu, Linux Mint, Pop!_OS**
```bash
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://felitendo.github.io/middleclick-autoscroll/KEY.gpg \
| sudo gpg --dearmor -o /etc/apt/keyrings/middleclick-autoscroll.gpg
echo "deb [signed-by=/etc/apt/keyrings/middleclick-autoscroll.gpg] https://felitendo.github.io/middleclick-autoscroll/deb ./" \
| sudo tee /etc/apt/sources.list.d/middleclick-autoscroll.list
sudo apt update && sudo apt install middleclick-autoscroll
```
**Fedora, RHEL, CentOS Stream**
```bash
sudo curl -fsSL -o /etc/yum.repos.d/middleclick-autoscroll.repo \
https://felitendo.github.io/middleclick-autoscroll/middleclick-autoscroll.repo
sudo dnf install middleclick-autoscroll
```
**openSUSE**
```bash
sudo rpm --import https://felitendo.github.io/middleclick-autoscroll/KEY.gpg
sudo zypper addrepo --gpgcheck --refresh \
https://felitendo.github.io/middleclick-autoscroll/rpm middleclick-autoscroll
sudo zypper install middleclick-autoscroll
```
Then `middleclick-autoscroll enable`, once. Every package is signed, and a new
version arrives with `apt upgrade`, `dnf upgrade` or `zypper up` like anything
else. Anywhere without a package, build it — [from source](#building-from-source)
— or take the `.deb` or the `.rpm` off the
[releases page](https://github.com/Felitendo/middleclick-autoscroll/releases).
Run `middleclick-autoscroll disable` before removing the package: it puts back
everything that was changed.
## Distributions
Any of them. Nothing here is keyed to a distribution name — what differs is
@@ -253,6 +298,11 @@ sudo make PREFIX=/usr/local install
`make check` runs `bash -n` and, if installed, `shellcheck` over every script.
The `.deb` and the `.rpm` are built from the same `make install`, by
`packaging/build-deb.sh` and `packaging/build-rpm.sh`. See
[packaging/README.md](packaging/README.md) for how a release is made and how
the repositories are signed.
## License
GPL-3.0-or-later.