blob: d46da64460b10efbd6fc39043cd409ce53ae9966 (
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
|
# Maintainer: Kimiblock Moe
# Contributor: arenekosreal
pkgname=autopush-rs
pkgver=1.83.1
pkgrel=1
pkgdesc="Push Server in Rust"
arch=('x86_64')
provides=('autopush' 'autopush-rs' 'sunup-server')
conflicts=('autopush' 'autopush-rs' 'sunup-server')
url="https://github.com/mozilla-services/autopush-rs"
license=('MPL-2.0')
depends=('libgcc' 'glibc' 'openssl' 'grpc' 'zstd' 'python' 'python-cryptography')
makedepends=('rust' 'git' 'clang')
optdepends+=(redis google-cloud-cli postgresql)
options=(!lto)
source=("git+$url.git#tag=${pkgver}")
sha256sums=('7cfe2520cc752c457b88c88cb99c8462457282e8233a47f68f0ff5c6463470e4')
prepare() {
export RUSTUP_TOOLCHAIN=stable
cd "$srcdir/autopush-rs"
cargo fetch --locked --target host-tuple
}
build() {
export RUSTUP_TOOLCHAIN=stable
export ZSTD_SYS_USE_PKG_CONFIG=1
export GRPCIO_SYS_USE_PKG_CONFIG=1
CXXFLAGS+=" -include assert.h -DGPR_ASSERT=assert"
cd "$srcdir/autopush-rs"
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
package() {
cd "$srcdir/autopush-rs"
find \
target/release \
-maxdepth 1 \
-executable \
-type f \
-exec \
install -vDm755 -t "${pkgdir}/usr/bin" {} +
install -vDm755 scripts/autokey.py "${pkgdir}/usr/bin/autokey"
install -vDm755 "target/release/autoconnect" "${pkgdir}/usr/bin/autoconnect"
install -vDm755 "target/release/autoendpoint" -t "${pkgdir}/usr/bin/"
install -vDm644 \
-t "${pkgdir}/usr/share/doc/${pkgname}" \
configs/autoconnect.toml.sample \
configs/autoendpoint.toml.sample
sed -i \
'1 i #!/usr/bin/python' \
"${pkgdir}/usr/bin/autokey"
# These are missing
#install -Dm755 "target/release/endpoint_diagnostic" -t "$pkgdir/usr/bin/"
#install -Dm755 "target/release/autokey" -t "$pkgdir/usr/bin/"
}
|