blob: 4dece4caf7809979f315677fa197e58c2d4785af (
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
|
# Maintainer: sommerfeld <sommerfeld@sommerfeld.dev>
pkgname=sentrum
pkgver=0.1.9
pkgrel=1
pkgdesc="Daemon that monitors watch-only bitcoin wallets"
arch=('any')
url="https://github.com/sommerfelddev/$pkgname"
license=('MIT')
depends=('gcc-libs' 'glibc' 'openssl')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('f47399dceff58d891a9b914649afae37b7709464b10fb15766125eac478ec68d')
backup=("etc/$pkgname/$pkgname.toml")
options=('!lto')
prepare() {
export RUSTUP_TOOLCHAIN=stable
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cd "$pkgname-$pkgver"
cargo build --frozen --release --all-features
}
check() {
export RUSTUP_TOOLCHAIN=stable
cd "$pkgname-$pkgver"
cargo test --frozen --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -Dm644 "contrib/systemd/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "contrib/systemd/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -Dm644 "contrib/systemd/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
install -Dm644 "$pkgname.sample.toml" "$pkgdir/etc/$pkgname/$pkgname.toml"
install -Dm644 "man/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
install -Dm644 "LICENSE.txt" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE.txt"
}
|