summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bac9f240bc62ab52e46c51186620c83b84c936cf (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
# Maintainer: Igor Kalishevskii <lilo.panic@gmail.com>
pkgname=led_matrix_daemon
pkgver=0.1.0
pkgrel=1
pkgdesc="A daemon that renders images on a LED matrix connected to a Framework 16 Laptop"
arch=('x86_64')
url="https://github.com/night-crawler/$pkgname"
license=('MIT')
depends=()
makedepends=('rust' 'clang')
source=("$pkgname-$pkgver.tar.gz::https://github.com/night-crawler/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('SKIP')

build() {
  cd "$pkgname-$pkgver"
  export RUSTUP_TOOLCHAIN=nightly
  export RUSTFLAGS="--cfg tokio_unstable --cfg=tokio_unstable"
  export CC=clang
  cargo build --release --locked
}

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

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

  install -Dm644 "$srcdir/$pkgname-$pkgver/led_matrix_daemon.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
  install -Dm644 "$srcdir/$pkgname-$pkgver/led_matrix_daemon.socket" "$pkgdir/usr/lib/systemd/system/$pkgname.socket"
  install -Dm644 "$srcdir/$pkgname-$pkgver/test_data/config.toml" "$pkgdir/etc/led_matrix/daemon.toml"

  install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md"
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}