summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e61cbe51b1b9465f186b94fc825a13bb781586e8 (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
# Maintainer: Alessandro Pezzato <alessandro@pezzato.net>

pkgname=lavagna
pkgver=2.1.8
pkgrel=2
pkgdesc='A collaborative blackboard, ideal for simple sketches during online meetings'
arch=(x86_64)
url='https://github.com/alepez/lavagna'
license=(APACHE MIT)
source=("$pkgname-$pkgver.tar.gz::https://github.com/alepez/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('406f313876c551f4ea811be0fa80478c4ec4d020ac86d6516518d9d60e63a9ab')

prepare() {
  cd "$pkgname-$pkgver"

  cargo fetch --target="$CARCH-unknown-linux-gnu"
}

build() {
  cd "$pkgname-$pkgver"

  export RUSTUP_TOOLCHAIN=stable
  export RUSTFLAGS="--remap-path-prefix=$(pwd)="
  export CARGO_TARGET_DIR=target

  cargo build --release
}

check() {
  cd "$pkgname-$pkgver"

  export RUSTUP_TOOLCHAIN=stable

  cargo test
}

package() {
  cd "$pkgname-$pkgver"

  # Executable
  install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"

  # Licenses
  install -Dm644 LICENSE-APACHE "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
  install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
}