blob: 114c346764263b6e1bdf261441fb8f68e7e7ea22 (
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
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Contributor: Po-An,Yang(Antonio) <yanganto gmail.com>
pkgname=clipcat
pkgver=0.16.2
pkgrel=2
pkgdesc="A clipboard manager written in Rust Programming Language"
arch=(x86_64)
url="https://github.com/xrelkd/clipcat"
license=(GPL-3.0-only)
depends=(
gcc-libs
glibc
)
makedepends=(
cargo
libgit2
protobuf
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('e784ec4a3799fa003e2d298477d8a627d1e02fdb147136fb245fdf87d34b96d3')
_archive="$pkgname-$pkgver"
prepare() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
for cmd in clipcatd clipcatctl clipcat-menu clipcat-notify; do
"target/release/$cmd" completions bash > "$cmd.bash"
"target/release/$cmd" completions zsh > "$cmd.zsh"
"target/release/$cmd" completions fish > "$cmd.fish"
done
}
check() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features -- \
--skip test_x11_clipboard \
--skip test_x11_primary
}
package() {
cd "$_archive"
install -Dm755 -t "$pkgdir/usr/bin" \
target/release/clipcat-menu \
target/release/clipcat-notify \
target/release/clipcatctl \
target/release/clipcatd
for cmd in clipcatd clipcatctl clipcat-menu clipcat-notify; do
install -Dm644 "$cmd.bash" "$pkgdir/usr/share/bash-completion/completions/$cmd"
install -Dm644 "$cmd.zsh" "$pkgdir/usr/share/zsh/site-functions/_$cmd"
install -Dm644 "$cmd.fish" "$pkgdir/usr/share/fish/completions/$cmd.fish"
done
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md
}
|