Update distro packaging

This commit is contained in:
Luke Jones
2025-02-18 20:07:49 +13:00
parent 3e4d594b05
commit eb19d59d52

View File

@@ -1,7 +1,7 @@
# #
# spec file for package asus-nb-ctrl # spec file for package asus-nb-ctrl
# #
# Copyright (c) 2020-2021 Luke Jones <luke@ljones.dev> # Copyright (c) 2020-2025 Luke Jones <luke@ljones.dev>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -20,38 +20,42 @@
%global debug_package %{nil} %global debug_package %{nil}
%endif %endif
%define version 6.1.7
%define specrelease %{?dist} %define specrelease %{?dist}
%define pkg_release 3%{specrelease} %define pkg_release 8%{specrelease}
# Use hardening ldflags. # Use hardening ldflags.
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now %global rustflags -Clink-arg=-Wl,-z,relro,-z,now
Name: asusctl Name: asusctl
Version: 6.0.7 Version: %{version}
Release: %{pkg_release} Release: %{pkg_release}
Summary: Control fan speeds, LEDs, graphics modes, and charge levels for ASUS notebooks Summary: Control fan speeds, LEDs, graphics modes, and charge levels for ASUS notebooks
License: MPLv2 License: MPLv2
Group: System Environment/Kernel Group: System Environment/Kernel
URL: https://gitlab.com/asus-linux/asusctl URL: https://gitlab.com/asus-linux/asusctl
Source: %{name}-%{version}.tar.gz Source: https://gitlab.com/asus-linux/asusctl/-/archive/%{version}/%{name}-%{version}.tar.gz
Source1: vendor_%{name}_%{version}.tar.xz
Source2: cargo-config
BuildRequires: cargo
BuildRequires: rust-packaging BuildRequires: rust-packaging
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
BuildRequires: git
BuildRequires: clang-devel BuildRequires: clang-devel
BuildRequires: cargo
BuildRequires: cmake BuildRequires: cmake
BuildRequires: rust BuildRequires: rust
BuildRequires: rust-std-static BuildRequires: rust-std-static
BuildRequires: pkgconfig(expat) # BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(gbm)
# BuildRequires: pkgconfig(dbus-1)
# BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libinput)
BuildRequires: pkgconfig(libseat)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(gtk+-3.0) # BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gdk-3.0) # BuildRequires: pkgconfig(gdk-3.0)
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
# expat-devel pcre2-devel # expat-devel pcre2-devel
@@ -72,21 +76,22 @@ A one-stop-shop GUI tool for asusd/asusctl. It aims to provide most controls,
a notification service, and ability to run in the background. a notification service, and ability to run in the background.
%prep %prep
# %setup -D -T -a 1 -c -n %{name}-%{version}/vendor #%setup -D -T -a 1 -c -n %{name}-%{version}-rc4/vendor
# %setup -D -T -a 0 -c #%setup -D -T -a 0 -c -n %{name}-%{version}-rc4
%autosetup %autosetup
%setup -D -T -a 1 #%setup -D -T -a 1
mv Cargo.lock{,.bak} # mv Cargo.lock{,.bak}
%cargo_prep %cargo_prep
mv Cargo.lock{.bak,} # mv Cargo.lock{.bak,}
sed -i 's|replace-with = "local-registry"|replace-with = "vendored-sources"|' .cargo/config sed -i 's|offline = true|offline = false|' .cargo/config.toml
cat %{SOURCE2} >> .cargo/config sed -i 's|source.crates-io|source.ignore_this|' .cargo/config.toml
# cat %{SOURCE2} >> .cargo/config.toml
%build %build
export RUSTFLAGS="%{rustflags}" export RUSTFLAGS="%{rustflags}"
%cargo_build %cargo_build
#cargo build --release --frozen --offline --config .cargo/config.toml # cargo build --release --frozen --offline --config .cargo/config.toml
%install %install
export RUSTFLAGS="%{rustflags}" export RUSTFLAGS="%{rustflags}"