-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPKGBUILD
47 lines (36 loc) · 1.21 KB
/
PKGBUILD
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
pkgname="serene-cli"
pkgver=0.1.0
pkgrel=1
pkgdesc="CLI for the serene build server"
arch=(x86_64)
url="https://github.com/VirtCode/serene-aur"
license=(MIT)
depends=()
makedepends=(cargo-nightly)
source=("git+https://github.com/VirtCode/serene-aur.git")
md5sums=('SKIP')
options=(!lto) # see https://github.com/briansmith/ring/issues/1444
# install under serene, not serene-cli
_binary_name="serene"
pkgver() {
cd serene-aur/cli
git describe --long --abbrev=7 --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd serene-aur/cli
export RUSTUP_TOOLCHAIN=nightly
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd serene-aur/cli
export RUSTUP_TOOLCHAIN=nightly
export COMPLETIONS_DIR=$PWD/../completions
cargo build --frozen --release
}
package() {
cd serene-aur
install -Dm0755 -T "target/release/serene-cli" "$pkgdir/usr/bin/$_binary_name"
install -Dm0644 "completions/$_binary_name.bash" "$pkgdir/usr/share/bash-completion/completions/$_binary_name"
install -Dm0644 "completions/$_binary_name.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -Dm0644 "completions/_$_binary_name" -t "$pkgdir/usr/share/zsh/site_functions/"
}