Skip to content

Commit 5ad9dbd

Browse files
committed
build: add deb package
1 parent d03e801 commit 5ad9dbd

6 files changed

Lines changed: 44 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,29 @@ jobs:
1414
image: ubuntu:resolute
1515
options: --privileged
1616
steps:
17-
- name: Install requirements
17+
- name: Rust setup
18+
uses: dtolnay/rust-toolchain@stable
19+
20+
- name: Install dependencies
1821
run: |
1922
apt-get -y update
2023
apt-get -y install build-essential curl libssl-dev git \
2124
libgtk-4-dev libadwaita-1-dev libwebkitgtk-6.0-dev libmpv-dev gettext nodejs flatpak-builder
25+
cargo install cargo-deb
2226
2327
- name: Checkout repository
2428
uses: actions/checkout@v6
2529
with:
2630
submodules: recursive
2731

32+
- name: Build deb package
33+
run: cargo deb
34+
35+
- name: Upload deb package to release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
files: ./target/debian/*.deb
39+
2840
- name: Python setup
2941
uses: actions/setup-python@v5
3042
with:
@@ -45,6 +57,7 @@ jobs:
4557

4658
- name: Build flatpak package
4759
run: ./flatpak/build.sh
60+
4861
- name: Upload flatpak package to release
4962
uses: softprops/action-gh-release@v2
5063
with:

Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,26 @@ base64 = "0.22.1"
4141
[build-dependencies]
4242
anyhow = "1.0.103"
4343
dirs = "6.0.0"
44+
45+
[package.metadata.deb]
46+
name = "stremio"
47+
depends = [
48+
"libgtk-4",
49+
"libadwaita-1",
50+
"libwebkitgtk-6.0",
51+
"libmpv2",
52+
"nodejs",
53+
]
54+
assets = [
55+
["target/release/stremio-linux-shell", "/usr/libexec/stremio/stremio", "755"],
56+
["data/server.js", "/usr/libexec/stremio/server.js", "644"],
57+
["data/stremio.sh", "/usr/bin/stremio", "755"],
58+
["data/com.stremio.Stremio.desktop", "/usr/share/applications/com.stremio.Stremio.desktop", "644"],
59+
["data/com.stremio.Stremio.service", "/usr/share/dbus-1/services/com.stremio.Stremio.service", "644"],
60+
["data/com.stremio.Stremio.metainfo.xml", "/usr/share/metainfo/com.stremio.Stremio.metainfo.xml", "644"],
61+
["data/com.stremio.Stremio.gschema.xml", "/usr/share/glib-2.0/schemas/com.stremio.Stremio.gschema.xml", "644"],
62+
["data/icons/com.stremio.Stremio.svg", "/usr/share/icons/hicolor/scalable/apps/com.stremio.Stremio.svg", "644"],
63+
["po/es/LC_MESSAGES/stremio.mo", "/usr/share/locale/es/LC_MESSAGES/stremio.mo", "644"],
64+
["po/fr/LC_MESSAGES/stremio.mo", "/usr/share/locale/fr/LC_MESSAGES/stremio.mo", "644"],
65+
["LICENSE", "/usr/share/licenses/stremio/LICENSE", "644"],
66+
]

data/com.stremio.Stremio.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[D-BUS Service]
22
Name=com.stremio.Stremio
3-
Exec=/app/bin/stremio --gapplication-service
3+
Exec=/usr/bin/stremio --gapplication-service

data/stremio.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#!/bin/bash
22

3+
export LC_NUMERIC=C
4+
export ANV_DEBUG=video-decode,video-encode
5+
export SERVER_PATH=/usr/libexec/stremio/server.js
6+
37
# Use GSK OpenGL renderer for Nvidia cards
48
if ls /dev/nvidia0 &>/dev/null 2>&1; then
59
export GSK_RENDERER=opengl
610
fi
711

8-
exec /app/libexec/stremio/stremio "$@"
12+
exec /usr/libexec/stremio/stremio "$@"

flatpak/com.stremio.Stremio.Devel.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
"--talk-name=org.kde.StatusNotifierWatcher",
3535
"--own-name=com.stremio.Stremio.Devel",
3636
"--own-name=org.mpris.MediaPlayer2.Stremio",
37-
"--env=LC_NUMERIC=C",
38-
"--env=SERVER_PATH=/app/libexec/stremio/server.js",
39-
"--env=ANV_DEBUG=video-decode,video-encode",
4037
"--env=LD_LIBRARY_PATH=/app/lib:/app/lib64",
4138
"--env=RUST_LOG=debug"
4239
],

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub const DATA_DIR: &str = "stremio";
22

33
pub const GETTEXT_DOMAIN: &str = "stremio";
44
pub const GETTEXT_DIR_DEV: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/po");
5-
pub const GETTEXT_DIR_FLATPAK: &str = "/app/share/locale";
5+
pub const GETTEXT_DIR_FLATPAK: &str = "/usr/share/locale";
66

77
pub const STARTUP_URL: &str = "http://127.0.0.1:11470/proxy/d=https%3A%2F%2Fweb.stremio.com/";
88
pub const IPC_KEY: &str = "LINUX";

0 commit comments

Comments
 (0)