FrameworkComputer / inputmodule-rs

Framework Laptop 16 Input Module SW/FW
MIT License
223 stars 24 forks source link

Packaging process and systemd service #43

Open zachfeldman opened 1 year ago

zachfeldman commented 1 year ago

Closes #47 .

This adds a very simple packaging process and systemd service file for the inputmodule-rs to run. I have it running the ledmatrix by default now but the idea is to quickly iterate on this to a more general service to take commands via dbus or similar as we've discussed!

For now, it generally works. To cut a release, run ./release.sh. It'll install fpm (https://github.com/jordansissel/fpm) if you're missing it and use it to package up the binary that cargo builds into a .deb.

Once you install the package with dpkg -i <package-name>.deb, it'll run a postinstall script to install the udev rule and it will automatically add the systemd service and start it. It should persist between reboots.

Some other things to consider:

zachfeldman commented 1 year ago

@JohnAZoidberg all good suggestions! I've implemented them all. Put the new release action into a separate .yml/action, thinking we could run it only whenever a release branch is pushed (starting in release/) or on some other trigger vs on every single build, if you'd like. We could also merge this into software.yml or firmware.yml if preferred.

zachfeldman commented 1 year ago

@JohnAZoidberg same question here! (Although this is currently just merging into my other branch :))