Skip to content

Commit b322807

Browse files
feat: create Debian package (#1568)
Co-authored-by: Arnav Angarkar <arnav.angarkar20@gmail.com>
1 parent ab36542 commit b322807

4 files changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/build-deb.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Linux .deb
2+
3+
on:
4+
push:
5+
branches: [ "development" ]
6+
7+
jobs:
8+
build-deb:
9+
name: Build Debian Package
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v5
15+
16+
- name: Install Linux build dependencies
17+
run: |
18+
sudo apt-get update -y
19+
sudo apt-get install -y \
20+
clang cmake ninja-build pkg-config \
21+
libgtk-3-dev liblzma-dev libstdc++-12-dev \
22+
dpkg-dev
23+
24+
- name: Set up Flutter
25+
uses: subosito/flutter-action@v2
26+
with:
27+
channel: stable
28+
cache: true
29+
30+
- name: Install Dart/Flutter dependencies
31+
run: flutter pub get
32+
33+
- name: Build Linux release
34+
run: flutter build linux --release
35+
36+
- name: Install flutter_build_debian
37+
run: dart pub global activate flutter_build_debian
38+
39+
- name: Build .deb package
40+
run: |
41+
export PATH="$PATH:$HOME/.pub-cache/bin"
42+
flutter_build_debian
43+
44+
- name: Upload .deb as artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: badgemagic-deb
48+
path: debian/packages/*.deb
49+
retention-days: 30

debian/debian.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
flutter_app:
2+
command: badgemagic
3+
arch: x64
4+
parent: /usr/local/lib
5+
nonInteractive: false
6+
7+
control:
8+
Package: badgemagic
9+
Version: 1.0.0+1
10+
Architecture: amd64
11+
Priority: optional
12+
Depends: libgtk-3-0, libglib2.0-0, libstdc++6, bluez
13+
Maintainer: Badge Magic Contributors <mariobehling@gmail.com>
14+
Description: Badge Magic - BLE LED Badge Controller
15+
Control your LED name badges wirelessly via Bluetooth using Badge Magic.
16+
17+
options:
18+
exec_out_dir: debian/packages

debian/gui/badgemagic.desktop

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Name=Badge Magic
4+
GenericName=LED Badge Controller
5+
Comment=Control LED name badges via Bluetooth
6+
Exec=badgemagic
7+
Icon=badgemagic
8+
Terminal=false
9+
Type=Application
10+
Categories=Utility;HamRadio;
11+
Keywords=BLE;LED;Badge;Bluetooth;
12+
StartupNotify=true

debian/gui/badgemagic.png

34.9 KB
Loading

0 commit comments

Comments
 (0)