%global debug_package %{nil} Name: t2smc-dkms Version: 0.1.r423.gd5c176b39745 Release: 100.1.1%{?dist} Summary: Experimental Apple T2 SMC DKMS driver by Deqrocks License: GPL-2.0-only URL: https://github.com/kaiT2en/KaiT2en-Fedora Source0: KaiT2en-Fedora-source.tar.gz ExclusiveArch: x86_64 Requires: dkms Provides: t2smc Conflicts: t2smc %description Deqrocks' experimental t2smc driver for Apple T2 Macs. It provides fan control, battery charge limiting, temperature and power telemetry, and RTC access through standard kernel interfaces. Installing this package selects t2smc instead of the in-tree applesmc driver. It deliberately does not change rtc_cmos/acpi_tad policy or kernel command-line arguments. Those changes are only needed when t2smc must become rtc0. %prep %autosetup -n KaiT2en-Fedora-source %install install -d %{buildroot}/usr/src/t2smc-%{version} cp -a modules/t2smc/. %{buildroot}/usr/src/t2smc-%{version}/ find %{buildroot}/usr/src/t2smc-%{version} -type f -exec chmod 0644 {} + # Keep the DKMS identity in sync with the RPM Version generated from PKGBUILD. sed -i \ 's/^PACKAGE_VERSION=.*/PACKAGE_VERSION="%{version}"/' \ %{buildroot}/usr/src/t2smc-%{version}/dkms.conf install -d %{buildroot}%{_prefix}/lib/modprobe.d cat > %{buildroot}%{_prefix}/lib/modprobe.d/90-t2smc.conf <<'EOF' # t2smc is an alternative SMC implementation for Apple T2 Macs. # Prevent the competing in-tree applesmc driver from claiming APP0001. blacklist applesmc EOF install -d %{buildroot}%{_prefix}/lib/modules-load.d printf '%s\n' 't2smc' > %{buildroot}%{_prefix}/lib/modules-load.d/t2smc.conf %post /usr/sbin/dkms add -m t2smc -v %{version} >/dev/null 2>&1 || : /usr/sbin/dkms autoinstall -m t2smc -v %{version} || : %preun if [ "$1" -eq 0 ]; then /usr/sbin/dkms remove -m t2smc -v %{version} --all >/dev/null 2>&1 || : fi %files /usr/src/t2smc-%{version}/ %{_prefix}/lib/modprobe.d/90-t2smc.conf %{_prefix}/lib/modules-load.d/t2smc.conf %changelog * Thu Aug 13 2026 Sl (Shahaf Levi) - 0.1-1 - Initial experimental t2smc DKMS package - Select t2smc instead of applesmc without forcing RTC boot policy