aboutsummaryrefslogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD13
1 files changed, 13 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fd586f7..affda47 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,12 +10,20 @@ url="https://github.com/sornas/mum.git"
license=('MIT')
sha256sums=('SKIP')
depends=('alsa-lib' 'opus' 'openssl')
+optdepends=('bash: for tab-completions',
+ 'fish: for tab-completions',
+ 'zsh: for tab-completions')
makedepends=('git' 'rust')
source=("git+$url")
build() {
cd "${srcdir}/${pkgname%-git}"
+
cargo build --release --target-dir=target
+
+ which bash &>/dev/null && ./target/release/mumctl completions --bash > mumctl.bash
+ which fish &>/dev/null && ./target/release/mumctl completions --fish > mumctl.fish
+ which zsh &>/dev/null && ./target/release/mumctl completions --zsh > mumctl.zsh
}
check() {
@@ -25,6 +33,11 @@ check() {
package() {
cd "${srcdir}/${pkgname%-git}"
+
+ which bash &>/dev/null && install -Dm 755 mumctl.bash "${pkgdir}/usr/share/bash-completion/completions/mumctl"
+ which fish &>/dev/null && install -Dm 755 mumctl.fish "${pkgdir}/usr/share/fish/completions/mumctl.fish"
+ which zsh &>/dev/null && install -Dm 755 mumctl.zsh "${pkgdir}/usr/share/zsh/site-functions/_mumctl"
+
install -Dm 755 target/release/mumctl -t "${pkgdir}/usr/bin"
install -Dm 755 target/release/mumd -t "${pkgdir}/usr/bin"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"