summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2e344954e42aa1085de623a80f4c94c2295e3828 (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
# Maintainer: Devin Singh <drsingh2518 [at] icloud [dot] com>
pkgname=paper-wl
_pkgname=paper
pkgver=0.1.0
pkgrel=1
pkgdesc='A wallpaper daemon for Wayland compositors implementing the layer-shell protocol.'
arch=('x86_64' 'x86')
url='https://gitlab.com/snakedye/paper'
license=('MIT')
makedepends=('git' 'cargo')
depends=('gcc-libs' 'fontconfig')
source=("git+https://gitlab.com/snakedye/paper.git")
sha256sums=('SKIP')

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

build() {
    cd ${srcdir}/${_pkgname}
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

check() {
    cd ${srcdir}/${_pkgname}
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features
}

package() {
    cd ${srcdir}/${_pkgname}
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${_pkgname}"
    install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md
}