-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathCargo.toml
More file actions
171 lines (144 loc) · 5.6 KB
/
Cargo.toml
File metadata and controls
171 lines (144 loc) · 5.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Copyright (C) 2017-2026 Smart Code OOD 203358507
[package]
name = "stremio-service"
version = "0.1.21"
edition = "2021"
authors = ["Stremio"]
description = "Stremio service - Freedom to Stream"
license = "GPL-2.0"
homepage = "https://stremio.com"
repository = "https://github.com/Stremio/stremio-service/"
readme = "README.md"
default-run = "stremio-service"
[package.metadata.server]
version = "v4.20.17"
[features]
default = []
# Weather or not we're running the app in a bundled (installed) mode.
#
# The binary location for "bundled" is system-wide, while non-bundled
# is locally inside `target/` and binaries paths will be based on
# the Cargo.toml location.
bundled = []
# Will not download anything while building
offline-build = []
[dependencies]
# for MacOS application bundling
cargo_toml = "0.22"
# CLI
clap = { version = "4.0", features = ["derive"] }
# Errors
anyhow = "1"
# Async executor
tokio = { version = "1.27", features = ["fs", "macros", "rt-multi-thread"] }
# Logging
env_logger = "0.10"
log = "0.4"
# Home dir
dirs = "5.0"
fslock = "0.2"
image = "0.24"
once_cell = "1.16"
# Updater
semver = "1.0"
# Open default app
open = "4.1"
# http calls
reqwest = { version = "0.11", features = ["stream", "json"] }
serde = { version = "1", features = ["derive"] }
futures-util = "0.3"
serde_json = "1"
sha2 = "0.10"
hex = "0.4"
rand = "0.8"
url = { version = "2.3", features = ["serde"] }
urlencoding = "2.1"
zip-extract = "0.1"
tao = "0.32.8"
tray-icon = { version = "0.20.0", default-features = false }
[target.'cfg(target_os = "linux")'.dependencies]
ashpd = "0.11"
[target.'cfg(target_os = "macos")'.dependencies]
# MacOS Apple Events handling
fruitbasket = "0.10"
[target.'cfg(target_os = "windows")'.build-dependencies]
winres = "0.1"
winres-edit = "0.1.0"
chrono = "0.4"
ico = "0.3.0"
[build-dependencies]
bytes = "1.0"
flate2 = "1.0"
reqwest = { version = "0.11", features = ["blocking"] }
tar = "0.4"
xz = "0.1.0"
zip-extract = "0.1"
url = { version = "2.3" }
once_cell = "1.16"
serde = "1"
# For getting the Server.js version from this Cargo.toml file
cargo_toml = "0.22"
[dev-dependencies]
walkdir = "2.3.3"
regex = "1.8.3"
chrono = "0.4"
[profile.release]
opt-level = 3
lto = true
strip = "debuginfo"
[package.metadata.deb]
copyright = "Copyright (C) 2017-2026 Smart Code OOD 203358507"
extended-description = "Media Center"
# depends = "$auto, ffprobe (>=4.2.7)"
depends = "$auto"
section = "Stremio;Media;Play;"
priority = "optional"
assets = [
["resources/stremio-service", "/usr/bin/stremio-service", "755"],
["target/release/stremio-service", "/usr/share/stremio-service/stremio-service", "755"],
["resources/bin/linux/stremio-runtime", "/usr/share/stremio-service/stremio-runtime", "755"],
# We use a specific version of ffmpeg-jellyfin
["resources/bin/linux/ffmpeg", "/usr/share/stremio-service/ffmpeg", "755"],
["resources/bin/linux/ffprobe", "/usr/share/stremio-service/ffprobe", "755"],
["resources/bin/linux/server.js", "/usr/share/stremio-service/server.js", "755"],
["LICENSE.md", "/usr/share/licenses/stremio-service/LICENSE.md", "644"],
["resources/com.stremio.service.desktop", "/usr/share/applications/com.stremio.service.desktop", "644"],
["resources/com.stremio.service.metainfo.xml", "/usr/share/metainfo/com.stremio.service.metainfo.xml", "644"],
["resources/com.stremio.service.svg", "/usr/share/icons/hicolor/scalable/apps/com.stremio.service.svg", "644"],
]
features = ["bundled"]
[package.metadata.generate-rpm]
# post_install_script = "gnome_version=$(gnome-shell --version | awk '{print $NF}') && echo https://extensions.gnome.org/extension-data/appindicatorsupportrgcjonas.gmail.com.GNOME_VERSION.shell-extension.zip | sed -e s/GNOME_VERSION/$gnome_version/g"
assets = [
{ source = "resources/stremio-service", dest = "/usr/bin/stremio-service", mode = "755" },
{ source = "target/release/stremio-service", dest = "/usr/share/stremio-service/stremio-service", mode = "755" },
{ source = "resources/bin/linux/stremio-runtime", dest = "/usr/share/stremio-service/stremio-runtime", mode = "755" },
{ source = "resources/bin/linux/ffmpeg", dest = "/usr/share/stremio-service/ffmpeg", mode = "755" },
{ source = "resources/bin/linux/ffprobe", dest = "/usr/share/stremio-service/ffprobe", mode = "755" },
{ source = "resources/bin/linux/server.js", dest = "/usr/share/stremio-service/server.js", mode = "755" },
{ source = "LICENSE.md", dest = "/usr/share/licenses/stremio-service/LICENSE.md", mode = "644" },
{ source = "resources/com.stremio.service.desktop", dest = "/usr/share/applications/com.stremio.service.desktop", mode = "644" },
{ source = "resources/com.stremio.service.metainfo.xml", dest = "/usr/share/metainfo/com.stremio.service.metainfo.xml", mode = "644" },
{ source = "resources/com.stremio.service.svg", dest = "/usr/share/icons/hicolor/scalable/apps/com.stremio.service.svg", mode = "644" },
]
# depends = "$auto, ffprobe (>=4.2.7)"
features = ["bundled"]
[package.metadata.generate-rpm.requires]
libappindicator-gtk3 = "*"
# ffprobe = ">=4.2.7"
[package.metadata.macos]
name = "StremioService"
display_name = "Stremio Service"
identifier = "com.stremio.service"
icon = ["resources/service.icns", "StremioService.icns"]
copyright = "Copyright (C) 2017-2026 Smart Code OOD 203358507"
url_scheme = "stremio"
executable = "stremio-service"
bins = [
["target/release/stremio-service", "stremio-service"],
["resources/bin/macos/stremio-runtime", "stremio-runtime"],
["resources/bin/macos/server.js", "server.js"],
["resources/bin/macos/ffmpeg", "ffmpeg"],
["resources/bin/macos/ffprobe", "ffprobe"],
["LICENSE.md", "LICENSE.md"]
]