-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
42 lines (36 loc) · 1.35 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
# Maintainer: Randal <[email protected]>
# https://github.com/TD-Sky/PKGBUILDs
pkgname=dagtoc
pkgver=5.1.0
pkgrel=1
pkgdesc="A CLI tool for operating pdf contents"
arch=('x86_64')
url="https://github.com/TD-Sky/dagtoc"
license=('GPL3')
provides=("$pkgname")
conflicts=("$pkgname-bin")
makedepends=('cargo')
depends=('fontconfig')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('9d3cd47bebf7216c45286d6b22e38c61aec04e3a6dbe5ae20747b19d005f63c9')
prepare() {
export RUSTUP_TOOLCHAIN=stable
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cd "$pkgname-$pkgver"
cargo build --release --frozen
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
install -Dm 644 "completions/$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname"
install -Dm 644 "completions/_$pkgname" -t "$pkgdir/usr/share/zsh/site-functions"
install -Dm 644 "completions/$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d"
install -Dm 644 "completions/$pkgname.nu" -t "$pkgdir/usr/share/nushell/completions"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}