summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 57b5103216b9af2a9da2ec6ac77d6b7ecb649d2a (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
# Maintainer: jojii <jojii@gmx.net>
pkgname=earbuds
_gitname=LiveBudsCli
pkgver=0.1.9
pkgrel=1
pkgdesc="Control your galaxy buds live via cli"
url="https://github.com/JojiiOfficial/LiveBudsCli"
license=("GPL3")
source=("git+$url#tag=v$pkgver")
md5sums=("SKIP")
arch=("x86_64")
makedepends=("cargo" "git" "bluez" "bluez-libs" "gcc-libs" "glibc")

build() {
    cd $_gitname
    cargo build --release
}

package() {
    cd $_gitname
    usrdir="$pkgdir/usr"
    mkdir -p $usrdir
    install -Dm 755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
    install -Dm 755 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

    ./target/release/${pkgname} --generate=zsh > _${pkgname}
    install -Dm 644 _earbuds "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"

    ./target/release/${pkgname} --generate=fish > ${pkgname}.fish
    install -Dm 644 ${pkgname}.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
}