You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB
Bash

# Maintainer : Cole Deck <cole at deck dot sh>
pkgname=asus-nb-ctrl
pkgver=1.0.2
pkgrel=1
pkgdesc="Userspace application to control features of ROG laptops"
arch=('x86_64')
url="https://gitlab.com/asus-linux/asus-nb-ctrl"
license=('MPL2')
provides=()
conflicts=()
depends=('libusb' 'dbus')
makedepends=('rust' 'libusb' 'dbus' 'llvm' 'clang' 'systemd')
source=("${pkgname}-${pkgver}.tar.gz"
"vendor.tar.xz"
"cargo-config")
sha256sums=("SKIP"
"SKIP"
"SKIP")
prepare() {
mv "${srcdir}/vendor" "${srcdir}/${pkgname}-${pkgver}/"
mkdir "${srcdir}/${pkgname}-${pkgver}/.cargo"
mv "${srcdir}/cargo-config" "${srcdir}/${pkgname}-${pkgver}/.cargo/"
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
cargo build --release --locked --all-features --target-dir=target
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -D -m 0755 target/release/asusd ${pkgdir}/usr/bin/asusd
install -D -m 0755 target/release/asusctl ${pkgdir}/usr/bin/asusctl
install -D -m 0644 data/asusd.rules ${pkgdir}/etc/udev/rules.d/90-asusd.rules
install -D -m 0644 data/asusd.conf ${pkgdir}/etc/dbus-1/system.d/asusd.conf
install -D -m 0644 data/asusd.service ${pkgdir}/usr/lib/systemd/system/asusd.service
install -D -m 0644 data/asusd-ledmodes.toml ${pkgdir}/etc/asusd/asusd-ledmodes.toml
}