blob: 91577ab7f151aea88a0fd3fc44b64b002bfa3bb4 (
plain)
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
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=gmv-rs
_name=${pkgname%-rs}
pkgver=0.1
pkgrel=1
pkgdesc="This is a video surveillance implementation based on GB28181: compatible with 2016 and 2022 versions."
arch=($CARCH)
url="https://github.com/epimore/gmv"
license=('Apache-2.0')
provides=(
${_name}
gmv-session
gmv-stream
)
conflicts=(
${_name}
gmv-session
gmv-stream
)
replaces=()
depends=(
gcc-libs
glibc
systemd-libs)
makedepends=(
cargo
cmake
openssl
pkgconf)
backup=()
options=(!lto !debug)
install=
source=("${_name}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('b5d08b615c17b87a6d3c9aea2ff9c0359d20def61867bcc6ab2fac3531bd2ef5')
prepare() {
cd "${srcdir}/${_name}-${pkgver}"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "${srcdir}/${_name}-${pkgver}/"
sed -i 's|/home/ubuntu20/code/rs/mv/github/epimore/gmv/session/config.yml|/etc/gmv/session/config.yml|g' session/src/storage/entity.rs
sed -i 's|/home/ubuntu20/code/rs/mv/github/epimore/gmv/session/config.yml|/etc/gmv/session/config.yml|g' session/src/storage/mapper.rs
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
# cargo build --release --all-features
# CFLAGS+=" -ffat-lto-objects"
# --features 'cli,ftdi' \
cargo build \
--offline \
--locked \
--release
}
# check() {
# cd "${srcdir}/${pkgname}/"
#
# export RUSTUP_TOOLCHAIN=stable
# cargo test --all-features
# }
package() {
cd "${srcdir}/${_name}-${pkgver}/"
export RUSTUP_TOOLCHAIN=stable
cargo install --no-track --all-features --root "$pkgdir/usr/" --path .
install -Dm0644 session/config.yml "${pkgdir}/etc/gmv/session/config.yml"
install -Dm0644 stream/readme "${pkgdir}/usr/share/doc/gmv/stream/readme"
# find target/release \
# -maxdepth 1 \
# -executable \
# -type f \
# -exec install -Dm0755 -t "$pkgdir/usr/bin/" {} +
}
|