summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6674337bed45b9f58cacea96d7cd2db1d4c2bee6 (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.6
pkgrel=2
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=bash > ${pkgname}.fish
    install -Dm 644 ${pkgname}.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
}