summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: df0c229a9f5f233d8cac8dcfdfe7f97649947b9b (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: Alexander Milchinskiy <milchinskiy at gmail dot com>
pkgname=atomblocks
pkgver=0.2.0
pkgrel=1
pkgdesc="async, absolutely lightweight and dead simple bar for dwm and similar window managers"
arch=('any')
url="https://github.com/milchinskiy/atomblocks"
license=('MIT')
makedepends=(cargo)
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
sha256sums=('0c1694d093d267b7006be2acee5fe71fb42942b715b72eb90fb6c74243f9b1ca')

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

build() {
  cd "$pkgname-$pkgver" || exit
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release --all-features
}

package() {
  cd "$pkgname-$pkgver" || exit
  install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
  install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm0644 -t "$pkgdir/usr/share/$pkgname/" sample/*
}