File kernel-subpackage-spec of Package kernel-source-rt.12895

%define rpm_kver %(rpm -q --qf '%%{VERSION}' %kernel_package_name)
%define rpm_krel %(rpm -q --qf '%%{RELEASE}' %kernel_package_name)

# Force bzip2 instead of lzma compression to
# 1) allow install on older dist versions, and
# 2) decrease build times (bsc#962356)
# %%define _binary_payload w9.bzdio
# Do not recompute the build-id of vmlinux in (bsc#964063)
%undefine _unique_build_ids
%define _no_recompute_build_ids 1
# prevent usr/lib/debug/boot/vmlinux-4.12.14-11.10-default-4.12.14-11.10.ppc64le.debug
%undefine _unique_debug_names

%define kernel_requires        %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'manual,' | sed -e 's/.*,//' | tr '\\n' ' ')
%define kernel_requires_pre    %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'pre,' | sed -e 's/.*,//' | tr '\\n' ' ')
%define kernel_requires_preun  %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'preun,' | sed -e 's/.*,//' | tr '\\n' ' ')
%define kernel_requires_post   %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'post,' | sed -e 's/.*,//' | tr '\\n' ' ')
%define kernel_requires_postun %(rpm -q --queryformat '[%%{REQUIREFLAGS:deptype},%%{REQUIRENEVRS}\\n]' %kernel_package_name | grep -vE 'rpmlib,|interp,' | grep -E 'postun,' | sed -e 's/.*,//' | tr '\\n' ' ')

%if ! %(expr 1 - 1)
%if "%{kernel_requires}" != ""
Requires:       %kernel_requires
%if "%{kernel_requires_pre}" != ""
Requires(pre):  %kernel_requires_pre
%if "%{kernel_requires_preun}" != ""
%if "%{kernel_requires_post}" != ""
Requires(post): %kernel_requires_post
%if "%{kernel_requires_postun}" != ""
Provides:       %(rpm -q --queryformat '[%%{PROVIDENEVRS}\n]' %kernel_package_name | sed -E 's/^%kernel_package_name(-srchash| =)/%name\1/g' | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\n' ' )')
Obsoletes:      %(rpm -q --queryformat '[%%{OBSOLETENEVRS}\n]' %kernel_package_name | sed -E 's/^%kernel_package_name(-srchash| =)/%name\1/g' | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\n' ' )')
Conflicts:      %(rpm -q --queryformat '[%%{CONFLICTNEVRS}\n]' %kernel_package_name | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\n' ' )')
Recommends:     %(rpm -q --queryformat '[%%{RECOMMENDNEVRS}\n]' %kernel_package_name | grep -vE '^(ksym|kmod|firmware)[(]' | tr '\n' ' )')
# This is in place of obsolete_rebuilds. This should give Conflicts: %%kernel_package_name = %%source_rel as old kernel-default-base did.
Conflicts:      %(rpm -q --queryformat '[%%{PROVIDENEVRS}\n]' %kernel_package_name | grep '^%kernel_package_name =' | sort -V | head -n 1)

%(rpm -q --qf '%%{DESCRIPTION}' %kernel_package_name)

This is a subpackage of %kernel_package_name. Development files are in
%kernel_package_name-devel and sources in kernel-source%variant.

%package rebuild
Summary: Empty package to ensure rebuilding %name in OBS
Group: Other
Requires: %kernel_package_name = %rpm_kver-%rpm_krel

%description rebuild
This is empty package that ensures %name is rebuilt every time
%kernel_package_name is rebuilt in OBS.

There is no reason to install this package.

%files rebuild




echo "%{?modules}" | tr ', ' '\n\n' > request-modules
%scriptdir/kernel-subpackage-build %kernel_package_name %rpm_kver-%rpm_krel %package_name-%version-%release

%preun -f

%postun -f

%pre -f

%post -f

%files -f subpackage.flist