Skip to content

Commit 6243866

Browse files
committed
Adds packaging process for debs and systemd service module
1 parent 7e61d58 commit 6243866

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

framework-inputmodule-rs-0.0.1.deb

5.93 MB
Binary file not shown.

framework-inputmodule-rs.service

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Unit]
2+
Description=framework-inputmodule-rs runs Framework Laptop 16 input modules and keeps their firmware up to date
3+
4+
[Service]
5+
ExecStart=/usr/bin/framework-inputmodule-rs led-matrix --clock
6+
7+
[Install]
8+
WantedBy=multi-user.target

postinstall.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
cp -u ./ledmatrix/50-framework.rules /etc/udev/rules.d/

release.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -euxo pipefail
4+
5+
: 'Checking for fpm Ruby gem, installing if not present'
6+
installed=`gem list -i fpm` || true
7+
8+
if [ $installed = 'false' ]; then
9+
gem install fpm
10+
fi
11+
12+
: 'Running the build'
13+
cargo build
14+
15+
: "Packaging"
16+
fpm \
17+
-s dir -t deb \
18+
-p framework-inputmodule-rs-0.0.1.deb \
19+
--name framework-inputmodule-rs \
20+
--version 0.0.1 \
21+
--architecture all \
22+
--description "framework-inputmodule-rs runs Framework Laptop 16 input modules and keeps their firmware up to date" \
23+
--url "https://frame.work" \
24+
--maintainer "Framework <[email protected]>" \
25+
--deb-systemd ./framework-inputmodule-rs.service \
26+
--deb-systemd-enable \
27+
--deb-systemd-auto-start \
28+
--deb-systemd-restart-after-upgrade \
29+
--after-install postinstall.sh \
30+
target/x86_64-unknown-linux-gnu/debug/inputmodule-control=/usr/bin/framework-inputmodule-rs
31+
32+
: 'Packaging successful, install with "sudo dpkg -i <pkg-name>.deb"'

0 commit comments

Comments
 (0)