Compare commits

..

2 Commits

Author SHA1 Message Date
aa3c8490f2 Merge pull request 'Add kernel-headers subpackage' (#10) from metalefty/raspberrypi:a8 into a8
Reviewed-on: #10
2024-09-24 13:51:11 +00:00
076061c010 Add kernel-headers subpackage
(cherry picked from commit e0ac6af001)
2024-09-24 22:43:52 +09:00

View File

@ -11,7 +11,7 @@ ExclusiveArch: aarch64
%define local_version v8 %define local_version v8
%define bcmmodel 2711 %define bcmmodel 2711
%define extra_version 3 %define extra_version 4
# This originally implies Kernel 4.x for RPi 2 and is not appropriate now. # This originally implies Kernel 4.x for RPi 2 and is not appropriate now.
# Be careful to change this not to disturb the seamless package update. # Be careful to change this not to disturb the seamless package update.
@ -27,6 +27,8 @@ ExclusiveArch: aarch64
%define with_tools %{?_without_tools: 0} %{?!_without_tools: 1} %define with_tools %{?_without_tools: 0} %{?!_without_tools: 1}
# firmware # firmware
%define with_firmware %{?_without_firmware: 0} %{?!_without_firmware: 1} %define with_firmware %{?_without_firmware: 0} %{?!_without_firmware: 1}
# kernel-headers
%define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
Name: raspberrypi%{rpisuffix} Name: raspberrypi%{rpisuffix}
Version: %{kversion}.%{patchlevel} Version: %{kversion}.%{patchlevel}
@ -56,6 +58,9 @@ BuildRequires: openssl-devel
# kernel-tools # kernel-tools
BuildRequires: asciidoc BuildRequires: asciidoc
%endif %endif
%if %{with_headers}
BuildRequires: rsync
%endif
%description %description
Specific kernel and bootcode for Raspberry Pi Specific kernel and bootcode for Raspberry Pi
@ -142,6 +147,22 @@ This package contains the GPU firmware for the Raspberry Pi BCM2835 SOC
including the kernel bootloader. including the kernel bootloader.
%endif %endif
%if %{with_headers}
%package kernel%{?ksuffix}-headers
Obsoletes: kernel-headers < %{version}
Provides: kernel-headers = %{version}-%{release}
Obsoletes: glibc-kernheaders < 3.0-46
Provides: glibc-kernheaders = 3.0-46
Summary: Header files for the Linux kernel for use by glibc
%description kernel%{?ksuffix}-headers
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
building most standard programs and are also needed for rebuilding the
glibc package.
%endif
%prep %prep
%setup -q -n linux-stable_%{version_tag} %setup -q -n linux-stable_%{version_tag}
%patch100 -p1 %patch100 -p1
@ -290,6 +311,14 @@ install -m755 page_owner_sort %{buildroot}%{_bindir}/page_owner_sort
popd popd
%endif %endif
%if %{with_headers}
%{__make} ARCH=%{Arch} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
find %{buildroot}/usr/include \
\( -name .install -o -name .check -o \
-name ..install.cmd -o -name ..check.cmd \) -delete
%endif
%if %{with_tools} %if %{with_tools}
%post kernel%{?ksuffix}-tools %post kernel%{?ksuffix}-tools
%systemd_post cpupower.service %systemd_post cpupower.service
@ -393,7 +422,18 @@ cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc
%doc /boot/LICENCE.broadcom %doc /boot/LICENCE.broadcom
%endif %endif
%if %{with_headers}
%files kernel%{?ksuffix}-headers
/usr/include/*
%exclude %{_includedir}/cpufreq.h
%exclude %{_includedir}/internal/
%exclude %{_includedir}/perf/
%endif
%changelog %changelog
* Thu Sep 05 2024 Koichiro Iwao <meta@almalinux.org> - 6.6.31-20240529.v8.4
- Add kernel-headers subpackage
* Fri Aug 30 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 6.6.31-20240529.v8.3 * Fri Aug 30 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 6.6.31-20240529.v8.3
- Fix kernel-tools dependencies - Fix kernel-tools dependencies