summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 92d3cf358f9e39c339c5ff2d88bcd31351390052 (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
# Maintainer: Static_Rocket

pkgname=asusctl-git
pkgver=6.0.11.r10.g5ab9642
pkgrel=1
pkgdesc="Asus laptop control utilities"
arch=('x86_64')
url="https://gitlab.com/asus-linux/asusctl"
license=('MPL2')
depends=('libusb' 'udev' 'systemd')
optdepends=(
	'libappindicator-gtk3: tray icon'
	'gtk3: control center ui'
)
makedepends=('git' 'cargo' 'clang' 'cmake' 'pango' 'gdk-pixbuf2' 'at-spi2-core' 'gtk3' 'sdl2' 'seatd' 'libinput')
provides=('asusctl')
conflicts=('asusctl')
source=('git+https://gitlab.com/asus-linux/asusctl.git')
md5sums=('SKIP')
_gitdir=${pkgname%"-git"}

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

prepare() {
	cd "$srcdir/$_gitdir"
	export RUSTUP_TOOLCHAIN=stable
	cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
	cd "$srcdir/$_gitdir"
	export RUSTUP_TOOLCHAIN=stable
	make build
}

package() {
	cd "$srcdir/$_gitdir"
	export RUSTUP_TOOLCHAIN=stable
	make DESTDIR="$pkgdir" install
}