Add asusctl as well
This commit is contained in:
1 parent
ec925e695f
commit
649a4cc058
1 file changed
+107
@@ -0,0 +1,107 @@
|
|||||||
|
# Maintainer: Fabian Bornschein <fabiscafe@archlinux.org>
|
||||||
|
# Contributor: Static_Rocket
|
||||||
|
|
||||||
|
pkgbase=asusctl
|
||||||
|
pkgname=(
|
||||||
|
asusctl
|
||||||
|
rog-control-center
|
||||||
|
)
|
||||||
|
pkgver=6.3.0
|
||||||
|
pkgrel=0.1
|
||||||
|
pkgdesc="A control daemon, tools, and a collection of crates for interacting with ASUS ROG laptops"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://asus-linux.org"
|
||||||
|
license=('MPL-2.0')
|
||||||
|
makedepends=(
|
||||||
|
clang
|
||||||
|
cmake
|
||||||
|
fontconfig
|
||||||
|
git
|
||||||
|
hicolor-icon-theme
|
||||||
|
libayatana-appindicator
|
||||||
|
libinput
|
||||||
|
libusb
|
||||||
|
rust
|
||||||
|
seatd
|
||||||
|
systemd
|
||||||
|
)
|
||||||
|
source=("git+https://gitlab.com/asus-linux/asusctl.git#tag=$pkgver")
|
||||||
|
b2sums=('de40238765e4e6af8abf57c12fc2a503ff1da320c935b90c5eecaa2a98ac8fd4fbe9b0e05d93d109651a2c2d7b13cb882ee29386fcd6d62db968520b565d0480')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${pkgbase}"
|
||||||
|
|
||||||
|
# Keep rust/cargo build-dependency management inside the build directory
|
||||||
|
export CARGO_HOME="${srcdir}/cargo"
|
||||||
|
|
||||||
|
# Follow Rust package guidelines
|
||||||
|
## https://wiki.archlinux.org/title/Rust_package_guidelines
|
||||||
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
|
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${pkgbase}"
|
||||||
|
|
||||||
|
# Keep rust/cargo build-dependency management inside the build directory
|
||||||
|
export CARGO_HOME="${srcdir}/cargo"
|
||||||
|
|
||||||
|
# Follow Rust package guidelines
|
||||||
|
## https://wiki.archlinux.org/title/Rust_package_guidelines
|
||||||
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
|
export CARGO_TARGET_DIR=target
|
||||||
|
|
||||||
|
make build
|
||||||
|
}
|
||||||
|
|
||||||
|
package_asusctl() {
|
||||||
|
pkgdesc="${pkgdesc/tools/CLI tools}"
|
||||||
|
depends=(
|
||||||
|
gcc-libs
|
||||||
|
glibc
|
||||||
|
libusb
|
||||||
|
systemd
|
||||||
|
systemd-libs
|
||||||
|
)
|
||||||
|
conflicts=(gnome-shell-extension-asusctl-gnome)
|
||||||
|
install=asusctl.install
|
||||||
|
optdepends=(
|
||||||
|
'acpi_call: fan control'
|
||||||
|
'asusctltray: tray profile switcher'
|
||||||
|
'rog-control-center: app to control asusctl'
|
||||||
|
'supergfxctl: hybrid GPU control'
|
||||||
|
)
|
||||||
|
|
||||||
|
cd "${pkgbase}"
|
||||||
|
export CARGO_HOME="${srcdir}/cargo"
|
||||||
|
make DESTDIR="${pkgdir}" \
|
||||||
|
install-asusctl \
|
||||||
|
install-asusd \
|
||||||
|
install-asusd_user \
|
||||||
|
install-data-asusd \
|
||||||
|
install-data-asusd_user
|
||||||
|
}
|
||||||
|
|
||||||
|
package_rog-control-center() {
|
||||||
|
depends=(
|
||||||
|
asusctl
|
||||||
|
fontconfig
|
||||||
|
freetype2
|
||||||
|
gcc-libs
|
||||||
|
glibc
|
||||||
|
hicolor-icon-theme
|
||||||
|
libayatana-appindicator
|
||||||
|
libinput
|
||||||
|
libxkbcommon
|
||||||
|
mesa
|
||||||
|
seatd
|
||||||
|
systemd-libs
|
||||||
|
)
|
||||||
|
pkgdesc="App to control asusctl"
|
||||||
|
|
||||||
|
cd "${pkgbase}"
|
||||||
|
export CARGO_HOME="${srcdir}/cargo"
|
||||||
|
make DESTDIR="${pkgdir}" \
|
||||||
|
install-data-rog_gui \
|
||||||
|
install-rog_gui
|
||||||
|
}
|
||||||
Reference in new issue
Block a user