Merge tag 'mm-nonmm-stable-2024-05-19-11-56' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / scripts / package / mkspec
1 #!/bin/sh
2 #
3 #       Output a simple RPM spec file.
4 #       This version assumes a minimum of RPM 4.13
5 #
6 #       The only gothic bit here is redefining install_post to avoid
7 #       stripping the symbols from files in the kernel which we want
8 #
9 #       Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
10 #
11
12 output=$1
13
14 mkdir -p "$(dirname "${output}")"
15
16 exec >"${output}"
17
18 if grep -q CONFIG_MODULES=y include/config/auto.conf; then
19 echo '%define with_devel %{?_without_devel: 0} %{?!_without_devel: 1}'
20 else
21 echo '%define with_devel 0'
22 fi
23
24 cat<<EOF
25 %define ARCH ${ARCH}
26 %define KERNELRELEASE ${KERNELRELEASE}
27 %define pkg_release $("${srctree}/init/build-version")
28 EOF
29
30 cat "${srctree}/scripts/package/kernel.spec"