summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a1bed436277789fde621ba8019068bb95afe3dae (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
# Maintainer: Firegem <mrfiregem [at] protonmail [dot] ch>
pkgname=wpaperd
pkgver=1.0.1
pkgrel=1
pkgdesc='Wallpaper daemon for Wayland.'
arch=('x86_64')
url='https://github.com/danyspin97/wpaperd'
license=('GPL3')
depends=('libxkbcommon' 'mesa' 'wayland')
makedepends=('cargo' 'scdoc')
provides=("${pkgname}")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('4ed30c90dc14fa629ac977ace3ca4a146a33d85f73d2d49915643fbb9ea53ab9')

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

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release
  scdoc <man/wpaperd-output.5.scd >man/wpaperd-output.5
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  # executable
  install -Dm0755 -t "${pkgdir}/usr/bin/" "target/release/${pkgname}"
  # man pages
  install -Dm0644 -t "${pkgdir}/usr/share/man/man5" man/wpaperd-output.5
}