-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds packaging process for debs and systemd service module
- Loading branch information
1 parent
7e61d58
commit 6243866
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Unit] | ||
Description=framework-inputmodule-rs runs Framework Laptop 16 input modules and keeps their firmware up to date | ||
|
||
[Service] | ||
ExecStart=/usr/bin/framework-inputmodule-rs led-matrix --clock | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
cp -u ./ledmatrix/50-framework.rules /etc/udev/rules.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
: 'Checking for fpm Ruby gem, installing if not present' | ||
installed=`gem list -i fpm` || true | ||
|
||
if [ $installed = 'false' ]; then | ||
gem install fpm | ||
fi | ||
|
||
: 'Running the build' | ||
cargo build | ||
|
||
: "Packaging" | ||
fpm \ | ||
-s dir -t deb \ | ||
-p framework-inputmodule-rs-0.0.1.deb \ | ||
--name framework-inputmodule-rs \ | ||
--version 0.0.1 \ | ||
--architecture all \ | ||
--description "framework-inputmodule-rs runs Framework Laptop 16 input modules and keeps their firmware up to date" \ | ||
--url "https://frame.work" \ | ||
--maintainer "Framework <support@frame.work>" \ | ||
--deb-systemd ./framework-inputmodule-rs.service \ | ||
--deb-systemd-enable \ | ||
--deb-systemd-auto-start \ | ||
--deb-systemd-restart-after-upgrade \ | ||
--after-install postinstall.sh \ | ||
target/x86_64-unknown-linux-gnu/debug/inputmodule-control=/usr/bin/framework-inputmodule-rs | ||
|
||
: 'Packaging successful, install with "sudo dpkg -i <pkg-name>.deb"' |