blob: e4a08f7243e3829e5b87ec9dc6858f4f6236d5d5 (
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
|
# Maintainer: orhun <orhunparmaksiz@gmail.com>
# https://github.com/orhun/pkgbuilds
pkgname=dotter-rs
_pkgname=dotter
pkgver=0.13.3
pkgrel=1
pkgdesc="A dotfile manager and templater written in Rust"
arch=('x86_64')
url="https://github.com/SuperCuber/dotter"
license=('Unlicense')
conflicts=("$_pkgname")
depends=('gcc-libs')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('784c1ecd55a9b5a505f0e31255bf1414d68d96a30964ed704450bd9a45e5076c16ca9aac7b649c304ef0e38962133eb06a74dfc9703a7e3f3489cace94967ae5')
prepare() {
cd "$_pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
mkdir completions
}
build() {
cd "$_pkgname-$pkgver"
cargo build --release --frozen
local _completion="target/release/$_pkgname gen-completions --shell"
$_completion bash > "completions/$_pkgname"
$_completion fish > "completions/$_pkgname.fish"
$_completion zsh > "completions/_$_pkgname"
}
check() {
cd "$_pkgname-$pkgver"
cargo test --frozen
}
package() {
cd "$_pkgname-$pkgver"
install -Dm 755 "target/release/$_pkgname" -t "$pkgdir/usr/bin"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 "completions/$_pkgname" -t "$pkgdir/usr/share/bash-completion/completions/"
install -Dm 644 "completions/$_pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -Dm 644 "completions/_$_pkgname" -t "$pkgdir/usr/share/zsh/site-functions/"
}
|