blob: 4d86259c14f0062a507d598f2e19d2d0ffb4b253 (
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
|
# Maintainer: orhun <orhunparmaksiz@gmail.com>
# https://github.com/orhun/pkgbuilds
pkgname=dotter-rs-git
_pkgname=dotter
pkgver=0.13.2.r0.g4ca49da
pkgrel=1
pkgdesc="A dotfile manager and templater written in Rust (git)"
arch=('x86_64')
url="https://github.com/SuperCuber/dotter"
license=('Unlicense')
makedepends=('cargo' 'git')
conflicts=("$_pkgname" "${pkgname%-git}")
depends=('gcc-libs')
provides=("${pkgname%-git}")
source=("git+${url}")
sha512sums=('SKIP')
pkgver() {
cd "$_pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$_pkgname"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
mkdir completions
}
build() {
cd "$_pkgname"
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"
cargo test --frozen
}
package() {
cd "$_pkgname"
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/"
}
|