Packaging process and systemd service #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #47 .
This adds a very simple packaging process and
systemd
service file for theinputmodule-rs
to run. I have it running theledmatrix
by default now but the idea is to quickly iterate on this to a more general service to take commands viadbus
or similar as we've discussed!For now, it generally works. To cut a release, run
./release.sh
. It'll installfpm
(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 theudev
rule and it will automatically add thesystemd
service and start it. It should persist between reboots.Some other things to consider:
release.sh
as part of the build, eventually convert it to aMakefile
, or eventually use something likebazel
to run the build and packaging process if we want to get really fancy.debs
, but I included one to easily try installing it withdpkg
.rpm
for RHEL-based distros eventually