blob: 2ca102a8aa20b111b32de0039f2fe641ae33b810 (
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: SelfRef <arch@selfref.dev>
_pkgbase=conflux
pkgname="$_pkgbase"
pkgver=1.1.0
pkgrel=1
pkgdesc='Background file-sync daemon syncing local directories to multiple remotes'
arch=('x86_64' 'aarch64')
url='https://github.com/SelfRef/conflux'
license=('GPL-3.0-or-later')
depends=('gcc-libs' 'glibc' 'openssl' 'zlib')
makedepends=('cargo' 'git')
provides=("$_pkgbase")
conflicts=("$_pkgbase")
options=('!lto')
backup=('etc/conflux/config.toml')
source=("$_pkgbase::git+https://github.com/SelfRef/conflux.git#tag=v$pkgver")
sha256sums=('dfcdb23d452c46e4a8edcfa699185375fc90b5ba3817187238ba8f0d59c840e3')
prepare() {
cd "$_pkgbase"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$_pkgbase"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --bin conflux
}
check() {
cd "$_pkgbase"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --workspace
}
package() {
cd "$_pkgbase"
install -Dm0755 "target/release/$_pkgbase" "$pkgdir/usr/bin/$_pkgbase"
install -Dm0644 config.example.toml "$pkgdir/etc/conflux/config.toml"
install -Dm0644 systemd/conflux.user.service "$pkgdir/usr/lib/systemd/user/conflux.service"
install -Dm0644 systemd/conflux@.user.service "$pkgdir/usr/lib/systemd/user/conflux@.service"
install -Dm0644 systemd/conflux.system.service "$pkgdir/usr/lib/systemd/system/conflux.service"
install -Dm0644 systemd/conflux@.system.service "$pkgdir/usr/lib/systemd/system/conflux@.service"
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|