summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a070a0a5c560e2e5b692fa2112ea046791a391b (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: Saul Fautley <saulfautley@gmail.com>
pkgname=wctx
pkgver=1.0.2
pkgrel=1
pkgdesc="Real-time window context info for Wayland and X11"
arch=('x86_64')
url="https://github.com/slightlyfaulty/wctx"
license=('MIT')
depends=()
makedepends=('rust' 'cargo')
options=('!strip' '!debug')
source=("$pkgname-$pkgver.tar.gz::https://github.com/slightlyfaulty/wctx/archive/v$pkgver.tar.gz")
sha256sums=('580df72ef0ae0f06b98622a4d5cffbc629ce64205432cc561417b45b2357b2eb')

prepare() {
  cd "$pkgname-$pkgver"
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

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

package() {
  cd "$pkgname-$pkgver"
  install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 "wctx.service" "$pkgdir/usr/lib/systemd/user/wctx.service"
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}