summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8ac30ad7b826d0a620f90e6b9855e0d12373625f (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
# Maintainer: tarball <bootctl@gmail.com>

pkgname=wormhole-rs-bin
pkgver=0.7.1
pkgrel=1
pkgdesc='Rust implementation of Magic Wormhole, with new features and enhancements'
url='https://github.com/magic-wormhole/magic-wormhole.rs'
arch=(x86_64)
license=(EUPL-1.2)
depends=(glibc gcc-libs)
provides=(magic-wormhole wormhole-rs)
conflicts=(wormhole-rs)

source=("https://raw.githubusercontent.com/magic-wormhole/magic-wormhole.rs/$pkgver/LICENSE")
source_x86_64=("$pkgname-$pkgver-x86_64.tar.gz::$url/releases/download/$pkgver/magic-wormhole-cli-x86_64-unknown-linux-gnu.tgz")

sha256sums=('6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665')
sha256sums_x86_64=('3564df1b0dfc24996edb7c6131c4076e78d1d02efc6230c7c0f6b9d51a18aa73')

prepare() {
  local sh

  for sh in bash fish zsh; do
    ./wormhole-rs completion $sh | sed 's/magic-wormhole-cli/wormhole-rs/g' >comp.$sh
  done
}

package() {
  local bin=wormhole-rs

  install -Dm755 $bin -t "$pkgdir/usr/bin/"
  install -Dm644 comp.bash "$pkgdir/usr/share/bash-completion/completions/$bin"
  install -Dm644 comp.fish "$pkgdir/usr/share/fish/vendor_completions.d/$bin.fish"
  install -Dm644 comp.zsh "$pkgdir/usr/share/zsh/site-functions/_$bin"
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}