summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4a3b49a060dfa6484a4d22ac92bd834b8394c502 (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
# Maintainer: Henil <henil2911 + aur at gmail <.> com>
pkgname=zellij-git
_pkgname=zellij
pkgver=r833.f1bff23
_pkgver=0.1
pkgrel=1
epoch=
pkgdesc="A terminal workspace with batteries included"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://www.github.com/zellij-org/zellij"
license=('MIT')
groups=()
depends=()
makedepends=('rustup' 'cargo' 'git' 'binaryen')
checkdepends=()
optdepends=()
provides=('zellij')
conflicts=('zellij')
options=()
source=("git+https://github.com/zellij-org/zellij")
sha256sums=(SKIP)

build() {
    cd "$srcdir/$_pkgname"
    cargo install --force cargo-make
    cargo make install ./zellij
    mkdir -p assets/completions
    ./zellij setup --generate-completion bash > assets/completions/zellij.bash
    ./zellij setup --generate-completion fish > assets/completions/zellij.fish
    ./zellij setup --generate-completion zsh > assets/completions/_zellij
}

package() {
    cd "$srcdir/$_pkgname"
    mkdir -p "${pkgdir}/usr/local/share/doc/zellij"
    install -Dm755 ./zellij "${pkgdir}/usr/local/bin/zellij"
    install -Dm644 GOVERNANCE.md "${pkgdir}/usr/local/share/doc/zellij/GOVERNANCE.md"
    install -Dm644 README.md "${pkgdir}/usr/local/share/doc/zellij/README.md"
    install -Dm644 assets/man/zellij.1 "${pkgdir}/usr/local/man/man1/zellij.1"
    install -Dm644 assets/completions/zellij.bash "${pkgdir}/usr/local/share/bash-completion/completions/zellij"
    install -Dm644 assets/completions/zellij.fish "${pkgdir}/usr/local/share/fish/completions/zellij.fish"
    install -Dm644 assets/completions/_zellij "${pkgdir}/usr/local/share/zsh/site-functions/_zellij"
}

pkgver() {
    cd "$srcdir/$_pkgname"
    printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}