summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 677b2d45c3f6a74291295371cfdbdcd3ac75c783 (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
# Maintainer: jzbor <zborof at posteo dot de>
pkgname=marswm-git
pkgver=0.4.0.r4.gd0ca669
pkgrel=1
pkgdesc="A rusty successor to moonwm"
arch=('x86_64')
url="https://github.com/jzbor/marswm"
license=('custom')
depends=(libxrandr libx11 libxft libxinerama xmenu)
makedepends=('cargo')
provides=(marswm mars-relay)
conflicts=(marswm mars-relay)
source=("git+$url")
sha512sums=('SKIP')

pkgver() {
	cd "${pkgname%-git}"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${pkgname%-git}"
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd "${pkgname%-git}"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
}

package() {
    cd "${pkgname%-git}"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%-git}"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%wm-git}-relay"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%wm-git}bar"
}