/[packages]/cauldron/kernel/current/SPECS/kernel.spec
ViewVC logotype

Contents of /cauldron/kernel/current/SPECS/kernel.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 187273 - (show annotations) (download)
Sat Dec 24 17:26:56 2011 UTC (9 years, 9 months ago) by tmb
File size: 36634 byte(s)
SILENT: doh.... use correct devel path
1 # -*- Mode: rpm-spec -*-
2 #
3 # This Specfile is based on kernel-tmb spec done by
4 # Thomas Backlund <tmb@mandriva.org>
5 #
6 # The mkflavour() macroization done by Anssi Hannula <anssi@mandriva.org>
7 #
8 # Mageia kernels use kernel.org versioning
9 #
10 %define kernelversion 3
11 %define patchlevel 1
12 # sublevel is now used for -stable patches
13 %define sublevel 6
14
15 # Package release
16 %define mgarel 2
17
18 # kernel Makefile extraversion is substituted by
19 # kpatch wich are either 0 (empty), rc (kpatch)
20 %define kpatch 0
21 # kernel.org -gitX patch (only the number after "git")
22 %define kgit 0
23
24 # kernel base name (also name of srpm)
25 %define kname kernel
26
27 # Patch tarball tag
28 %define ktag mga
29
30 %define rpmtag %{distsuffix}%{mgaver}
31 %if %kpatch
32 %if %kgit
33 %define rpmrel %mkrel 0.%{kpatch}.%{kgit}.%{mgarel}
34 %else
35 %define rpmrel %mkrel 0.%{kpatch}.%{mgarel}
36 %endif
37 %else
38 %define rpmrel %mkrel %{mgarel}
39 %endif
40
41 # fakerel and fakever never change, they are used to fool
42 # rpm/urpmi/smart
43 %define fakever 1
44 %define fakerel %mkrel 1
45
46 # version defines
47 %define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
48 %define kverrel %{kversion}-%{rpmrel}
49
50 # When we are using a pre/rc patch, the tarball is a sublevel -1
51 %if %kpatch
52 %if %sublevel
53 %define tar_ver %{kernelversion}.%{patchlevel}
54 %else
55 %define tar_ver %{kernelversion}.%(expr %{patchlevel} - 1)
56 %endif
57 %define patch_ver %{kversion}-%{kpatch}-%{ktag}%{mgarel}
58 %else
59 %define tar_ver %{kernelversion}.%{patchlevel}
60 %define patch_ver %{kversion}-%{ktag}%{mgarel}
61 %endif
62
63 # Used for not making too long names for rpms or search paths
64 %if %kpatch
65 %if %kgit
66 %define buildrpmrel 0.%{kpatch}.%{kgit}.%{mgarel}%{rpmtag}
67 %else
68 %define buildrpmrel 0.%{kpatch}.%{mgarel}%{rpmtag}
69 %endif
70 %else
71 %define buildrpmrel %{mgarel}%{rpmtag}
72 %endif
73 %define buildrel %{kversion}-%{buildrpmrel}
74
75 # Having different top level names for packges means that you have to remove
76 # them by hard :(
77 %define top_dir_name %{kname}-%{_arch}
78
79 %define build_dir ${RPM_BUILD_DIR}/%{top_dir_name}
80 %define src_dir %{build_dir}/linux-%{tar_ver}
81
82 # Disable useless debug rpms...
83 %define _enable_debug_packages %{nil}
84 %define debug_package %{nil}
85
86 # Build defines
87 %define build_doc 1
88 %define build_source 1
89 %define build_devel 1
90
91 %define build_debug 1
92
93 # Build desktop i586 / 4GB
94 %ifarch %{ix86}
95 %define build_desktop586 1
96 %endif
97
98 # Build desktop (i686 / 4GB) / x86_64
99 %define build_desktop 1
100
101 # Build netbook (i686 / 4GB) / x86_64
102 %define build_netbook 1
103
104 # Build server (i686 / 64GB)/x86_64 / sparc64 sets
105 %define build_server 1
106
107 # Build xen-pvops (i686 / 64GB)/x86_64
108 %define build_xen_pvops 1
109
110 # ARM builds
111 %ifarch %{arm}
112 %define build_desktop 0
113 %define build_netbook 0
114 %define build_server 0
115 %define build_xen_pvops 0
116 %define build_iop32x 0
117 %define build_kirkwood 1
118 %define build_versatile 1
119 %endif
120 # End of user definitions
121
122 # buildtime flags
123 %{?_without_desktop586: %global build_desktop586 0}
124 %{?_without_desktop: %global build_desktop 0}
125 %{?_without_netbook: %global build_netbook 0}
126 %{?_without_server: %global build_server 0}
127 %{?_without_xen_pvops: %global build_xen_pvops 0}
128 %{?_without_doc: %global build_doc 0}
129 %{?_without_source: %global build_source 0}
130 %{?_without_devel: %global build_devel 0}
131 %{?_without_debug: %global build_debug 0}
132
133 %{?_with_desktop586: %global build_desktop586 1}
134 %{?_with_desktop: %global build_desktop 1}
135 %{?_with_netbook: %global build_netbook 1}
136 %{?_with_server: %global build_server 1}
137 %{?_with_xen_pvops: %global build_xen_pvops 1}
138 %{?_with_doc: %global build_doc 1}
139 %{?_with_source: %global build_source 1}
140 %{?_with_devel: %global build_devel 1}
141 %{?_with_debug: %global build_debug 1}
142
143 # ARM builds
144 %{?_with_iop32x: %global build_iop32x 1}
145 %{?_with_kirkwood: %global build_kirkwood 1}
146 %{?_with_versatile: %global build_versatile 1}
147 %{?_without_iop32x: %global build_iop32x 0}
148 %{?_without_kirkwood: %global build_kirkwood 0}
149 %{?_without_versatile: %global build_versatile 0}
150
151 # For the .nosrc.rpm
152 %define build_nosrc 0
153 %{?_with_nosrc: %global build_nosrc 1}
154
155 %if %(if [ -z "$CC" ] ; then echo 0; else echo 1; fi)
156 %define kmake %make CC="$CC"
157 %else
158 %define kmake %make
159 %endif
160 # there are places where parallel make don't work
161 %define smake make
162
163 # Parallelize xargs invocations on smp machines
164 %define kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
165 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
166 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-P $RPM_BUILD_NCPUS")
167
168 # Sparc arch wants sparc64 kernels
169 %define target_arch %(echo %{_arch} | sed -e 's/mips.*/mips/' -e 's/arm.*/arm/')
170
171
172 #
173 # SRC RPM description
174 #
175 Summary: Linux kernel built for Mageia
176 Name: %{kname}
177 Version: %{kversion}
178 Release: %{rpmrel}
179 License: GPLv2
180 Group: System/Kernel and hardware
181 ExclusiveArch: %{ix86} x86_64 %{arm}
182 ExclusiveOS: Linux
183 URL: http://www.kernel.org
184
185 ####################################################################
186 #
187 # Sources
188 #
189 ### This is for full SRC RPM
190 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/linux-%{tar_ver}.tar.xz
191 Source1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/linux-%{tar_ver}.tar.sign
192 ### This is for stripped SRC RPM
193 %if %build_nosrc
194 NoSource: 0
195 %endif
196 # This is for disabling *config, mrproper, prepare, scripts on -devel rpms
197 Source2: disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch
198
199 Source4: README.kernel-sources
200
201 Source100: linux-%{patch_ver}.tar.xz
202
203 ####################################################################
204 #
205 # Patches
206
207 #
208 # Patch0 to Patch100 are for core kernel upgrades.
209 #
210
211 # Pre linus patch: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/testing
212
213 %if %kpatch
214 %if %sublevel
215 Patch2: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/stable-review/patch-%{kversion}-%{kpatch}.xz
216 Source11: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/stable-review/patch-%{kversion}-%{kpatch}.sign
217 %else
218 Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/testing/patch-%{kernelversion}.%{patchlevel}-%{kpatch}.xz
219 Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/testing/patch-%{kernelversion}.%{patchlevel}-%{kpatch}.sign
220 %endif
221 %endif
222 %if %kgit
223 Patch2: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/snapshots/patch-%{kernelversion}.%{patchlevel}-%{kpatch}-git%{kgit}.xz
224 Source11: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/snapshots/patch-%{kernelversion}.%{patchlevel}-%{kpatch}-git%{kgit}.sign
225 %endif
226 %if %sublevel
227 %if %kpatch
228 %define prev_sublevel %(expr %{sublevel} - 1)
229 %if %prev_sublevel
230 Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/patch-%{kernelversion}.%{patchlevel}.%{prev_sublevel}.xz
231 Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/patch-%{kernelversion}.%{patchlevel}.%{prev_sublevel}.sign
232 %endif
233 %else
234 Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/patch-%{kversion}.xz
235 Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.%{patchlevel}/patch-%{kversion}.sign
236 %endif
237 %endif
238
239 #END
240 ####################################################################
241
242 # Defines for the things that are needed for all the kernels
243 #
244 %define common_desc_kernel The kernel package contains the Linux kernel (vmlinuz), the core of your \
245 Mageia operating system. The kernel handles the basic functions \
246 of the operating system: memory allocation, process allocation, device \
247 input and output, etc.
248
249 %define common_desc_kernel_smp This kernel relies on in-kernel smp alternatives to switch between up & smp \
250 mode depending on detected hardware. To force the kernel to boot in single \
251 processor mode, use the "nosmp" boot parameter.
252
253 ### Global Requires/Provides
254 %define requires1 bootloader-utils >= 1.13-1
255 %define requires2 mkinitrd >= 4.2.17-31
256 %define requires3 module-init-tools >= 3.0-7
257 %define requires4 sysfsutils >= 1.3.0-1
258 %define requires5 kernel-firmware >= 20110703-2
259
260 %define kprovides %{kname} = %{kverrel}, kernel = %{tar_ver}, alsa = 1.0.24, drbd-api = 88
261
262 Autoreqprov: no
263 BuildRequires: gcc module-init-tools
264 %ifarch %{arm}
265 BuildRequires: uboot-mkimage
266 %endif
267
268 %description
269 %common_desc_kernel
270 %ifnarch %{arm}
271 %common_desc_kernel_smp
272 %endif
273
274 # mkflavour() name flavour processor
275 # name: the flavour name in the package name
276 # flavour: first parameter of CreateKernel()
277 %define mkflavour() \
278 %package -n %{kname}-%{1}-%{buildrel} \
279 Version: %{fakever} \
280 Release: %{fakerel} \
281 Provides: %kprovides \
282 Provides: %{kname}-%{1} \
283 Requires(pre): %requires1 %requires2 %requires3 %requires4 \
284 Requires: %requires5 \
285 Provides: should-restart = system \
286 Suggests: crda \
287 %ifarch %{ix86} \
288 Conflicts: arch(x86_64) \
289 %endif \
290 Summary: %{expand:%{summary_%(echo %{1} | sed -e "s/-/_/")}} \
291 Group: System/Kernel and hardware \
292 %description -n %{kname}-%{1}-%{buildrel} \
293 %common_desc_kernel %{expand:%{info_%(echo %{1} | sed -e "s/-/_/")}} \
294 %ifnarch %{arm} \
295 %common_desc_kernel_smp \
296 %endif \
297 \
298 %if %build_devel \
299 %package -n %{kname}-%{1}-devel-%{buildrel} \
300 Version: %{fakever} \
301 Release: %{fakerel} \
302 Requires: glibc-devel ncurses-devel make gcc perl \
303 Summary: The kernel-devel files for %{kname}-%{1}-%{buildrel} \
304 Group: Development/Kernel \
305 Provides: %{kname}-devel = %{kverrel} \
306 Provides: %{kname}-%{1}-devel \
307 %ifarch %{ix86} \
308 Conflicts: arch(x86_64) \
309 %endif \
310 %description -n %{kname}-%{1}-devel-%{buildrel} \
311 This package contains the kernel files (headers and build tools) \
312 that should be enough to build additional drivers for \
313 use with %{kname}-%{1}-%{buildrel}. \
314 \
315 If you want to build your own kernel, you need to install the full \
316 %{kname}-source-%{buildrel} rpm. \
317 \
318 %endif \
319 \
320 %if %build_debug \
321 %package -n %{kname}-%{1}-%{buildrel}-debug \
322 Version: %{fakever} \
323 Release: %{fakerel} \
324 Summary: Files with debug info for %{kname}-%{1}-%{buildrel} \
325 Group: Development/Debug \
326 Provides: kernel-debug = %{kverrel} \
327 %ifarch %{ix86} \
328 Conflicts: arch(x86_64) \
329 %endif \
330 %description -n %{kname}-%{1}-%{buildrel}-debug \
331 This package contains the files with debug info to aid in debug tasks \
332 when using %{kname}-%{1}-%{buildrel}. \
333 \
334 If you need to look at debug information or use some application that \
335 needs debugging info from the kernel, this package may help. \
336 \
337 %endif \
338 \
339 %package -n %{kname}-%{1}-latest \
340 Version: %{kversion} \
341 Release: %{rpmrel} \
342 Summary: Virtual rpm for latest %{kname}-%{1} \
343 Group: System/Kernel and hardware \
344 Requires: %{kname}-%{1}-%{buildrel} \
345 %ifarch %{ix86} \
346 Conflicts: arch(x86_64) \
347 %endif \
348 %description -n %{kname}-%{1}-latest \
349 This package is a virtual rpm that aims to make sure you always have the \
350 latest %{kname}-%{1} installed... \
351 \
352 %if %build_devel \
353 %package -n %{kname}-%{1}-devel-latest \
354 Version: %{kversion} \
355 Release: %{rpmrel} \
356 Summary: Virtual rpm for latest %{kname}-%{1}-devel \
357 Group: Development/Kernel \
358 Requires: %{kname}-%{1}-devel-%{buildrel} \
359 %ifarch %{ix86} \
360 Conflicts: arch(x86_64) \
361 %endif \
362 Provides: %{kname}-devel-latest \
363 %description -n %{kname}-%{1}-devel-latest \
364 This package is a virtual rpm that aims to make sure you always have the \
365 latest %{kname}-%{1}-devel installed... \
366 \
367 %endif \
368 \
369 %post -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-post \
370 %posttrans -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-posttrans \
371 %preun -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-preun \
372 %postun -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-postun \
373 \
374 %if %build_devel \
375 %post -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-post \
376 %preun -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-preun \
377 %endif \
378 \
379 %files -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1} \
380 %files -n %{kname}-%{1}-latest \
381 \
382 %if %build_devel \
383 %files -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1} \
384 %files -n %{kname}-%{1}-devel-latest \
385 %endif \
386 \
387 %if %build_debug \
388 %files -n %{kname}-%{1}-%{buildrel}-debug -f kernel_debug_files.%{1} \
389 %endif
390
391 %ifarch %{ix86}
392 #
393 # kernel-desktop586: i586, smp-alternatives, 4GB
394 #
395 %if %build_desktop586
396 %define summary_desktop586 Linux kernel for desktop use with i586 and less than 4GB RAM
397 %define info_desktop586 This kernel is compiled for desktop use, single or \
398 multiple i586 processor(s)/core(s) and less than 4GB RAM (usually 3-3.5GB \
399 detected, if you need/want to use all 4GB or more, install kernel-server), \
400 using HZ_1000, voluntary preempt, CFS cpu scheduler and cfq i/o scheduler.
401 %mkflavour desktop586
402 %endif
403 %endif
404
405 #
406 # kernel-desktop: i686, smp-alternatives, 4 GB / x86_64
407 #
408 %if %build_desktop
409 %ifarch %{ix86}
410 %define summary_desktop Linux Kernel for desktop use with i686 and less than 4GB RAM
411 %define info_desktop This kernel is compiled for desktop use, single or \
412 multiple i686 processor(s)/core(s) and less than 4GB RAM (usually 3-3.5GB \
413 detected, if you need/want to use all 4GB or more, install kernel-server), \
414 using HZ_1000, voluntary preempt, CFS cpu scheduler and cfq i/o scheduler.
415 %else
416 %define summary_desktop Linux Kernel for desktop use with %{_arch}
417 %define info_desktop This kernel is compiled for desktop use, single or \
418 multiple %{_arch} processor(s)/core(s), using HZ_1000, voluntary preempt, \
419 CFS cpu scheduler and cfq i/o scheduler.
420 %endif
421 %mkflavour desktop
422 %endif
423
424 #
425 # kernel-netbook: i686, smp-alternatives, 4 GB / x86_64
426 #
427 %if %build_netbook
428 %ifarch %{ix86}
429 %define summary_netbook Linux Kernel for netbook use with i686 and less than 4GB RAM
430 %define info_netbook This kernel is compiled for netbook use, single or \
431 multiple i686 processor(s)/core(s) and less than 4GB RAM (usually 3-3.5GB \
432 detected, if you need/want to use all 4GB or more, install kernel-server), \
433 using HZ_1000, voluntary preempt, CFS cpu scheduler and cfq i/o scheduler.
434 %else
435 %define summary_netbook Linux Kernel for netbook use with %{_arch}
436 %define info_netbook This kernel is compiled for netbook use, single or \
437 multiple %{_arch} processor(s)/core(s), using HZ_1000, voluntary preempt, \
438 CFS cpu scheduler and cfq i/o scheduler.
439 %endif
440 %mkflavour netbook
441 %endif
442
443 #
444 # kernel-server: i686, smp-alternatives, 64 GB / x86_64
445 #
446 %if %build_server
447 %ifarch %{ix86}
448 %define summary_server Linux Kernel for server use with i686 & 64GB RAM
449 %define info_server This kernel is compiled for server use, single or \
450 multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using \
451 no preempt, HZ_100, CFS cpu scheduler and cfq i/o scheduler.
452 %else
453 %define summary_server Linux Kernel for server use with %{_arch}
454 %define info_server This kernel is compiled for server use, single or \
455 multiple %{_arch} processor(s)/core(s), using no preempt, HZ_100, \
456 CFS cpu scheduler and cfq i/o scheduler.
457 %endif
458 %mkflavour server
459 %endif
460
461 #
462 # kernel-xen-pvops: i686, smp-alternatives, 64 GB / x86_64
463 #
464 %if %build_xen_pvops
465 %ifarch %{ix86}
466 %define summary_xen_pvops Linux Kernel for xen-pvops use with i686 & 64GB RAM
467 %define info_xen_pvops This kernel is compiled for xen-pvops use, single or \
468 multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using \
469 no preempt, HZ_100, CFS cpu scheduler and cfq i/o scheduler.
470 %else
471 %define summary_xen_pvops Linux Kernel for xen-pvops use with %{_arch}
472 %define info_xen_pvops This kernel is compiled for xen-pvops use, single or \
473 multiple %{_arch} processor(s)/core(s), using no preempt, HZ_100, \
474 CFS cpu scheduler and cfq i/o scheduler.
475 %endif
476 %mkflavour xen-pvops
477 %endif
478
479 #
480 # ARM kernels
481 #
482 %ifarch %{arm}
483 %if %build_iop32x
484 %define summary_iop32x Linux Kernel for Arm machines based on Xscale IOP32X
485 %define info_iop32x This kernel is compiled for iop32x boxes. It will run on n2100 \
486 or ss4000e or sanmina boards.
487 %mkflavour iop32x
488 %endif
489 %if %build_kirkwood
490 %define summary_kirkwood Linux Kernel for Arm machines based on Kirkwood
491 %define info_kirkwood This kernel is compiled for kirkwood boxes. It will run on openrd boards.
492 %mkflavour kirkwood
493 %endif
494 %if %build_versatile
495 %define summary_versatile Linux Kernel for Versatile arm machines
496 %define info_versatile This kernel is compiled for Versatile boxes. It will run on Qemu for instance.
497 %mkflavour versatile
498 %endif
499 %endif
500
501 #
502 # kernel-source
503 #
504 %if %build_source
505 %package -n %{kname}-source-%{buildrel}
506 Version: %{fakever}
507 Release: %{fakerel}
508 Requires: glibc-devel, ncurses-devel, make, gcc, perl, diffutils
509 Summary: The Linux source code for %{kname}-%{buildrel}
510 Group: Development/Kernel
511 Autoreqprov: no
512 Provides: kernel-source = %{kverrel}
513 Buildarch: noarch
514
515 %description -n %{kname}-source-%{buildrel}
516 The %{kname}-source package contains the source code files for the Mageia
517 kernel. Theese source files are only needed if you want to build your
518 own custom kernel that is better tuned to your particular hardware.
519
520 If you only want the files needed to build 3rdparty (nVidia, Ati, dkms-*,...)
521 drivers against, install the *-devel-* rpm that is matching your kernel.
522
523 %post -n %{kname}-source-%{buildrel}
524 for i in /lib/modules/%{kversion}-{desktop586,desktop,server}-%{buildrpmrel}; do
525 if [ -d $i ]; then
526 if [ ! -L $i/build -a ! -L $i/source ]; then
527 ln -sf /usr/src/linux-%{kversion}-%{buildrpmrel} $i/build
528 ln -sf /usr/src/linux-%{kversion}-%{buildrpmrel} $i/source
529 fi
530 fi
531 done
532 cd /usr/src
533 rm -f linux
534 ln -snf linux-%{kversion}-%{buildrpmrel} linux
535
536 %preun -n %{kname}-source-%{buildrel}
537 for i in /lib/modules/%{kversion}-{desktop586,desktop,server}-%{buildrpmrel}/{build,source}; do
538 if [ -L $i ]; then
539 if [ "$(readlink $i)" = "/usr/src/linux-%{kversion}-%{buildrpmrel}" ]; then
540 rm -f $i
541 fi
542 fi
543 done
544 if [ -L /usr/src/linux ]; then
545 if [ "$(readlink /usr/src/linux)" = "linux-%{kversion}-%{buildrpmrel}" ]; then
546 rm -f /usr/src/linux
547 fi
548 fi
549 exit 0
550
551 #
552 # kernel-source-latest: virtual rpm
553 #
554 %package -n %{kname}-source-latest
555 Version: %{kversion}
556 Release: %{rpmrel}
557 Summary: Virtual rpm for latest %{kname}-source
558 Group: Development/Kernel
559 Requires: %{kname}-source-%{buildrel}
560 Buildarch: noarch
561
562 %description -n %{kname}-source-latest
563 This package is a virtual rpm that aims to make sure you always have the
564 latest %{kname}-source installed...
565 %endif
566
567 #
568 # kernel-doc: documentation for the Linux kernel
569 #
570 %if %build_doc
571 %package -n %{kname}-doc
572 Version: %{kversion}
573 Release: %{rpmrel}
574 Summary: Various documentation bits found in the %{kname} source
575 Group: Books/Computer books
576 Buildarch: noarch
577
578 %description -n %{kname}-doc
579 This package contains documentation files from the %{kname} source.
580 Various bits of information about the Linux kernel and the device drivers
581 shipped with it are documented in these files. You also might want install
582 this package if you need a reference to the options that can be passed to
583 Linux kernel modules at load time.
584 %endif
585
586 #
587 # End packages - here begins build stage
588 #
589 %prep
590 %setup -q -n %top_dir_name -c
591 %setup -q -n %top_dir_name -D -T -a100
592
593 %define patches_dir ../%{patch_ver}/
594
595 cd %src_dir
596
597 %if %sublevel
598 %if %kpatch
599 %if %prev_sublevel
600 %patch1 -p1
601 %endif
602 %patch2 -p1
603 %else
604 %patch1 -p1
605 %endif
606 %else
607 %if %kpatch
608 %patch1 -p1
609 %endif
610 %endif
611 %if %kgit
612 %patch2 -p1
613 %endif
614
615 %{patches_dir}/scripts/apply_patches
616
617 # PATCH END
618
619
620 #
621 # Setup Begin
622 #
623
624 # Prepare all the variables for calling create_configs
625
626 %if %build_debug
627 %define debug --debug
628 %else
629 %define debug --no-debug
630 %endif
631
632
633 %{patches_dir}/scripts/create_configs %debug --user_cpu="%{target_arch}"
634
635 # make sure the kernel has the sublevel we know it has...
636 LC_ALL=C perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
637
638 # get rid of unwanted files
639 find . -name '*~' -o -name '*.orig' -o -name '*.append' | %kxargs rm -f
640
641
642 %build
643 # Common target directories
644 %define _kerneldir /usr/src/linux-%{kversion}-%{buildrpmrel}
645 %define _bootdir /boot
646 %define _modulesdir /lib/modules
647 %define _efidir %{_bootdir}/efi/mageia
648
649 # Directories definition needed for building
650 %define temp_root %{build_dir}/temp-root
651 %define temp_source %{temp_root}%{_kerneldir}
652 %define temp_boot %{temp_root}%{_bootdir}
653 %define temp_modules %{temp_root}%{_modulesdir}
654
655 PrepareKernel() {
656 name=$1
657 extension=$2
658 x86_dir=arch/x86/configs
659
660 echo "Make config for kernel $extension"
661
662 %smake -s mrproper
663
664 if [ "%{target_arch}" == "i386" -o "%{target_arch}" == "x86_64" ]; then
665 if [ -z "$name" ]; then
666 cp ${x86_dir}/%{target_arch}_defconfig-desktop .config
667 else
668 cp ${x86_dir}/%{target_arch}_defconfig-$name .config
669 fi
670 else
671 if [ -z "$name" ]; then
672 cp arch/%{target_arch}/defconfig-desktop .config
673 else
674 cp arch/%{target_arch}/defconfig-$name .config
675 fi
676 fi
677
678 # make sure EXTRAVERSION says what we want it to say
679 LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -$extension/" Makefile
680
681 %smake oldconfig
682 }
683
684 BuildKernel() {
685 KernelVer=$1
686
687 echo "Building kernel $KernelVer"
688
689 %kmake -s all
690
691 # kirkwood boxes have u-boot
692 if [ "$KernelVer" = "%{kversion}-kirkwood-%{buildrpmrel}" ]; then
693 %kmake uImage
694 fi
695
696 # Start installing stuff
697 install -d %{temp_boot}
698 install -m 644 System.map %{temp_boot}/System.map-$KernelVer
699 install -m 644 .config %{temp_boot}/config-$KernelVer
700 gzip -c Module.symvers > %{temp_boot}/symvers-$KernelVer.gz
701
702 %ifarch %{arm}
703 if [ -f arch/arm/boot/uImage ]; then
704 cp -f arch/arm/boot/uImage %{temp_boot}/uImage-$KernelVer
705 else
706 cp -f arch/arm/boot/zImage %{temp_boot}/vmlinuz-$KernelVer
707 fi
708 %else
709 cp -f arch/%{target_arch}/boot/bzImage %{temp_boot}/vmlinuz-$KernelVer
710 %endif
711
712 # modules
713 install -d %{temp_modules}/$KernelVer
714 %smake INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=$KernelVer modules_install
715
716 # remove /lib/firmware, we use a separate kernel-firmware
717 rm -rf %{temp_root}/lib/firmware
718 }
719
720 SaveDevel() {
721 devel_flavour=$1
722
723 DevelRoot=/usr/src/linux-%{kversion}-$devel_flavour-%{buildrpmrel}
724 TempDevelRoot=%{temp_root}$DevelRoot
725
726 mkdir -p $TempDevelRoot
727 for i in $(find . -name 'Makefile*'); do cp -R --parents $i $TempDevelRoot;done
728 for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i $TempDevelRoot;done
729 cp -fR include $TempDevelRoot
730 cp -fR scripts $TempDevelRoot
731 cp -fR kernel/bounds.c $TempDevelRoot/kernel
732 %ifarch %{arm}
733 cp -fR arch/%{target_arch}/tools $TempDevelRoot/arch/%{target_arch}/
734 %endif
735 %ifarch %{ix86} x86_64
736 cp -fR arch/x86/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/x86/kernel/
737 cp -fR arch/x86/kernel/asm-offsets_{32,64}.c $TempDevelRoot/arch/x86/kernel/
738 cp -fR arch/x86/include $TempDevelRoot/arch/x86/
739 %else
740 cp -fR arch/%{target_arch}/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/%{target_arch}/kernel/
741 for f in $(find arch/%{target_arch} -name include); do cp -fR --parents $f $TempDevelRoot; done
742 %endif
743 cp -fR .config Module.symvers $TempDevelRoot
744 cp -fR 3rdparty/mkbuild.pl $TempDevelRoot/3rdparty
745
746 # Needed for truecrypt build (Danny)
747 cp -fR drivers/md/dm.h $TempDevelRoot/drivers/md/
748
749 # Needed for lguest
750 cp -fR drivers/lguest/lg.h $TempDevelRoot/drivers/lguest/
751
752 # Needed for lirc_gpio (#39004)
753 cp -fR drivers/media/video/bt8xx/bttv{,p}.h $TempDevelRoot/drivers/media/video/bt8xx/
754 cp -fR drivers/media/video/bt8xx/bt848.h $TempDevelRoot/drivers/media/video/bt8xx/
755 cp -fR drivers/media/video/btcx-risc.h $TempDevelRoot/drivers/media/video/
756
757 # Needed for external dvb tree (#41418)
758 cp -fR drivers/media/dvb/dvb-core/*.h $TempDevelRoot/drivers/media/dvb/dvb-core/
759 cp -fR drivers/media/dvb/frontends/lgdt330x.h $TempDevelRoot/drivers/media/dvb/frontends/
760
761 # add acpica header files, needed for fglrx build
762 cp -fR drivers/acpi/acpica/*.h $TempDevelRoot/drivers/acpi/acpica/
763
764 # aufs2 has a special file needed
765 #cp -fR fs/aufs/magic.mk $TempDevelRoot/fs/aufs
766
767 for i in alpha avr32 blackfin cris frv h8300 ia64 m32r m68k m68knommu microblaze \
768 mips mn10300 openrisc parisc powerpc s390 score sh sparc tile unicore32 xtensa; do
769 rm -rf $TempDevelRoot/arch/$i
770 done
771
772 %ifnarch %{arm}
773 rm -rf $TempDevelRoot/arch/arm
774 %endif
775 %ifnarch %{ix86} x86_64
776 rm -rf $TempDevelRoot/arch/x86
777 %endif
778
779 # Clean the scripts tree, and make sure everything is ok (sanity check)
780 # running prepare+scripts (tree was already "prepared" in build)
781 pushd $TempDevelRoot >/dev/null
782 %smake -s prepare scripts
783 %smake -s clean
784 popd >/dev/null
785 rm -f $TempDevelRoot/.config.old
786
787 # fix permissions
788 chmod -R a+rX $TempDevelRoot
789
790 # disable mrproper in -devel rpms
791 patch -p1 --fuzz=0 -d $TempDevelRoot -i %{SOURCE2}
792
793 kernel_devel_files=../kernel_devel_files.$devel_flavour
794
795
796 ### Create the kernel_devel_files.*
797 cat > $kernel_devel_files <<EOF
798 %dir $DevelRoot
799 %dir $DevelRoot/arch
800 %dir $DevelRoot/include
801 $DevelRoot/3rdparty
802 $DevelRoot/Documentation
803 %ifarch %{arm}
804 $DevelRoot/arch/arm
805 %endif
806 $DevelRoot/arch/um
807 %ifarch %{ix86} x86_64
808 $DevelRoot/arch/x86
809 %endif
810 $DevelRoot/block
811 $DevelRoot/crypto
812 $DevelRoot/drivers
813 $DevelRoot/firmware
814 $DevelRoot/fs
815 $DevelRoot/include/Kbuild
816 $DevelRoot/include/acpi
817 $DevelRoot/include/asm-generic
818 $DevelRoot/include/config
819 $DevelRoot/include/crypto
820 $DevelRoot/include/drm
821 $DevelRoot/include/generated
822 $DevelRoot/include/keys
823 $DevelRoot/include/linux
824 $DevelRoot/include/math-emu
825 $DevelRoot/include/media
826 $DevelRoot/include/mtd
827 $DevelRoot/include/net
828 $DevelRoot/include/pcmcia
829 $DevelRoot/include/rdma
830 $DevelRoot/include/rxrpc
831 $DevelRoot/include/scsi
832 $DevelRoot/include/sound
833 $DevelRoot/include/target
834 $DevelRoot/include/trace
835 $DevelRoot/include/video
836 $DevelRoot/include/xen
837 $DevelRoot/init
838 $DevelRoot/ipc
839 $DevelRoot/kernel
840 $DevelRoot/lib
841 $DevelRoot/mm
842 $DevelRoot/net
843 $DevelRoot/samples
844 $DevelRoot/scripts
845 $DevelRoot/security
846 $DevelRoot/sound
847 $DevelRoot/tools
848 $DevelRoot/usr
849 $DevelRoot/virt
850 $DevelRoot/.config
851 $DevelRoot/Kbuild
852 $DevelRoot/Kconfig
853 $DevelRoot/Makefile
854 $DevelRoot/Module.symvers
855 $DevelRoot/arch/Kconfig
856 %doc README.kernel-sources
857 EOF
858
859
860 ### Create -devel Post script on the fly
861 cat > $kernel_devel_files-post <<EOF
862 if [ -d /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel} ]; then
863 rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/{build,source}
864 ln -sf $DevelRoot /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build
865 ln -sf $DevelRoot /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source
866 fi
867 EOF
868
869
870 ### Create -devel Preun script on the fly
871 cat > $kernel_devel_files-preun <<EOF
872 if [ -L /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build ]; then
873 rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build
874 fi
875 if [ -L /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source ]; then
876 rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source
877 fi
878 exit 0
879 EOF
880 }
881
882 SaveDebug() {
883 debug_flavour=$1
884
885 install -m 644 vmlinux \
886 %{temp_boot}/vmlinux-%{kversion}-$debug_flavour-%{buildrpmrel}
887 kernel_debug_files=../kernel_debug_files.$debug_flavour
888 echo "%{_bootdir}/vmlinux-%{kversion}-$debug_flavour-%{buildrpmrel}" \
889 >> $kernel_debug_files
890
891 find %{temp_modules}/%{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
892 -name "*.ko" | \
893 %kxargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
894 find %{temp_modules}/%{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
895 -name "*.ko" | %kxargs -I '{}' \
896 sh -c 'cd `dirname {}`; \
897 objcopy --add-gnu-debuglink=`basename {}`.debug \
898 --strip-debug `basename {}`'
899
900 pushd %{temp_modules}
901 find %{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
902 -name "*.ko.debug" > debug_module_list
903 popd
904 cat %{temp_modules}/debug_module_list | \
905 sed 's|\(.*\)|%{_modulesdir}/\1|' >> $kernel_debug_files
906 cat %{temp_modules}/debug_module_list | \
907 sed 's|\(.*\)|%exclude %{_modulesdir}/\1|' \
908 >> ../kernel_exclude_debug_files.$debug_flavour
909 rm -f %{temp_modules}/debug_module_list
910 }
911
912 CreateFiles() {
913 kernel_flavour=$1
914
915 kernel_files=../kernel_files.$kernel_flavour
916
917 ker="vmlinuz"
918 if [ "$kernel_flavour" = "kirkwood" ]; then
919 ker="uImage"
920 fi
921 ### Create the kernel_files.*
922 cat > $kernel_files <<EOF
923 %{_bootdir}/System.map-%{kversion}-$kernel_flavour-%{buildrpmrel}
924 %{_bootdir}/symvers-%{kversion}-$kernel_flavour-%{buildrpmrel}.gz
925 %{_bootdir}/config-%{kversion}-$kernel_flavour-%{buildrpmrel}
926 %{_bootdir}/$ker-%{kversion}-$kernel_flavour-%{buildrpmrel}
927 %dir %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/
928 %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/kernel
929 %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/modules.*
930 %doc README.kernel-sources
931 EOF
932
933 %if %build_debug
934 cat ../kernel_exclude_debug_files.$kernel_flavour >> $kernel_files
935 %endif
936
937 ### Create kernel Post script
938 cat > $kernel_files-post <<EOF
939 %ifarch %{arm}
940 /sbin/installkernel -i -N %{kversion}-$kernel_flavour-%{buildrpmrel}
941 %else
942 /sbin/installkernel %{kversion}-$kernel_flavour-%{buildrpmrel}
943 pushd /boot > /dev/null
944 if [ -L vmlinuz-$kernel_flavour ]; then
945 rm -f vmlinuz-$kernel_flavour
946 fi
947 ln -sf vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel} vmlinuz-$kernel_flavour
948 if [ -L initrd-$kernel_flavour.img ]; then
949 rm -f initrd-$kernel_flavour.img
950 fi
951 ln -sf initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img initrd-$kernel_flavour.img
952 popd > /dev/null
953 %endif
954 %if %build_devel
955 # create kernel-devel symlinks if matching -devel- rpm is installed
956 if [ -d /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
957 rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/{build,source}
958 ln -sf /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build
959 ln -sf /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source
960 fi
961 %endif
962 %if %build_source
963 # create kernel-source symlinks only if matching -devel- rpm is not installed
964 if [ -d /usr/src/linux-%{kversion}-%{buildrpmrel} -a ! -d /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
965 rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/{build,source}
966 ln -sf /usr/src/linux-%{kversion}-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build
967 ln -sf /usr/src/linux-%{kversion}-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source
968 fi
969 %endif
970 EOF
971
972 ### Create kernel Posttrans script
973 cat > $kernel_files-posttrans <<EOF
974 if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
975 /usr/sbin/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{buildrpmrel}
976 fi
977 EOF
978
979 ### Create kernel Preun script on the fly
980 cat > $kernel_files-preun <<EOF
981 /sbin/installkernel -R %{kversion}-$kernel_flavour-%{buildrpmrel}
982 pushd /boot > /dev/null
983 if [ -L vmlinuz-$kernel_flavour ]; then
984 if [ "$(readlink vmlinuz-$kernel_flavour)" = "vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel}" ]; then
985 rm -f vmlinuz-$kernel_flavour
986 fi
987 fi
988 if [ -L initrd-$kernel_flavour.img ]; then
989 if [ "$(readlink initrd-$kernel_flavour.img)" = "initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img" ]; then
990 rm -f initrd-$kernel_flavour.img
991 fi
992 fi
993 popd > /dev/null
994 %if %build_devel
995 if [ -L /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build ]; then
996 rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build
997 fi
998 if [ -L /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source ]; then
999 rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source
1000 fi
1001 %endif
1002 exit 0
1003 EOF
1004
1005
1006 ### Create kernel Postun script on the fly
1007 cat > $kernel_files-postun <<EOF
1008 /sbin/kernel_remove_initrd %{kversion}-$kernel_flavour-%{buildrpmrel}
1009 rm -rf /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel} >/dev/null
1010 EOF
1011 }
1012
1013
1014 CreateKernel() {
1015 flavour=$1
1016
1017 PrepareKernel $flavour $flavour-%{buildrpmrel}
1018
1019 BuildKernel %{kversion}-$flavour-%{buildrpmrel}
1020 %if %build_devel
1021 SaveDevel $flavour
1022 %endif
1023 %if %build_debug
1024 SaveDebug $flavour
1025 %endif
1026 CreateFiles $flavour
1027 }
1028
1029
1030 ###
1031 # DO it...
1032 ###
1033
1034
1035 # Create a simulacro of buildroot
1036 rm -rf %{temp_root}
1037 install -d %{temp_root}
1038
1039
1040 #make sure we are in the directory
1041 cd %src_dir
1042
1043 %ifarch %{ix86}
1044 %if %build_desktop586
1045 CreateKernel desktop586
1046 %endif
1047 %endif
1048
1049 %if %build_desktop
1050 CreateKernel desktop
1051 %endif
1052
1053 %if %build_netbook
1054 CreateKernel netbook
1055 %endif
1056
1057 %if %build_server
1058 CreateKernel server
1059 %endif
1060
1061 %if %build_xen_pvops
1062 CreateKernel xen-pvops
1063 %endif
1064
1065 %ifarch %{arm}
1066 %if %build_iop32x
1067 CreateKernel iop32x
1068 %endif
1069 %if %build_kirkwood
1070 CreateKernel kirkwood
1071 %endif
1072 %if %build_versatile
1073 CreateKernel versatile
1074 %endif
1075 %endif
1076
1077
1078 # We don't make to repeat the depend code at the install phase
1079 %if %build_source
1080 %ifarch %{arm}
1081 PrepareKernel "kirkwood" %{buildrpmrel}custom
1082 %else
1083 PrepareKernel "" %{buildrpmrel}custom
1084 %endif
1085 %smake -s mrproper
1086 %endif
1087
1088
1089 ###
1090 ### install
1091 ###
1092 %install
1093 install -m 644 %{SOURCE4} .
1094
1095 cd %src_dir
1096
1097 # Directories definition needed for installing
1098 %define target_source %{buildroot}%{_kerneldir}
1099 %define target_boot %{buildroot}%{_bootdir}
1100 %define target_modules %{buildroot}%{_modulesdir}
1101
1102 # We want to be able to test several times the install part
1103 rm -rf %{buildroot}
1104 cp -a %{temp_root} %{buildroot}
1105
1106 # Create directories infastructure
1107 %if %build_source
1108 install -d %{target_source}
1109
1110 tar cf - . | tar xf - -C %{target_source}
1111 chmod -R a+rX %{target_source}
1112
1113 # we remove all the source files that we don't ship
1114 # first architecture files
1115 for i in alpha avr32 blackfin cris frv h8300 ia64 m32r m68k m68knommu microblaze \
1116 mips openrisc parisc powerpc s390 score sh sh64 sparc tile unicore32 v850 xtensa mn10300; do
1117 rm -rf %{target_source}/arch/$i
1118 done
1119
1120 # other misc files
1121 rm -f %{target_source}/{.config.old,.config.cmd,.gitignore,.lst,.mailmap}
1122 rm -f %{target_source}/{.missing-syscalls.d,arch/.gitignore,firmware/.gitignore}
1123 rm -rf %{target_source}/.tmp_depmod/
1124
1125 #endif %build_source
1126 %endif
1127
1128 # gzipping modules
1129 find %{target_modules} -name "*.ko" | %kxargs gzip -9
1130
1131 # We used to have a copy of PrepareKernel here
1132 # Now, we make sure that the thing in the linux dir is what we want it to be
1133 for i in %{target_modules}/*; do
1134 rm -f $i/build $i/source
1135 done
1136
1137 # sniff, if we gzipped all the modules, we change the stamp :(
1138 # we really need the depmod -ae here
1139 pushd %{target_modules}
1140 for i in *; do
1141 /sbin/depmod -u -ae -b %{buildroot} -r -F %{target_boot}/System.map-$i $i
1142 echo $?
1143 done
1144
1145 for i in *; do
1146 pushd $i
1147 echo "Creating modules.description for $i"
1148 modules=`find . -name "*.ko.gz"`
1149 echo $modules | %kxargs /sbin/modinfo \
1150 | perl -lne 'print "$name\t$1" if $name && /^description:\s*(.*)/; $name = $1 if m!^filename:\s*(.*)\.k?o!; $name =~ s!.*/!!' > modules.description
1151 popd
1152 done
1153 popd
1154
1155
1156 ###
1157 ### clean
1158 ###
1159 %clean
1160 rm -rf %{buildroot}
1161
1162
1163 # We don't want to remove this, the whole reason of its existence is to be
1164 # able to do several rpm --short-circuit -bi for testing install
1165 # phase without repeating compilation phase
1166 #rm -rf %{temp_root}
1167
1168 ###
1169 ### source and doc file lists
1170 ###
1171
1172 %if %build_source
1173 %files -n %{kname}-source-%{buildrel}
1174 %dir %{_kerneldir}
1175 %dir %{_kerneldir}/arch
1176 %dir %{_kerneldir}/include
1177 %{_kerneldir}/3rdparty
1178 %{_kerneldir}/Documentation
1179 %{_kerneldir}/arch/Kconfig
1180 %{_kerneldir}/arch/arm
1181 %{_kerneldir}/arch/um
1182 %{_kerneldir}/arch/x86
1183 %{_kerneldir}/block
1184 %{_kerneldir}/crypto
1185 %{_kerneldir}/drivers
1186 %{_kerneldir}/firmware
1187 %{_kerneldir}/fs
1188 %{_kerneldir}/include/Kbuild
1189 %{_kerneldir}/include/acpi
1190 %{_kerneldir}/include/asm-generic
1191 %{_kerneldir}/include/crypto
1192 %{_kerneldir}/include/drm
1193 %{_kerneldir}/include/keys
1194 %{_kerneldir}/include/linux
1195 %{_kerneldir}/include/math-emu
1196 %{_kerneldir}/include/media
1197 %{_kerneldir}/include/mtd
1198 %{_kerneldir}/include/net
1199 %{_kerneldir}/include/pcmcia
1200 %{_kerneldir}/include/rdma
1201 %{_kerneldir}/include/rxrpc
1202 %{_kerneldir}/include/scsi
1203 %{_kerneldir}/include/sound
1204 %{_kerneldir}/include/target
1205 %{_kerneldir}/include/trace
1206 %{_kerneldir}/include/video
1207 %{_kerneldir}/include/xen
1208 %{_kerneldir}/init
1209 %{_kerneldir}/ipc
1210 %{_kerneldir}/kernel
1211 %{_kerneldir}/lib
1212 %{_kerneldir}/mm
1213 %{_kerneldir}/net
1214 %{_kerneldir}/virt
1215 %{_kerneldir}/samples
1216 %{_kerneldir}/scripts
1217 %{_kerneldir}/security
1218 %{_kerneldir}/sound
1219 %{_kerneldir}/tools
1220 %{_kerneldir}/usr
1221 %{_kerneldir}/COPYING
1222 %{_kerneldir}/CREDITS
1223 %{_kerneldir}/Kbuild
1224 %{_kerneldir}/Kconfig
1225 %{_kerneldir}/MAINTAINERS
1226 %{_kerneldir}/Makefile
1227 %{_kerneldir}/README
1228 %{_kerneldir}/REPORTING-BUGS
1229 %doc README.kernel-sources
1230
1231 %files -n %{kname}-source-latest
1232 %endif
1233
1234 %if %build_doc
1235 %files -n %{kname}-doc
1236 %doc linux-%{tar_ver}/Documentation/*
1237 %endif

  ViewVC Help
Powered by ViewVC 1.1.28