Skip to content

Commit e6fb216

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

6 files changed

Lines changed: 45 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
image: ubuntu:resolute
1515
options: --privileged
1616
steps:
17-
- name: Install requirements
17+
- name: Install dependencies
1818
run: |
1919
apt-get -y update
2020
apt-get -y install build-essential curl libssl-dev git \
@@ -25,6 +25,19 @@ jobs:
2525
with:
2626
submodules: recursive
2727

28+
- name: Rust setup
29+
uses: dtolnay/rust-toolchain@stable
30+
31+
- name: Build deb package
32+
run: |
33+
cargo install cargo-deb
34+
cargo deb
35+
36+
- name: Upload deb package to release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
files: ./target/debian/*.deb
40+
2841
- name: Python setup
2942
uses: actions/setup-python@v5
3043
with:
@@ -45,6 +58,7 @@ jobs:
4558

4659
- name: Build flatpak package
4760
run: ./flatpak/build.sh
61+
4862
- name: Upload flatpak package to release
4963
uses: softprops/action-gh-release@v2
5064
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)