summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e0b87b5041a97ab59190c8d15a9674492fb058b (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
# Maintainer: Fabien Devaux <fdev31@gmail.com>
# Contributor: Fabien Devaux <fdev31@gmail.com>
pkgname=wlr-layout-ui-git
pkgver=r79.7aecc75
pkgrel=3
pkgdesc="GUI to configure your screens"
arch=(any)
url="https://github.com/fdev31/wlr-layout-ui"
license=('MIT')
groups=()
depends=('python' 'python-pyglet' 'python-tomli-w' 'python-tomli')
optdepends=('wlr-randr: To apply the configuration on other wlroots systems'
    'hyprland: To apply the configuration on Hyprland (recommended)',
    'xrandr: To apply the configuration on X11')
makedepends=('git' 'python-build' 'python-installer' 'python-poetry')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=(git+"https://github.com/fdev31/wlr-layout-ui.git#branch=main")
noextract=()
md5sums=('SKIP')

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

build() {
	cd "$srcdir/${pkgname%-git}"
    python -m build --wheel --no-isolation
}

package() {
	cd "$srcdir/${pkgname%-git}"
	python -m installer --destdir="$pkgdir" dist/*.whl

    install -Dm644 "${srcdir}/wlr-layout-ui/files/wlr-layout-ui.desktop"\
            "${pkgdir}/usr/share/applications/wlr-layout-ui.desktop"
}