# The following tag is to get correct syntax highlighting for this file in vim text editor # vim: syntax=spec Name: system76-acpi-dkms Version: 0.0.git.22.975cf5a Release: 1%{?dist} Summary: system76-acpi-dkms License: GPLv3 URL: https://github.com/pop-os/system76-acpi-dkms # Detailed information about the source Git repository and the source commit # for the created rpm package VCS: git+https://github.com/JeffLabonte/system76-acpi-dkms#975cf5a86a09372295a1531dde396f235c34017a: # git_dir_pack macro places the repository content (the source files) into a tarball # and returns its filename. The tarball will be used to build the rpm. Source: system76-acpi-dkms-0.0.git.22.975cf5a.tar.gz #Packages required for build #BuildRequires: dbus-devel #Packages required to work Requires: dkms Requires: kernel-devel # More detailed description of the package %description System76 ACPI DKMS (Dynamic Kernel Module Support) ----- This DKMS driver provides airplane mode, keyboard backlight, and fan support for System76 laptops. The module is rebuilt through the DKMS system when a new kernel or module become available. %define debug_package %{nil} #-- %prep %setup -q -n system76-acpi-dkms-0.0.git.22.975cf5a %install install -D -m 0644 *.c -t "%{buildroot}%{_usrsrc}/system76-acpi-0.0.git.22.975cf5a/" install -m 0644 Makefile -t "%{buildroot}%{_usrsrc}/system76-acpi-0.0.git.22.975cf5a/" install -m 0644 debian/system76-acpi-dkms.dkms "%{buildroot}%{_usrsrc}/system76-acpi-0.0.git.22.975cf5a/dkms.conf" # do after installation %post sed -i 's/PACKAGE_VERSION="#MODULE_VERSION#"/PACKAGE_VERSION="0.0.git.22.975cf5a"/g' %{_usrsrc}/system76-acpi-0.0.git.22.975cf5a/dkms.conf # change module id also in C code. sed -i 's/MODULE_VERSION("\(.*\)");/MODULE_VERSION("\1-0.0.git.22.975cf5a");/g' %{_usrsrc}/system76-acpi-0.0.git.22.975cf5a/system76_acpi.c /usr/bin/env dkms add -m system76-acpi -v 0.0.git.22.975cf5a --rpm_safe_upgrade /usr/bin/env dkms build -m system76-acpi -v 0.0.git.22.975cf5a /usr/bin/env dkms install -m system76-acpi -v 0.0.git.22.975cf5a --force # do before uninstallation %preun /usr/bin/env rmmod system76-acpi || : /usr/bin/env dkms remove -m system76-acpi -v 0.0.git.22.975cf5a --all --rpm_safe_upgrade || : # do after uninstallation, bugfix %postun rm -rfv /var/lib/dkms/system76-acpi/0.0.git.22.975cf5a # Those files will be in the rpm %files %{_usrsrc}/system76-acpi-0.0.git.22.975cf5a # Changelog %changelog