# # spec file for package asus-nb-ctrl # # Copyright (c) 2020-2021 Luke Jones # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. %if %{defined fedora} %global debug_package %{nil} %endif %if "%{_vendor}" != "debbuild" %global rpm_dkms_opt 1 %endif # Use hardening ldflags. %global rustflags -Clink-arg=-Wl,-z,relro,-z,now Name: asusctl Version: 4.0.6 Release: 0 Summary: Control fan speeds, LEDs, graphics modes, and charge levels for ASUS notebooks License: MPLv2 %if "%{_vendor}" == "debbuild" # Group tag maps to "Section" in debian/control Group: kernel # Packager tag maps to "Maintainer" in debian/control Packager: Luke Jones %else Group: System Environment/Kernel %endif Obsoletes: asus-nb-ctrl Requires: supergfxctl URL: https://gitlab.com/asus-linux/asusctl Source: https://gitlab.com/asus-linux/asusctl/-/archive/%version/%{name}-%{version}.tar.gz Source1: vendor-%{version}.tar.xz BuildRequires: cargo %if "%{_vendor}" == "debbuild" BuildRequires: systemd-deb-macros BuildRequires: rustc BuildRequires: llvm BuildRequires: libclang-dev BuildRequires: libudev-dev BuildRequires: pkg-config %else BuildRequires: systemd-rpm-macros BuildRequires: clang-devel BuildRequires: rust BuildRequires: rust-std-static BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libudev) %endif %description asus-nb-ctrl is a utility for Linux to control many aspects of various ASUS laptops but can also be used with non-Asus laptops with reduced features. It provides an interface for rootless control of some system functions such as fan speeds, keyboard LEDs, battery charge level, and graphics modes. asus-nb-ctrl enables third-party apps to use the above with dbus methods. %prep %autosetup %if "%{_vendor}" == "debbuild" tar -xf %{Source1} %else %setup -D -T -a 1 %endif mkdir .cargo cat >.cargo/config <