summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ee15b1f06ff2abd3d9618a1bc58ee77518c2203 (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: Rouven Himmelstein <rouvenhimmelstein@gmail.com>

_pkgname=chwp
pkgname=${_pkgname}-git
pkgver=1.239.28
pkgrel=1
pkgdesc="Changes the background wallpaper and lockscreen from the command line."
arch=('x86_64')
url="https://github.com/RouHim/chwp"
license=('GPL-3.0-or-later')
makedepends=('cargo')
provides=('chwp')
conflicts=('chwp')
source=("$_pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$_pkgname/$_pkgname-$pkgver.crate")
sha1sums=('SKIP')

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

build() {
    cd "$srcdir/$_pkgname-$pkgver"

    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

package() {
    cd "$srcdir/$_pkgname-$pkgver"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_pkgname"
}