summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5347a8bb5cb6aa0c8303e65916cdfdfbfc35e1d3 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: txtsd <aur.archlinux@ihavea.quest>

pkgname=stevenarella-git
_pkgname=stevenarella
pkgver=r999.gecf829c
pkgrel=1
pkgdesc='Multi-protocol Minecraft-compatible client written in Rust'
arch=(x86_64)
url='https://github.com/iceiix/stevenarella'
license=('Apache-2.0 AND MIT')
depends=(
  openssl
  xcb-util
  gcc-libs
  libxcb
  glibc
  freetype2
  fontconfig
)
makedepends=(
  cmake
  rust
  git
)
source=('git+https://github.com/iceiix/stevenarella.git')
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"

  echo r$(git rev-list --all --count).g$(git rev-parse --short HEAD)
}

prepare() {
  cd "${_pkgname}"

  export RUSTUP_TOOLCHAIN=stable
  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  cd "${_pkgname}"

  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release
}

check() {
  cd "${_pkgname}"

  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo test --frozen --release
}

package() {
  cd "${_pkgname}"

  install -Dm755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
  install -Dm644 LICENSE-APACHE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-APACHE"
  install -Dm644 LICENSE-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT"
  install -Dm644 resources/icon128x128.png "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
}