summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1508b2431201efc450aad7edcd49fb018c7a471d (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
# Maintainer: Colin Woodbury <colin@fosskers.ca>

pkgname=aura
pkgver=4.2.0
pkgrel=1
pkgdesc="A package manager for Arch Linux and its AUR"
url="https://github.com/fosskers/aura"
license=('GPL-3.0-or-later')
arch=("x86_64")
depends=("git" "curl" "openssl" "gcc-libs" "glibc")
makedepends=("cargo")
optdepends=(
    "bash-completion: for bash completions"
    "bat: more featureful file viewing"
    "fd: faster filesystem traversal"
    "graphviz: dependency graph generation"
    "ripgrep: faster log searches"
    "shellcheck: PKGBUILD scanning"
    "xdg-utils: for xdg-open"
)
conflicts=("aura-bin" "aura-git" "aura3-bin")
options=("strip")
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('be62bd488d09b74c21d4780f31f98278bcd0cd001fdc124197caef1a2d132cf4')

prepare() {
    cd "${pkgname}-${pkgver}/rust"
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
    cd "${pkgname}-${pkgver}/rust"
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release

    # Build the `info` page.
    cd "../misc"
    makeinfo aura.texi
}

package() {
    cd "${pkgname}-${pkgver}"

    # Install binary
    install -Dm0755 -t "$pkgdir/usr/bin/" "rust/target/release/aura"

    # Install man and info pages
    install -Dm644 "misc/aura.8" "${pkgdir}/usr/share/man/man8/aura.8"
    install -Dm644 "misc/aura.info" "${pkgdir}/usr/share/info/aura.info"

    # Install bash and zsh completions
    install -Dm644 "misc/completions/bashcompletion.sh" "${pkgdir}/usr/share/bash-completion/completions/aura"
    install -Dm644 "misc/completions/_aura" "${pkgdir}/usr/share/zsh/site-functions/_aura"
    install -Dm644 "misc/completions/aura.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/aura.fish"
}