summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e059fdc5548efe8354a36febfcd4dff4edfeade (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: hecate <aur hecate space>
pkgname=pandora-git
pkgver=1.0.0
pkgrel=1
pkgdesc="a parallax-scrolling wallpaper and lockscreen daemon for wayland compositors"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://github.com/pandorasfox/pandora"
license=('GPL-2.0')
depends=()
makedepends=(cargo git sed)
checkdepends=()
optdepends=(niri)
provides=(pandora)
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=('git+https://github.com/PandorasFox/pandora.git#branch=release')
noextract=()
sha256sums=('SKIP')
validpgpkeys=()

prepare() {
    export RUSTUP_TOOLCHAIN=stable
	pushd "$srcdir/pandora"
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
	popd
}

build() {
	export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
	pushd "$srcdir/pandora"
    cargo build --frozen --release --all-features
	popd
}

check() {
	export RUSTUP_TOOLCHAIN=stable
	pushd "$srcdir/pandora"
    cargo test --frozen --all-features
	popd
}

package() {
	install -Dm0755 -t "$pkgdir/usr/bin/" "$srcdir/pandora/target/release/pandora"
	install -Dm0755 -t "$pkgdir/usr/share/doc/pandora/" "$srcdir/pandora/sample files/pandora.service"
	sed -i -e "s|%h/.cargo|/usr|" "$pkgdir/usr/share/doc/pandora/pandora.service"
}