-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
73 lines (65 loc) · 2.12 KB
/
Cargo.toml
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
[package]
name = "chirpstack-pulsar-integration"
description = "Apache Pulsar integration for ChirpStack"
repository = "https://github.com/chirpstack/chirpstack-pulsar-integration"
homepage = "https://www.chirpstack.io/"
version = "4.0.0-test.3"
authors = ["Orne Brocaar <info@brocaar.com>"]
edition = "2021"
publish = false
license = "MIT"
[dependencies]
clap = { version = "4.4", features = ["derive"] }
pulsar = { version = "6.0" }
anyhow = "1.0"
tracing = "0.1"
async-trait = "0.1.73"
chirpstack_api = "4.5"
chirpstack_integration = "4.5"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.32", features = ["macros", "rt-multi-thread"] }
handlebars = "4.4"
serde_json = "1.0"
toml = "0.7"
[dev-dependencies]
regex = "1.9"
futures = "0.3"
# Debian packaging.
[package.metadata.deb]
assets = [
[
"target/release/chirpstack-pulsar-integration",
"usr/bin/",
"755",
],
[
"configuration/chirpstack-pulsar-integration.toml",
"etc/chirpstack-pulsar-integration/",
"640",
],
]
conf-files = [
"/etc/chirpstack-pulsar-integration/chirpstack-pulsar-integration.toml",
]
suggests = "chirpstack, redis"
maintainer-scripts = "debian/"
systemd-units = { enable = true }
# RPM packaging.
[package.metadata.generate-rpm]
auto-req = "no"
pre_install_script = '''
id chirpstack &>/dev/null
if [[ $? -ne 0 ]]; then
useradd --system -U -M chirpstack -s /bin/false -d /etc/chirpstack
fi
'''
post_install_script = '''
chown -R chirpstack:chirpstack /etc/chirpstack-pulsar-integration
chmod 750 /etc/chirpstack-pulsar-integration
chmod 640 /etc/chirpstack-pulsar-integration/chirpstack-pulsar-integration.toml
'''
assets = [
{ source = "target/release/chirpstack-pulsar-integration", dest = "/usr/bin/chirpstack-pulsar-integration", mode = "755" },
{ source = "configuration/chirpstack-pulsar-integration.toml", dest = "/etc/chirpstack-pulsar-integration/chirpstack-pulsar-integration.toml" },
{ source = "rpm/chirpstack-pulsar-integration.service", dest = "/lib/systemd/system/chirpstack-pulsar-integration.service" },
]