summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d49ebfb3d659df440b900a97dd0a0f20eb38fd2e (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Maintainer: edwloef
# Maintainer: may

pkgname=mayland-git
_pkgname=mayland
pkgver=r197.40b0f27
pkgrel=1
pkgdesc="a bad wayland compositor"
arch=('x86_64')
url="https://github.com/m4rch3n1ng/mayland"
license=('GPL-3.0-or-later')
depends=(
	'gcc-libs'
	'glib2'
	'glibc'
	'libcap'
	'libdisplay-info'
	'libdrm'
	'libevdev'
	'libffi'
	'libinput'
	'libx11'
	'libxcb'
	'libxkbcommon'
	'llvm-libs'
	'mesa'
	'seatd'
	'wayland'
)
optdepends=(
	'kitty: the default terminal emulator'
)
makedepends=('cargo')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("git+https://github.com/m4rch3n1ng/mayland.git")
sha256sums=(SKIP)

pkgver() {
	cd "${_pkgname}"
	
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "${_pkgname}"
	
	export RUSTUP_TOOLCHAN=stable
	cargo fetch --locked
}

build() {
	cd "${_pkgname}"
	
	export RUSTUP_TOOLCHAIN=stable
	cargo build --release --frozen
	cargo build -p mayctl --release --frozen
}

package() {
	cd "${_pkgname}"

	install -Dm755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
	install -Dm755 "target/release/mayctl" "${pkgdir}/usr/bin/mayctl"
	install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	install -Dm644 "resources/mayland.desktop" "${pkgdir}/usr/share/wayland-sessions/mayland.desktop"
	install -Dm644 "resources/mayland.mf" "${pkgdir}/usr/share/mayland/mayland.mf"
}