File kernel-postmarketos-qcom-sm7125.spec of Package kernel-postmarketos-qcom-sm7125
#
# SM7125 kernel (postmarketOS-based), openSUSE port
#
# Original maintainer (postmarketOS):
# Nikroks <nikroks@mainlining.org>
#
# openSUSE port maintainer:
# Krzysztof Demir Kuźniak
#
%{!?make:%define make make}
%define _flavor postmarketos-qcom-sm7125
%define _carch arm64
%define KERNELRELEASE %{version}-%{release}-%{_flavor}
Name: kernel-postmarketos-qcom-sm7125
Summary: Linux kernel for Qualcomm SM7125 (postmarketOS)
Version: 6.14.7
Release: 10.1
License: GPL-2.0-only
URL: https://github.com/sm7125-mainline/linux
ExclusiveArch: aarch64
Source0: %{url}/archive/sm7125-%{version}/linux-sm7125-%{version}.tar.gz
Source1: config-%{_flavor}.aarch64
BuildRequires: bc
BuildRequires: binutils
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: perl
BuildRequires: python3
BuildRequires: libelf-devel
Provides: kernel-%{KERNELRELEASE}
%description
Mainline Linux kernel fork for Qualcomm SM7125 devices,
using the postmarketOS kernel configuration.
This is an openSUSE port of the original postmarketOS kernel.
%prep
%setup -q -n linux-sm7125-%{version}
cp %{SOURCE1} .config
%build
unset LDFLAGS
%{make} ARCH=%{_carch} \
KERNELRELEASE=%{KERNELRELEASE} \
KBUILD_BUILD_VERSION=%{release}
%install
rm -rf %{buildroot}
# Base module directory
mkdir -p %{buildroot}/lib/modules/%{KERNELRELEASE}
# Kernel image
cp $(%{make} ARCH=%{_carch} -s image_name) \
%{buildroot}/lib/modules/%{KERNELRELEASE}/vmlinuz
# Kernel modules
%{make} ARCH=%{_carch} \
INSTALL_MOD_PATH=%{buildroot} \
DEPMOD=true \
modules_install
# Device Tree Blobs
if [ -d arch/%{_carch}/boot/dts ]; then
%{make} ARCH=%{_carch} \
INSTALL_DTBS_PATH=%{buildroot}/lib/modules/%{KERNELRELEASE}/dtb \
dtbs_install
fi
# Metadata
cp System.map %{buildroot}/lib/modules/%{KERNELRELEASE}/
cp .config %{buildroot}/lib/modules/%{KERNELRELEASE}/config
# Cleanup
rm -f %{buildroot}/lib/modules/%{KERNELRELEASE}/build
rm -f %{buildroot}/lib/modules/%{KERNELRELEASE}/source
%files
%defattr(-,root,root)
%dir /lib/modules/%{KERNELRELEASE}
/lib/modules/%{KERNELRELEASE}/vmlinuz
/lib/modules/%{KERNELRELEASE}/System.map
/lib/modules/%{KERNELRELEASE}/config
/lib/modules/%{KERNELRELEASE}/kernel
/lib/modules/%{KERNELRELEASE}/modules.*
/lib/modules/%{KERNELRELEASE}/dtb
%changelog
* Sun Jan 25 2026 Krzysztof Demir Kuźniak - 6.14.7-10.1
- Initial openSUSE port of postmarketOS SM7125 mainline kernel
- Single package containing kernel image, modules, and DTBs
- Fixed job control error caused by misplaced %dir