Skip to content

Commit ae6ff91

Browse files
committed
rpm build
1 parent 87da9e4 commit ae6ff91

8 files changed

Lines changed: 181 additions & 118 deletions

.github/workflows/build.yml

Lines changed: 54 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,57 @@ name: build
22
on: [push, workflow_dispatch]
33

44
jobs:
5-
build-for-linux:
6-
runs-on: ubuntu-latest
7-
steps:
8-
- name: checkout repository
9-
uses: actions/checkout@v4
10-
- name: setup python
11-
uses: actions/setup-python@v4
12-
with:
13-
python-version: 3.12
14-
- name: setup Node.js
15-
uses: actions/setup-node@v4
16-
with:
17-
cache-dependency-path: integration-runner/package-lock.json
18-
node-version: 22.1
19-
cache: npm
20-
- name: install dependencies
21-
shell: bash
22-
run: |
23-
pip install -r requirements.txt --upgrade
24-
maturin build --release
25-
pip install $(find ./target/wheels/*.whl)
26-
cd integration-runner
27-
npm i
28-
- name: build
29-
shell: bash
30-
run: |
31-
pyinstaller main.py --onefile --name=liquidWeb-cli
32-
pyinstaller framereceiver.py --onefile --name=frame-receiver
33-
pyinstaller hardwareserver.py --onefile --name=hardware-server
34-
cd integration-runner
35-
npm run package
36-
- name: package
37-
shell: bash
38-
run: |
39-
mkdir ./dist/modules
40-
mv ./dist/frame-receiver ./dist/modules/
41-
mv ./dist/hardware-server ./dist/modules/
42-
mv ./integration-runner/out/integration-runner-linux-x64/ ./dist/modules/
43-
- uses: actions/upload-artifact@v4
44-
with:
45-
name: Artifacts
46-
path: dist/*
5+
build-rpm:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: checkout repository
9+
uses: actions/checkout@v4
10+
- name: setup python
11+
uses: actions/setup-python@v4
12+
with:
13+
python-version: 3.12
14+
- name: setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
cache-dependency-path: integration-runner/package-lock.json
18+
node-version: 22.1
19+
cache: npm
20+
- name: install rpm tooling
21+
run: sudo apt-get update && sudo apt-get install -y rpm
22+
- name: install dependencies
23+
run: |
24+
pip install -r requirements.txt --upgrade
25+
maturin build --release
26+
pip install $(find ./target/wheels/*.whl)
27+
cd integration-runner
28+
npm i
29+
- name: build
30+
run: |
31+
pyinstaller framereceiver.py --onefile --name=frame-receiver
32+
pyinstaller hardwareserver.py --onefile --name=hardware-server
33+
cd integration-runner
34+
npm run package
35+
- name: package
36+
run: |
37+
mkdir -p dist/liquidWeb
38+
mkdir -p dist/liquidWeb/bin
39+
mkdir -p dist/liquidWeb/systemd
40+
mv dist/frame-receiver dist/liquidWeb/bin/
41+
mv dist/hardware-server dist/liquidWeb/bin/
42+
mv integration-runner/out/integration-runner-linux-x64 dist/liquidWeb/integration-runner
43+
cp systemd/*.service dist/liquidWeb/systemd/
44+
cp systemd/*.target dist/liquidWeb/systemd/
45+
- name: prepare rpm sources
46+
run: |
47+
mkdir -p rpmbuild/SOURCES
48+
cp -r dist/liquidWeb liquidWeb
49+
tar czf rpmbuild/SOURCES/liquidWeb.tar.gz liquidWeb
50+
- name: build rpm
51+
run: |
52+
rpmbuild \
53+
--define "_topdir $(pwd)/rpmbuild" \
54+
-ba liquidWeb.spec
55+
- uses: actions/upload-artifact@v4
56+
with:
57+
name: liquidWeb-rpm
58+
path: rpmbuild/RPMS/**/*.rpm

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ MANIFEST
3030
# Usually these files are written by a python script from a template
3131
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3232
*.manifest
33-
*.spec
33+
frame-receiver.spec
34+
hardware-server.spec
3435

3536
# Installer logs
3637
pip-log.txt

liquidWeb.spec

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Name: liquidWeb
2+
Version: 0.9.0
3+
Release: 1%{?dist}
4+
Summary: liquidWeb hardware integration stack
5+
6+
License: GPL-3.0
7+
URL: https://github.com/PouekDEV/liquidWeb
8+
Source0: %{name}-%{version}.tar.gz
9+
10+
BuildArch: x86_64
11+
Requires: systemd
12+
13+
%description
14+
Linux Kraken Elite 2023 LCD web integration displayer
15+
16+
Services are managed via systemd using liquidWeb.target.
17+
18+
%prep
19+
%autosetup
20+
21+
%build
22+
# Nothing to build
23+
24+
%install
25+
# Create base dir
26+
mkdir -p %{buildroot}/usr/lib/liquidWeb
27+
28+
# Binaries
29+
install -Dm755 bin/frame-receiver %{buildroot}/usr/lib/liquidWeb/frame-receiver
30+
install -Dm755 bin/hardware-server %{buildroot}/usr/lib/liquidWeb/hardware-server
31+
32+
# Electron app (directory)
33+
cp -a integration-runner %{buildroot}/usr/lib/liquidWeb/
34+
35+
# systemd units
36+
install -Dm644 systemd/*.service %{buildroot}/lib/systemd/system/
37+
install -Dm644 systemd/*.target %{buildroot}/lib/systemd/system/
38+
39+
%post
40+
systemctl daemon-reload
41+
systemctl enable liquidWeb.target || true
42+
43+
%preun
44+
if [ $1 -eq 0 ]; then
45+
systemctl disable liquidWeb.target || true
46+
systemctl stop liquidWeb.target || true
47+
fi
48+
49+
%postun
50+
systemctl daemon-reload
51+
52+
%files
53+
/usr/lib/liquidWeb/frame-receiver
54+
/usr/lib/liquidWeb/hardware-server
55+
/usr/lib/liquidWeb/integration-runner
56+
57+
/lib/systemd/system/liquidWeb.target
58+
/lib/systemd/system/liquidWeb-integration-runner.service
59+
/lib/systemd/system/liquidWeb-frame-receiver.service
60+
/lib/systemd/system/liquidWeb-hardware-server.service
61+
62+
%changelog
63+
* Tue Jan 29 2026 PouekDEV <stuff@pouekdev.one> - 0.9.0-1
64+
- Test

main.py

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Unit]
2+
Description=liquidWeb Frame Receiver
3+
After=network.target liquidWeb-integration-runner.service
4+
Wants=liquidWeb-integration-runner.service
5+
6+
[Service]
7+
Type=simple
8+
ExecStart=/usr/lib/liquidWeb/frame-receiver 50 90 54217
9+
Restart=on-failure
10+
RestartSec=1
11+
KillSignal=SIGTERM
12+
TimeoutStopSec=5
13+
StandardOutput=journal
14+
StandardError=journal
15+
16+
[Install]
17+
WantedBy=liquidWeb.target
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[Unit]
2+
Description=liquidWeb Hardware Server
3+
After=liquidWeb-frame-receiver.service
4+
Requires=liquidWeb-frame-receiver.service
5+
PartOf=liquidWeb-frame-receiver.service
6+
7+
[Service]
8+
Type=simple
9+
ExecStart=/usr/lib/liquidWeb/hardware-server 54218
10+
Restart=on-failure
11+
RestartSec=1
12+
KillSignal=SIGTERM
13+
TimeoutStopSec=5
14+
StandardOutput=journal
15+
StandardError=journal
16+
17+
[Install]
18+
WantedBy=liquidWeb.target
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[Unit]
2+
Description=liquidWeb Integration Runner
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
ExecStart=/usr/lib/liquidWeb/integration-runner/integration-runner \
8+
--width=640 \
9+
--height=640 \
10+
--fps=30 \
11+
--configuration=0 \
12+
--url=https://www.pouekdev.one/nzxt-integration/ \
13+
--port=54217
14+
Restart=on-failure
15+
RestartSec=1
16+
KillSignal=SIGTERM
17+
TimeoutStopSec=5
18+
StandardOutput=journal
19+
StandardError=journal
20+
21+
[Install]
22+
WantedBy=liquidWeb.target

systemd/liquidWeb.target

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[Unit]
2+
Description=liquidWeb Full
3+
Requires=liquidWeb-integration-runner.service liquidWeb-frame-receiver.service liquidWeb-hardware-server.service
4+
After=network.target

0 commit comments

Comments
 (0)