]> git.pld-linux.org Git - packages/kernel.git/blob - kernel.spec
- killed reiserfs patches, I'm fed up with this crappy spaghetti code
[packages/kernel.git] / kernel.spec
1 #
2 # If you define the following as 1, only kernel, -headers and -source
3 # packages will be built
4 #
5 # _without_smp          - don't build SMP kernel
6 # _without_up           - don't build UP kernel
7 # _without_boot         - don't build BOOT kernel
8 # _without_source       - don't build source
9 # _without_doc          - don't build documentation package
10 # _without_grsec        - don't apply grsecurity patch
11 # _without_kheaders     - build without support for glibc-kernel-headers
12 #
13 %define         base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/')
14 %define         no_install_post_strip   1
15 %define         no_install_post_compress_modules        1
16 #
17 %define         pre_version             rc6
18 %define         drm_xfree_version       4.3.0
19 %define         netfilter_snap          20030915
20 %define         i2c_version             2.8.0
21 Summary:        The Linux kernel (the core of the Linux operating system)
22 Summary(de):    Der Linux-Kernel (Kern des Linux-Betriebssystems)
23 Summary(es):    Núcleo (Kernel) linux genérico
24 Summary(fr):    Le Kernel-Linux (La partie centrale du systeme)
25 Summary(pl):    J±dro Linuksa
26 Summary(pt_BR): Kernel Linux (a parte central do sistema operacional Linux)
27 Name:           kernel
28 Version:        2.4.22
29 Release:        1.1
30 License:        GPL
31 Group:          Base/Kernel
32 Source0:        ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-%{version}.tar.bz2
33 # Source0-md5:  75dc85149b06ac9432106b8941eb9f7b
34 Source1:        %{name}-autoconf.h
35 Source2:        %{name}-BuildASM.sh
36 Source3:        http://www.garloff.de/kurt/linux/dc395/dc395-141.tar.gz
37 # Source3-md5:  8ed492197244b6a772270417c66214d3
38 Source4:        linux-2.4.22-netfilter-%{netfilter_snap}.tar.gz
39 # Source4-md5:  6b6cff7293a7b75474c97c9740628bf4
40 Source5:        linux-2.4.19-netfilter-IMQ.patch.tar.bz2
41 # Source5-md5:  b8f2f7a268a5cb75fabcaec3b5d45fcd
42 Source7:        http://www10.software.ibm.com/developer/opensource/jfs/project/pub/jfs-2.4-1.1.2.tar.gz
43 # Source7-md5:  2473f345c66683a03ad27ff132d405b7
44 Source8:        http://www.xfree86.org/~alanh/linux-drm-%{drm_xfree_version}-kernelsource.tar.gz
45 # Source8-md5:  34515784c7b67f6cc9169aa9eed982c7
46 Source10:       linux-2.4.20-aacraid.tar.bz2
47 # Source10-md5: 3da1f4b229685766cb4f2f5ce242c0d2
48 Source20:       %{name}-ia32.config
49 Source21:       %{name}-ia32-smp.config
50 Source50:       %{name}-sparc.config
51 Source51:       %{name}-sparc-smp.config
52 Source60:       %{name}-sparc64.config
53 Source61:       %{name}-sparc64-smp.config
54 Source70:       %{name}-alpha.config
55 Source71:       %{name}-alpha-smp.config
56 Source73:       %{name}-ppc.config
57 Source74:       %{name}-ppc-smp.config
58 Source1000:     %{name}-addon.config
59 Source1001:     %{name}-netfilter.config
60 Source1002:     %{name}-grsec.config
61 Source2000:     %{name}-win4lin.config
62
63 # New features/updates/backports
64
65 # Essential stuff
66
67 Patch0:         %{name}-pldfblogo.patch
68 # from ftp://ftp.kernel.org/pub/linux/kernel/people/hvr/testing/
69 Patch10:        patch-cryptoloop-jari-2.4.22-rc2.0
70 # from ftp://ftp.xs4all.nl/pub/crypto/freeswan/freeswan-*
71 Patch12:        linux-2.4.21-freeswan-2.00.patch.gz
72 Patch15:        linux-2.4.21-sched-O1.patch
73 # http://dl.sourceforge.net/user-mode-linux/uml-patch-2.4.20-6.bz2
74 Patch20:        uml-patch-2.4.20-6-21.bz2
75 Patch21:        linux-2.4.21-uml-o1.patch
76 # http://dl.sourceforge.net/user-mode-linux/host-skas3.patch
77 Patch22:        linux-2.4.20-uml-host-skas3.patch
78 Patch23:        linux-bigger-printk-buffer.patch
79
80 # New filesystems
81
82 # http://linux-xfs.sgi.com/projects/xfs/
83 #Patch25:       linux-2.4.21-core-xfs-1.3.0.patch.gz
84 #Patch26:       linux-xfs-1.3.0pre5.patch.gz
85 Patch25:        linux-2.4.22-xfs-2003-09-03.patch.gz
86 # http://acl.bestbits.at/
87 Patch30:        linux-2.4.21-jfs-xattr.patch
88 Patch31:        linux-2.4.21-jfs-acl.patch
89 Patch32:        linux-2.4.22-ea+acl+nfsacl-0.8.60.diff.gz
90 # http://dl.sourceforge.net/linux-ntfs/
91 Patch40:        linux-2.4.22-ntfs-2.1.4c.patch.gz
92 # FC01_davfs_0.2.4.patch
93 Patch50:        linux-2.4.20-davfs-0.2.4.patch.bz2
94 # FC02_davfs__FUNCTION__.patch
95 Patch55:        linux-2.4.20-davfs-_FUNCTION_.patch
96 # http://dl.sourceforge.net/squashfs/squashfs-1.3.tar.gz
97 Patch65:        squashfs1.3-2.4.21-patch
98 #from http://sci.felk.cvut.cz/nwd/linux/nwd-patch-2.4.19
99 Patch70:        nwd-2.4.21.patch
100 Patch80:        linux-2.4.22-intermezzo-acl.patch
101
102 # Networking
103
104 # new version of netfilter.
105 Patch100:       linux-2.4.22-netfilter-%{netfilter_snap}.patch.gz
106 # http://ebtables.sourceforge.net/
107 Patch110:       ebtables-brnf-2_vs_2.4.22.diff.gz
108 # http://www.linuxvirtualserver.org/software/kernel-2.4/linux-2.4.18-ipvs-%{ipvs_version}.patch.gz
109 Patch115:       linux-2.4.22-ipvs-1.0.9.patch.gz
110 # http://trash.net/~kaber/imq/
111 Patch120:       imq-2.4.18.diff-10
112 # ftp://ftp.samba.org/pub/unpacked/ppp/linux/mppe/
113 Patch125:       linux-2.4.18-mppe.patch
114 Patch130:       linux-2.4.22-tun-new-style.patch
115
116 # ATM bugfixes
117 # Patches by Chas Williams <chas@locutus.cmf.nrl.navy.mil>
118 # Included in Chas patch:
119 # http://tulipe.cnam.fr/personne/lizzi/linux/linux-2.3.99-pre6-fore200e-0.2f.tar.gz
120 # http://christophe.lizzi.free.fr/linux/linux-2.4.0-test9-fore200e-0.3.tar.gz
121 # ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/
122 Patch150:       linux-2.4.21-atm_diffs.patch
123 Patch151:       ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
124 Patch152:       linux-2.4.22-fore200e-0.2f.patch
125
126 # New devices/drivers
127
128 # http://people.sistina.com/~thornber/patches/2.4-stable/
129 Patch200:       linux-2.4.22-dm-1.patch
130
131 # EVMS support (http://www.sourceforge.net/projects/evms/)
132 # Disabled due to conflicts with LVM2 and device mapper tools
133 Patch205:       linux-2.4.22-evms-2.1.1.patch
134
135 #from http://dl.sourceforge.net/i810fb/linux-2.4.20-i810fb.diff.bz2
136 Patch210:       linux-2.4.21-I810FB.patch.gz
137
138 # Support for CDRW packet writing
139 Patch215:       %{name}-cdrw-packet.patch
140 Patch216:       %{name}-cd-mrw-2.patch
141 Patch225:       wrr-linux-2.4.9.patch
142 Patch226:       linux-2.4.18-esfq.diff
143 Patch227:       layer7-kernel2.4patch-v0.1.4.patch
144
145 Patch231:       linux-2.4.21-aic7xxx-mmapio.patch
146 Patch235:       linux-2.4.20-audigy.patch.bz2
147 Patch240:       linux-2.4.20-ecc.patch
148 Patch245:       linux-2.4.20-01-edd.patch
149 Patch246:       linux-2.4.20-02-edd-allocate.patch
150 # i2c - version 2.8.0
151 Patch255:       linux-2.4.22-i2c-%{i2c_version}.patch
152 Patch256:       linux-2.4.21-i2c-headers.patch
153 Patch257:       linux-2.4.21-i2c-sparc64.patch
154 Patch265:       linux-2.4.20-e820.patch
155 # Syntax bug
156 Patch270:       dc395-tab.patch
157 # http://www.qlogic.com/
158 Patch275:       linux-2.4.20-qla2x00-v6.04.00-fo.patch.gz
159 # ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-1.18j/megaraid-v1.18j.tgz
160 Patch280:       %{name}-megaraid.patch
161
162 # TV stuff from http://bytesex.org/
163 Patch300:       19_videodev25-2.4.22.diff
164 Patch301:       20_v4l2-2.4.22.diff.gz
165 Patch302:       30_bt832-2.4.22.diff
166 Patch303:       30_btaudio-2.4.22.diff
167
168 # The following go last as they touch a lot of code
169 # and/or are on bcond and/or are ifarch
170
171 # Win4Lin
172 Patch900:       linux-2.4.20-Win4Lin.PLD.patch.bz2
173 Patch991:       linux-2.4.20-Win4Lin-mki-adapter.patch.bz2
174
175 # Assorted bugfixes
176
177 # jam - http://giga.cps.unizar.es/~magallon/linux/kernel/
178 Patch1000:      jam-04-clone-detached.patch
179 Patch1002:      jam-06-force-inline.patch
180 Patch1003:      jam-07-scsi-error-tmout.patch
181 Patch1006:      jam-10-highpage-init.patch
182 Patch1007:      jam-11-self_exec_id.patch
183 Patch1008:      jam-15-fast-csum-D.patch
184 Patch1009:      jam-21-mem-barriers.patch
185 Patch1010:      jam-30-smptimers-A0.patch
186
187 Patch1102:      linux-2.4.20-lvm-updates.patch
188
189 # IrDA patch for broken IBM Latpops
190 Patch1104:      linux-2.4.21-irda-ibm.patch
191
192 # fix lun probing on multilun RAID chassis
193 Patch1105:      linux-2.4.12-scsi_scan.patch
194 Patch1106:      linux-scsi-debug-bug.patch
195
196 # This patch allows to create more than one sound device using alsa
197 # and devfs with two or more sound cards
198 Patch1111:      linux-sound_core.patch
199
200 # rivafb - fix for text background in 16bpp modes
201 Patch1150:      linux-rivafb16.patch
202 Patch1152:      linux-2.4.20-agp_uninorth.patch
203 Patch1154:      linux-2.4.20-drm-Makefile.patch
204
205 Patch1201:      linux-2.4.21-cpqfc.patch
206 Patch1203:      linux-2.4.20-amd-golem.patch
207 Patch1205:      linux-53c7,8xx-build.fix
208 Patch1207:      linux-2.4.20-serverworks.patch
209 # this patch adds support for "io" and "irq" options in PCNet32 driver module
210 Patch1209:      linux-2.4.19-pcnet-parms.patch
211
212 # disable some networking printk's
213 Patch1250:      linux-2.4.1-netdebug.patch
214 Patch1251:      linux-2.4.2-raw-ip.patch
215 Patch1252:      linux-2.4.19-netmos_pci_parallel_n_serial.patch
216 Patch1253:      linux-proc_net_dev-counter-fix.patch
217 Patch1254:      kernel-2.4.17-netsyms-export-fix.patch
218 Patch1255:      linux-2.4.20-pre1-nr_frags.patch
219
220 Patch1301:      linux-2.4.18-hpfs.patch
221 Patch1302:      linux-2.4.18-nfs-default-size.patch
222 Patch1303:      linux-2.4.20-irixnfs.patch
223 # Tru64 NFS kludge
224 Patch1304:      linux-2.4.21-tru64nfs.patch
225 Patch1305:      linux-2.4.21-nfs-silly-rename.patch
226
227 Patch1350:      linux-2.4.21-nousb.patch
228 # from http://www.noc.uoa.gr/~avel/page.php?page=nokia&lang=en
229 Patch1354:      linux-2.4.20-Nokia5510.patch
230
231 # raid5 xor fix for PIII/P4, should go away shortly
232 Patch1400:      linux-2.4.0-raid5xor.patch
233 Patch1401:      linux-2.4.0-nonintconfig.patch
234 # Add an ioctl to the block layer so we can be EFI compliant
235 Patch1402:      linux-2.4.2-blkioctl-sector.patch
236 Patch1403:      linux-2.4.3-pcipenalty.patch
237 Patch1404:      linux-2.4.3-rawio.patch
238 Patch1405:      linux-2.4.7-suspend.patch
239 Patch1407:      kernel-Makefile-include-fix.patch
240 Patch1408:      kernel-pswscancode.patch
241 Patch1410:      linux-2.4.18-input-35215.patch
242 Patch1411:      linux-2.4.18-kiobuf.patch
243 Patch1413:      linux-2.4.22-andrea-9980_fix-pausing-6.patch
244 Patch1414:      linux-2.4.21-oopsmeharder.patch
245 Patch1415:      linux-mtd-missing-include-fix-2.4.7-pre6.patch
246 Patch1416:      linux-2.4.21-no-FPU.patch
247 Patch1417:      linux-2.4.22-ac4-ide+sata.patch
248 Patch1418:      linux-2.4.21-hpt372-chicken-egg-hack.patch
249 Patch1419:      linux-2.4.21-agp-num_of_masks.patch
250 # fix spare disk counting for raid 5
251 Patch1420:      linux-raid5-spare-counting.patch
252 Patch1421:      linux-2.4.21-bttv-typo.patch
253 Patch1422:      linux-2.4.21-ipt_TRACE-typo.patch
254 Patch1423:      linux-2.4.22-alpha-kmap_types.patch
255
256 # htb
257 # http://luxik.cdi.cz/~devik/qos/htb/v3/
258 Patch1501:      htb_killdbg_2421.diff
259 Patch1600:      linux-pcwd.patch
260
261 Patch2000:      linux-PPC-SMP.patch
262 Patch2001:      linux-2.4-ppc-procesor.patch
263 Patch2002:      kernel-2.4.18-SPARC64-PLD.patch
264 Patch2003:      linux-2.4.20-AXP-avma1_cs.patch
265 Patch2004:      linux-2.4.22-ppc-amd8111e.patch
266
267 Patch3000:      linux-2.4.1-compilefailure.patch
268 Patch3002:      linux-2.4.20-EXPORT_SYMBOL.patch
269 Patch3003:      linux-2.4.20-missing-license-tags.patch
270 Patch3004:      linux-2.4.20-sym53c8xx_old.patch
271 Patch3005:      linux-2.4.21-gcc33.patch
272 Patch3006:      linux-2.4.21-sparc-gcc3.patch
273 Patch3008:      linux-drm-4.2.0-force-cmpxchg.patch
274 Patch3009:      linux-2.4.21-alpha-gcc33.patch
275 Patch3010:      linux-2.4.21-ipsec-sparc64.patch
276 Patch3011:      linux-2.4.22-gcc33-inline.patch
277 Patch3012:      linux-2.4.22-gcc-ext3.patch
278
279 # Security patches/fixes
280
281 Patch4000:      linux-2.4.22-ow1-stack.patch
282 Patch4001:      grsecurity-nopax-2.0-rc3-2.4.22.patch
283
284 Patch5000:      linux-2.4.22-security.patch
285
286 #Patch10000:    ftp://ftp.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.21-rc6.bz2
287
288 ExclusiveOS:    Linux
289 URL:            http://www.kernel.org/
290 %ifarch         %{ix86}
291 BuildRequires:  bin86
292 %endif
293 #BuildRequires: %{kgcc_package}
294 BuildRequires:  modutils
295 BuildRequires:  ed
296 Autoreqprov:    no
297 PreReq:         modutils
298 PreReq:         geninitrd >= 2.40
299 Requires(post,postun):  fileutils
300 Requires(postun):       awk
301 Provides:       %{name}-up = %{version}-%{release}
302 Provides:       module-info
303 Provides:       i2c = %{i2c_version}
304 Provides:       bttv = 0.7.83
305 Provides:       %{name}(netfilter) = 1.2.8-%{netfilter_snap}
306 Provides:       %{name}(reiserfs) = %{version}
307 Provides:       %{name}(agpgart) = %{version}
308 #Provides:      %{name}(cdrw)
309 #Provides:      %{name}(cdmrw)
310 Obsoletes:      kernel-modules
311 ExclusiveArch:  %{ix86} sparc sparc64 alpha ppc
312 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
313 Conflicts:      iptables < 1.2.8
314 Conflicts:      lvm < 1.0.4
315 Conflicts:      xfsprogs < 2.1.0
316 Conflicts:      reiserfsprogs < 3.6.3
317 Conflicts:      e2fsprogs < 1.25
318 Conflicts:      jfsutils < 1.0.12
319 Conflicts:      util-linux < 2.10o
320 Conflicts:      modutils < 2.4.2
321 Conflicts:      quota < 3.06
322 Conflicts:      linux-atm < 2.4.1
323 Conflicts:      device-mapper < 1.00.05
324
325 %description
326 This package contains the Linux kernel that is used to boot and run
327 your system. It contains few device drivers for specific hardware.
328 Most hardware is instead supported by modules loaded after booting.
329
330 %description -l de
331 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
332 Linux-Betriebssystems. Der Kernel ist für grundliegende
333 Systemfunktionen verantwortlich: Speicherreservierung,
334 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
335
336 %description -l es
337 Este paquete contiene núcleo (kernel) Linux que se usa para arranque y
338 funcionamiento de tu sistema. Contiene soporte a pocos hardwares
339 específicos. La mayoría de los hardwares son soportados, vía módulos
340 que se cargan después del arranque.
341
342 %description -l fr
343 Le package kernel contient le kernel linux (vmlinuz), la partie
344 centrale d'un système d'exploitation Linux. Le noyau traite les
345 fonctions basiques d'un système d'exploitation: allocation mémoire,
346 allocation de process, entrée/sortie de peripheriques, etc.
347
348 %description -l pl
349 Pakiet zawiera j±dro Linuksa niezbêdne do prawid³owego dzia³ania
350 Twojego komputera. Zawiera w sobie sterowniki do sprzêtu znajduj±cego
351 siê w komputerze, takich jak karty muzyczne, sterowniki dysków, etc.
352
353 %description -l pt_BR
354 Este pacote contém o kernel Linux que é usado para inicialização
355 e funcionamento de seu sistema. Contém suporte a poucos hardwares
356 específicos. A maioria dos hardwares são suportados via módulos
357 que são carregados após a inicialização.
358
359 %package smp
360 Summary:        Kernel version %{version} compiled for SMP machines
361 Summary(de):    Kernel version %{version} für Multiprozessor-Maschinen
362 Summary(es):    Núcleo (kernel) compilado para máquinas SMP
363 Summary(fr):    Kernel version %{version} compiler pour les machine Multi-Processeur
364 Summary(pl):    J±dro Linuksa %{version} skompilowane dla maszyn wieloprocesorowych
365 Summary(pt_BR): Kernel compilado para máquinas SMP
366 Group:          Base/Kernel
367 Autoreqprov:    no
368 PreReq:         modutils
369 PreReq:         geninitrd >= 2.21
370 Requires(post,postun):  fileutils
371 Requires(postun):       awk
372 Provides:       %{name}-smp = %{version}-%{release}
373 Provides:       module-info
374 Provides:       i2c = %{i2c_version}
375 Provides:       bttv = 0.7.83
376 Provides:       %{name}(netfilter) = 1.2.8-%{netfilter_snap}
377 Provides:       %{name}(reiserfs) = %{version}
378 Provides:       %{name}(agpgart) = %{version}
379 #Provides:      %{name}(cdrw)
380 #Provides:      %{name}(cdmrw)
381 Conflicts:      iptables < 1.2.8
382 Conflicts:      lvm < 1.0.4
383 Conflicts:      xfsprogs < 2.1.0
384 Conflicts:      reiserfsprogs < 3.6.3
385 Conflicts:      e2fsprogs < 1.25
386 Conflicts:      jfsutils < 1.0.12
387 Conflicts:      util-linux < 2.10o
388 Conflicts:      modutils < 2.4.2
389 Conflicts:      quota < 3.06
390 Conflicts:      linux-atm < 2.4.1
391 Conflicts:      device-mapper < 1.00.05
392
393 %description smp
394 This package includes a SMP version of the Linux %{version} kernel. It
395 is required only on machines with two or more CPUs, although it should
396 work fine on single-CPU boxes.
397
398 %description smp -l de
399 Dieses Paket enthält eine SMP (Multiprozessor)-Version von
400 Linux-Kernel %{version}. Es wird für Maschinen mit zwei oder mehr
401 Prozessoren gebraucht, sollte aber auch auf Computern mit nur einer
402 CPU laufen.
403
404 %description smp -l es
405 Núcleo (kernel) compilado para máquinas SMP
406
407 %description smp -l fr
408 Ce package inclu une version SMP du noyau de Linux version %{version}.
409 Il et nécessaire seulement pour les machine avec deux processeurs ou
410 plus, il peut quand même fonctionner pour les système mono-processeur.
411
412 %description smp -l pl
413 Pakiet zawiera j±dro SMP Linuksa w wersji %{version}. Jest ono
414 wymagane przez komputery zawieraj±ce dwa lub wiêcej procesorów.
415 Powinno równie¿ dobrze dzia³aæ na maszynach z jednym procesorem.
416
417 %description smp -l pt_BR
418 Este pacote inclui uma versão SMP do kernel Linux versão %{version}.
419 Ele deve ser utilizado apenas em máquinas com dois ou mais processadores,
420 apesar de trabalhar perfeitamente em máquinas com apenas um processador.
421
422 %package BOOT
423 Summary:        Kernel version %{version} used on the installation boot disks
424 Summary(de):    Kernel version %{version} für Installationsdisketten
425 Summary(es):    Núcleo (kernel) de Linux, utilizado en el disco de instalación
426 Summary(fr):    Kernel version %{version} utiliser pour les disquettes d'installation
427 Summary(pl):    J±dro Linuksa %{version} dla bootkietek instalacyjnych
428 Summary(pt_BR): Kernel Linux utilizado no disco de instalação
429 Group:          Base/Kernel
430 Autoreqprov:    no
431 PreReq:         modutils
432 Requires(post,postun):  fileutils
433 Requires(postun):       awk
434
435 %description BOOT
436 This package includes a trimmed down version of the Linux %{version}
437 kernel. This kernel is used on the installation boot disks only and
438 should not be used for an installed system, as many features in this
439 kernel are turned off because of the size constraints.
440
441 %description BOOT -l de
442 Dieses Paket enthält eine verkleinerte Version vom Linux-Kernel
443 version %{version}. Dieser Kernel wird auf den
444 Installations-Bootdisketten benutzt und sollte nicht auf einem
445 installierten System verwendet werden, da viele Funktionen wegen der
446 Platzprobleme abgeschaltet sind.
447
448 %description BOOT -l es
449 Núcleo (kernel) de Linux, utilizado en el disco de instalación
450
451 %description BOOT -l pl
452 Pakiet zawiera j±dro Linuksa dedykowane dyskietkom startowym i powinno
453 byæ u¿ywane jedynie podczas instalacji systemu. Wiele u¿ytecznych
454 opcji zosta³o wy³±czonych, aby jak najbardziej zmniejszyæ jego
455 rozmiar.
456
457 %description BOOT -l pt_BR
458 Este pacote inclui uma versão minimizada do kernel Linux, criada para
459 ser utilizada *apenas* no disco de instalação, e não deve ser utilizada
460 em máquinas já instaladas, pois várias características do kernel
461 são desabilitadas para diminuir o tamanho final do kernel a ser utilizado.
462
463 %package pcmcia-cs
464 Summary:        PCMCIA-CS modules
465 Summary(pl):    Modu³y PCMCIA-CS
466 Group:          Base/Kernel
467 PreReq:         %{name}-up = %{version}-%{release}
468 Requires(postun):       %{name}-up = %{version}-%{release}
469 Provides:       %{name}-pcmcia-cs = %{pcmcia_version}
470
471 %description pcmcia-cs
472 PCMCIA-CS modules (%{pcmcia_version}).
473
474 %description pcmcia-cs -l pl
475 Modu³y PCMCIA-CS (%{pcmcia_version}).
476
477 %package smp-pcmcia-cs
478 Summary:        PCMCIA-CS modules for SMP kernel
479 Summary(pl):    Modu³y PCMCIA-CS dla maszyn SMP
480 Group:          Base/Kernel
481 PreReq:         %{name}-smp = %{version}-%{release}
482 Requires(postun):       %{name}-smp = %{version}-%{release}
483 Provides:       %{name}-pcmcia-cs = %{pcmcia_version}
484
485 %description smp-pcmcia-cs
486 PCMCIA-CS modules for SMP kernel (%{pcmcia_version}).
487
488 %description smp-pcmcia-cs -l pl
489 Modu³y PCMCIA-CS dla maszyn SMP (%{pcmcia_version}).
490
491 %package drm
492 Summary:        DRM kernel modules
493 Summary(pl):    Sterowniki DRM
494 Group:          Base/Kernel
495 PreReq:         %{name}-up = %{version}-%{release}
496 Requires(postun):       %{name}-up = %{version}-%{release}
497 Provides:       %{name}-drm = %{drm_xfree_version}
498
499 %description drm
500 DRM kernel modules (%{drm_xfree_version}).
501
502 %description drm -l pl
503 Sterowniki DRM (%{drm_xfree_version}).
504
505 %package smp-drm
506 Summary:        DRM SMP kernel modules
507 Summary(pl):    Sterowniki DRM dla maszyn wieloprocesorowych
508 Group:          Base/Kernel
509 PreReq:         %{name}-smp = %{version}-%{release}
510 Requires(postun):       %{name}-smp = %{version}-%{release}
511 Provides:       %{name}-drm = %{drm_xfree_version}
512
513 %description smp-drm
514 DRM SMP kernel modules (%{drm_xfree_version}).
515
516 %description smp-drm -l pl
517 Sterowniki DRM dla maszyn wieloprocesorowych (%{drm_xfree_version}).
518
519 %package headers
520 Summary:        Header files for the Linux kernel
521 Summary(es):    Archivos de inclusión para núcleo (kernel) Linux.
522 Summary(pl):    Pliki nag³ówkowe j±dra
523 Summary(pt_BR): Arquivos de inclusão para o kernel Linux.
524 Group:          Base/Kernel
525 Autoreqprov:    no
526 Requires(post,postun):  fileutils
527 Requires(postun):       awk
528 Provides:       %{name}-headers(agpgart) = %{version}
529 Provides:       %{name}-headers(reiserfs) = %{version}
530 Provides:       %{name}-headers(bridging) = %{version}
531 Provides:       i2c-devel = %{i2c_version}
532 Provides:       %{name}-headers(netfilter) = 1.2.8-%{netfilter_snap}
533
534 %description headers
535 These are the C header files for the Linux kernel, which define
536 structures and constants that are needed when building most standard
537 programs under Linux, as well as to rebuild the kernel.
538
539 %description headers -l es
540 Estos son los archivos de inclusión C para núcleo (kernel) Linux, que define
541 estructuras y constantes que son necesarias a la construcción de la
542 mayoría de los programas en el Linux, como también para reconstruir
543 el núcleo (kernel).
544
545 %description headers -l pl
546 Pakiet zawiera pliki nag³ówkowe j±dra, niezbêdne do rekompilacji j±dra
547 oraz niektórych programów.
548
549 %description headers -l pt_BR
550 Estes são os arquivos de inclusão C para o kernel Linux, os
551 quais definem estruturas e constantes que são necessárias para
552 a construção da maioria dos programas no Linux, bem como para
553 reconstruir o próprio kernel.
554
555 %package source
556 Summary:        Kernel source tree
557 Summary(es):    Fuentes del núcleo (kernel) Linux
558 Summary(pl):    Kod ¼ród³owy j±dra Linuksa
559 Summary(pt_BR): Fontes do kernel Linux
560 Group:          Base/Kernel
561 Autoreqprov:    no
562 Requires:       %{name}-headers = %{version}-%{release}
563 %ifarch %{ix86}
564 Requires:       bin86
565 %endif
566
567 %description source
568 This is the source code for the Linux kernel. It is required to build
569 most C programs as they depend on constants defined in here. You can
570 also build a custom kernel that is better tuned to your particular
571 hardware.
572
573 %description source -l de
574 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
575 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
576 C-Programme zu compilieren, da sie auf Konstanten zurückgreifen, die
577 im Kernel-Source definiert sind. Die Source-Dateien können auch
578 benutzt werden, um einen Kernel zu compilieren, der besser auf Ihre
579 Hardware ausgerichtet ist.
580
581 %description source -l es
582 Este es el fuente para el núcleo (kernel) Linux. Se necesita para la
583 construcción de la mayoría de los programas C, pues dependen de
584 constantes definidas en él. Tu puedes también construir un núcleo (kernel)
585 personalizado que será lo mejor configurado para tu hardware en
586 particular.
587
588 %description source -l fr
589 Le package pour le kernel-source contient le code source pour le noyau
590 linux. Ces sources sont nécessaires pour compiler la plupart des
591 programmes C, car il dépend de constantes définies dans le code
592 source. Les sources peuvent être aussi utilisée pour compiler un noyau
593 personnalisé pour avoir de meilleures performances sur des matériels
594 particuliers.
595
596 %description source -l pl
597 Pakiet zawiera kod ¼ród³owy j±dra systemu.
598
599 %description source -l pt_BR
600 Este é o fonte para o kernel Linux. É necessário para a
601 construção da maioria dos programas C, pois eles dependem de
602 constantes definidas nele. Você também pode construir um kernel
603 personalizado que será melhor configurado para seu hardware particular.
604
605 %package doc
606 Summary:        Kernel documentation
607 Summary(es):    Documentación para los archivos fuente del núcleo (kernel) de Linux
608 Summary(pl):    Dokumentacja do j±dra Linuksa
609 Summary(pt_BR): Documentação para os arquivos fontes do kernel Linux
610 Group:          Base/Kernel
611 Provides:       %{name}-doc = %{version}
612 Autoreqprov:    no
613
614 %description doc
615 This is the documentation for the Linux kernel, as found in
616 /usr/src/linux/Documentation directory.
617
618 %description doc -l es
619 Documentación para los archivos fuente del núcleo (kernel) de Linux
620
621 %description doc -l pl
622 Pakiet zawiera dokumentacjê j±dra z katalogu
623 /usr/src/linux/Documentation.
624
625 %description doc -l pt_BR
626 Este pacote contém documentação para o kernel Linux.
627
628 %prep
629 %setup -q -a3 -a8 -n linux-%{version}
630 # JFS 1.1.1
631 rm -fr fs/jfs
632 gzip -dc %{SOURCE7} | tar -xf -
633 # Adaptec AACRaid new drivers
634 rm -fr drivers/scsi/aacraid
635 bzip2 -dc %{SOURCE10} | tar -xf - -C drivers/scsi/
636 # Changing DRM source ....
637 cp -f drm/*.{c,h} drivers/char/drm/
638 %patch0 -p1
639 %patch10 -p1
640 %patch12 -p1
641 %patch15 -p1
642 %patch20 -p1
643 %patch21 -p1
644 %patch22 -p1
645 %patch23 -p1
646 %patch25 -p1
647 #%patch26 -p1
648 %patch30 -p1
649 %patch32 -p1
650 %patch31 -p1
651 %patch40 -p1
652 %patch50 -p1
653 %patch55 -p1
654 %patch65 -p1
655 %patch70 -p1
656 %patch80 -p1
657 %patch100 -p1
658 %patch110 -p1
659 %patch115 -p1
660 %patch120 -p1
661 %patch125 -p1
662 %patch130 -p1
663 #%patch150 -p1
664 %patch151 -p1
665 %patch152 -p1
666 %patch200 -p1
667 %patch205 -p1
668 %patch210 -p1
669 #%patch215 -p1
670 #%patch216 -p1
671 %patch225 -p1
672 %patch226 -p1
673 %patch227 -p1
674 %patch231 -p1
675 %patch235 -p1
676 %patch240 -p1
677 %patch245 -p1
678 %patch246 -p1
679 %patch255 -p1
680 %patch256 -p1
681 %patch257 -p1
682 %patch265 -p1
683 %patch275 -p1
684 %patch280 -p1
685 %patch300 -p1
686 %patch301 -p1
687 %patch302 -p1
688 %patch303 -p1
689 %patch1000 -p1
690 %patch1002 -p1
691 %patch1003 -p1
692 %patch1006 -p1
693 %patch1007 -p1
694 #%patch1008 -p1
695 %patch1009 -p1
696 %patch1010 -p1
697 %patch1102 -p1
698 %patch1104 -p0
699 %patch1105 -p1
700 %patch1106 -p0
701 %patch1111 -p1
702 %patch1150 -p1
703 %patch1152 -p1
704 %patch1154 -p1
705 %patch1201 -p1
706 %patch1203 -p1
707 %patch1205 -p1
708 %patch1207 -p1
709 %patch1209 -p1
710 %patch1250 -p1
711 %patch1251 -p1
712 %patch1252 -p1
713 %patch1253 -p1
714 %patch1254 -p0
715 %patch1255 -p1
716 %patch1301 -p1
717 %patch1302 -p1
718 %patch1303 -p1
719 %patch1304 -p1
720 %patch1305 -p1
721 %patch1350 -p1
722 %patch1354 -p1
723 %patch1400 -p1
724 %patch1401 -p1
725 %patch1402 -p1
726 %patch1403 -p1
727 %patch1404 -p1
728 %patch1405 -p1
729 %patch1407 -p1
730 %patch1408 -p1
731 %patch1410 -p1
732 %patch1411 -p1
733 %patch1413 -p1
734 %patch1414 -p1
735 %patch1415 -p0
736 %patch1416 -p1
737 %patch1417 -p1
738 %patch1418 -p1
739 %patch1419 -p1
740 %patch1420 -p1
741 %patch1421 -p1
742 %patch1422 -p1
743 %patch1423 -p1
744 %patch1501 -p1
745
746 %patch1600 -p1
747
748 %patch2000 -p0
749 %patch2001 -p1
750 %patch2002 -p1
751 %patch2003 -p1
752 %ifarch ppc
753 %patch2004 -p1
754 %endif
755
756 %patch3000 -p1
757 %patch3002 -p1
758 %patch3003 -p1
759 %patch3004 -p1
760 %patch3005 -p1
761 %patch3006 -p1
762 %patch3009 -p1
763 cd drivers/char/drm
764 %patch3008 -p1
765 cd ../../..
766
767 %ifarch sparc64
768 %patch3010 -p1
769 %endif
770
771 %patch3011 -p1
772 %patch3012 -p1
773
774 %patch5000 -p1
775
776 %patch4000 -p1
777 %{!?_without_grsec:%patch4001 -p1}
778
779 mv -f drivers/scsi/sym53c8xx.c drivers/scsi/sym53c8xx_old.c
780
781 # Tekram DC395/315 U/UW SCSI host driver
782 echo Adding Tekram DC395/315 driver
783 patch -p1 -s <dc395/dc395-integ24.diff
784 install dc395/dc395x_trm.? dc395/README.dc395x drivers/scsi/
785 %patch270 -p1
786
787 # The following go last as they touch a lot of code
788 # and/or are on bcond and/or are ifarch
789
790 %ifarch %{ix86}
791 %{?_with_win4lin:echo Win4Lin patch ...}
792 %{?_with_win4lin:%patch900 -p1}
793 %{?_with_win4lin:%patch991 -p1}
794 %endif
795
796 # Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
797 echo -e ',s/EXTRA_CFLAGS.*//g\n,w' | ed drivers/atm/Makefile
798 echo -e ',s/EXTRA_CFLAGS.*-g//g\n,w' | ed net/ipsec/Makefile
799
800 # Fix EXTRAVERSION and CC in main Makefile
801 echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION =/g\n,w' | ed Makefile
802 %ifarch sparc64
803 echo -e ',s/CC.*$(CROSS_COMPILE)gcc/CC          = sparc64-linux-gcc/g\n,w' | ed Makefile
804 %endif
805
806 %build
807 BuildKernel() {
808         %{?_debug:set -x}
809         # is this a special kernel we want to build?
810         BOOT=
811         smp=
812         [ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
813         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
814 %ifarch %{ix86}
815         if [ "$smp" = "yes" ]; then
816                 Config="ia32-smp"
817         else
818                 Config="ia32"
819         fi
820 %else
821         if [ "$smp" = "yes" ]; then
822                 Config="%{_target_cpu}-smp"
823         else
824                 Config="%{_target_cpu}"
825         fi
826 %endif
827         if [ "$BOOT" = "yes" ]; then
828                 KernelVer=%{version}-%{release}BOOT
829         else
830                 KernelVer=%{version}-%{release}$1
831         fi
832         echo "BUILDING THE NORMAL KERNEL $*..."
833 :> arch/%{base_arch}/defconfig
834         cat $RPM_SOURCE_DIR/kernel-$Config.config >> arch/%{base_arch}/defconfig
835 %ifarch i386
836         echo "CONFIG_M386=y" >> arch/%{base_arch}/defconfig
837 %endif
838 %ifarch i586
839         echo "CONFIG_M586=y" >> arch/%{base_arch}/defconfig
840 %endif
841 %ifarch i686
842         echo "CONFIG_M686=y" >> arch/%{base_arch}/defconfig
843 %endif
844 %ifarch athlon
845         echo "CONFIG_MK7=y" >> arch/%{base_arch}/defconfig
846 %endif
847         cat %{SOURCE1000} >> arch/%{base_arch}/defconfig
848         cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
849
850 %ifarch sparc64
851         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
852                 ed arch/%{base_arch}/defconfig
853         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
854                 ed arch/%{base_arch}/defconfig
855 %endif
856
857         if [ "$BOOT" = "yes" ] ; then
858                 echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig
859         else
860                 :;
861 %if %{?_without_grsec:0}%{!?_without_grsec:1}
862                 echo -e ',s/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g\n,w' | \
863                         ed arch/%{base_arch}/defconfig
864                 cat %{SOURCE1002} >> arch/%{base_arch}/defconfig
865 %endif
866         fi
867 %ifarch %{ix86}
868         cat %{SOURCE2000} >> arch/%{base_arch}/defconfig
869 %endif
870
871 %ifarch i386
872         echo -e ',s/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g\n,w' | \
873                 ed arch/%{base_arch}/defconfig
874 %endif
875
876         %{__make} mrproper
877         ln -sf arch/%{base_arch}/defconfig .config
878
879 %ifarch sparc
880         sparc32 %{__make} oldconfig
881         sparc32 %{__make} dep clean
882 %else
883         %{__make} oldconfig
884         %{__make} dep clean
885 %endif
886         %{__make} include/linux/version.h
887
888 # making  table for soundmodem.
889         cd drivers/net/hamradio/soundmodem
890         %{__cc} -o gentbl -lm gentbl.c
891         ./gentbl
892         cd ../../../..
893
894 %ifarch %{ix86}
895         %{__make} bzImage
896 %endif
897 %ifarch sparc
898         sparc32 %{__make} boot
899 %else
900 %ifnarch %{ix86}
901         %{__make}
902 %endif
903 %endif
904 %ifarch sparc
905         sparc32 %{__make} modules
906 %else
907         %{__make} modules
908 %endif
909
910         mkdir -p $KERNEL_INSTALL_DIR/boot
911         install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
912 %ifarch %{ix86}
913         cp arch/i386/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
914 %endif
915 %ifarch alpha sparc sparc64
916         gzip -cfv vmlinux > vmlinuz
917         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
918         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
919 %endif
920 %ifarch ppc
921         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
922         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
923 %endif
924 %ifarch sparc
925         sparc32 %{__make} modules_install \
926         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
927         KERNELRELEASE=$KernelVer
928         echo KERNEL RELEASE $KernelVer
929 %else
930         %{__make} modules_install \
931         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
932         KERNELRELEASE=$KernelVer
933         echo KERNEL RELEASE $KernelVer
934 %endif
935 }
936
937 KERNEL_BUILD_DIR=`pwd`
938 KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
939 rm -rf $KERNEL_INSTALL_DIR
940 install -d $KERNEL_INSTALL_DIR
941
942 # make drivers/scsi/ missing files
943 #       (cd drivers/scsi; make -f M)
944
945 # UP KERNEL
946 %{!?_without_up:BuildKernel}
947
948 # SMP KERNEL
949 %{!?_without_smp:BuildKernel smp}
950
951 # BOOT kernel
952 %ifnarch i586 i686 athlon
953 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk"
954 rm -rf $KERNEL_INSTALL_DIR
955 %{!?_without_boot:BuildKernel BOOT}
956 %endif
957
958 %install
959 rm -rf $RPM_BUILD_ROOT
960 umask 022
961
962 install -d $RPM_BUILD_ROOT%{_prefix}/{include,src/linux-%{version}}
963
964 KERNEL_BUILD_DIR=`pwd`
965
966 KERNEL_BUILD_INSTALL=no
967 %{!?_without_up:KERNEL_BUILD_INSTALL=yes}
968 %{!?_without_smp:KERNEL_BUILD_INSTALL=yes}
969 [ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
970
971 for i in "" smp ; do
972         if [ -e  $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
973                 rm -f $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
974                 ln -sf %{_prefix}/src/linux-%{version} \
975                         $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
976         fi
977 done
978 ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT%{_includedir}/linux
979 ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
980
981 %ifarch sparc sparc64
982 ln -s /usr/src/linux/include/asm-sparc $RPM_BUILD_ROOT%{_includedir}/asm-sparc
983 ln -s ../src/linux/include/asm-sparc64 $RPM_BUILD_ROOT%{_includedir}/asm-sparc64
984 %else
985 ln -sf ../src/linux/include/asm $RPM_BUILD_ROOT/usr/include/asm
986 %endif
987
988 %if %{?_without_source:0}%{!?_without_source:1}
989 cp -a . $RPM_BUILD_ROOT/usr/src/linux-%{version}
990 %else
991 cp -a {include,scripts,Makefile,Rules.make,Documentation} $RPM_BUILD_ROOT/usr/src/linux-%{version}
992 %endif
993
994 %ifarch sparc sparc64
995 sh %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}
996 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/asm/BuildASM
997 %endif
998
999 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
1000
1001 %if %{?_without_source:0}%{!?_without_source:1}
1002 %{__make} mrproper
1003
1004 find  -name "*~" -print | xargs rm -f
1005 find  -name "*.orig" -print | xargs rm -f
1006
1007 %ifarch %{ix86}
1008 cat $RPM_SOURCE_DIR/kernel-ia32.config > .config
1009 %else
1010 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}.config .config
1011 %endif
1012
1013 %ifarch i386
1014 echo "CONFIG_M386=y" >> .config
1015 %endif
1016 %ifarch i586
1017 echo "CONFIG_M586=y" >> .config
1018 %endif
1019 %ifarch i686
1020 echo "CONFIG_M686=y" >> .config
1021 %endif
1022 %ifarch athlon
1023 echo "CONFIG_MK7=y" >> .config
1024 %endif
1025 cat %{SOURCE1000} >> .config
1026 cat %{SOURCE1001} >> .config
1027 %{!?_without_grsec:cat %{SOURCE1002} >> .config}
1028
1029 %ifarch sparc64
1030         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1031                 ed .config
1032         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1033                 ed .config
1034 %endif
1035
1036 %ifarch %{ix86}
1037 cat %{SOURCE2000} >> .config
1038 %endif
1039
1040 %ifarch sparc
1041 sparc32 %{__make} oldconfig
1042 %else
1043 %{__make} oldconfig
1044 %endif
1045
1046 mv include/linux/autoconf.h include/linux/autoconf-up.h
1047 cp .config config-up
1048
1049 %ifarch %{ix86}
1050 cat $RPM_SOURCE_DIR/kernel-ia32-smp.config >> .config
1051 %else
1052 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}-smp.config .config
1053 %endif
1054
1055 %ifarch i386
1056 echo "CONFIG_M386=y" >> .config
1057 %endif
1058 %ifarch i586
1059 echo "CONFIG_M586=y" >> .config
1060 %endif
1061 %ifarch i686
1062 echo "CONFIG_M686=y" >> .config
1063 %endif
1064 %ifarch athlon
1065 echo "CONFIG_MK7=y" >> .config
1066 %endif
1067
1068 cat %{SOURCE1000} >> .config
1069 cat %{SOURCE1001} >> .config
1070 %{!?_without_grsec:cat %{SOURCE1002} >> .config}
1071
1072 %ifarch sparc64
1073         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1074                 ed .config
1075         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1076                 ed .config
1077 %endif
1078
1079 %ifarch %{ix86}
1080 cat %{SOURCE2000} >> .config
1081 %endif
1082
1083 %ifarch sparc
1084 sparc32 %{__make} oldconfig
1085 %else
1086 %{__make} oldconfig
1087 %endif
1088 mv include/linux/autoconf.h include/linux/autoconf-smp.h
1089 cp .config config-smp
1090 %endif
1091
1092 install %{SOURCE1} $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux/autoconf.h
1093
1094 %if %{?_without_source:0}%{!?_without_source:1}
1095 # this generates modversions info which we want to include and we may as
1096 # well include the depends stuff as well
1097 %{__make} symlinks
1098 %{__make} include/linux/version.h
1099 #%{__make} "`pwd`/include/linux/modversions.h"
1100 %endif
1101 rm -f include/linux/modversions.h
1102 echo "#include <linux/modsetver.h>" > include/linux/modversions.h
1103
1104
1105 # this generates modversions info which we want to include and we may as
1106 # well include the depends stuff as well, after we fix the paths
1107
1108 %if %{?_without_source:0}%{!?_without_source:1}
1109 %{__make} depend
1110 find $RPM_BUILD_ROOT/usr/src/linux-%{version} -name ".*depend" \
1111         -exec /bin/sh -c "echo -e \",s|$RPM_BUILD_ROOT||g\n,w\" | ed {}" \;
1112
1113 %{__make} clean
1114 rm -f scripts/mkdep
1115 rm -f drivers/net/hamradio/soundmodem/gentbl
1116 %endif
1117
1118 # BOOT
1119 %if %{?_without_boot:0}%{!?_without_boot:1}
1120 %ifnarch i586 i686 athlon
1121 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk
1122 cp -rdp $KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk/* $RPM_BUILD_ROOT%{_libdir}/bootdisk
1123 %endif
1124 %endif
1125
1126 %clean
1127 rm -rf $RPM_BUILD_ROOT
1128 rm -rf $RPM_BUILD_DIR/linux-%{version}-installed
1129
1130 %post
1131 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1132 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1133 ln -sf vmlinuz-%{version}-%{release} /boot/vmlinuz
1134 ln -sf System.map-%{version}-%{release} /boot/System.map
1135
1136 if [ ! -L /lib/modules/%{version} ] ; then
1137         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1138 fi
1139 rm -f /lib/modules/%{version}
1140 ln -snf %{version}-%{release} /lib/modules/%{version}
1141 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1142
1143 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}.gz %{version}-%{release}
1144 mv -f /boot/initrd /boot/initrd.old
1145 ln -sf initrd-%{version}-%{release}.gz /boot/initrd
1146
1147 if [ -f %{_prefix}/src/linux-%{version}/config-up ] ; then
1148         ln -s %{_prefix}/src/linux-%{version}/config-up %{_prefix}/src/linux-%{version}/.config
1149 fi
1150
1151 if [ -x /sbin/rc-boot ] ; then
1152         /sbin/rc-boot 1>&2 || :
1153 fi
1154
1155 %post smp
1156 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1157 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1158 ln -sf vmlinuz-%{version}-%{release}smp /boot/vmlinuz
1159 ln -sf System.map-%{version}-%{release}smp /boot/System.map
1160
1161 if [ ! -L /lib/modules/%{version} ] ; then
1162         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1163 fi
1164 rm -f /lib/modules/%{version}
1165 ln -snf %{version}-%{release}smp /lib/modules/%{version}
1166 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1167
1168 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
1169 mv -f /boot/initrd /boot/initrd.old
1170 ln -sf initrd-%{version}-%{release}smp.gz /boot/initrd
1171
1172 if [ -f %{_prefix}/src/linux-%{version}/config-smp ] ; then
1173         ln -s %{_prefix}/src/linux-%{version}/config-smp %{_prefix}/src/linux-%{version}/.config
1174 fi
1175
1176 if [ -x /sbin/rc-boot ] ; then
1177         /sbin/rc-boot 1>&2 || :
1178 fi
1179
1180 %post BOOT
1181 if [ ! -L %{_libdir}/bootdisk/lib/modules/%{version} ] ; then
1182         mv -f %{_libdir}/bootdisk/lib/modules/%{version} %{_libdir}/bootdisk/lib/modules/%{version}.rpmsave
1183 fi
1184 if [ ! -L %{_libdir}/bootdisk/boot/vmlinuz-%{version} ] ; then
1185         mv -f %{_libdir}/bootdisk/boot/vmlinuz-%{version} %{_libdir}/bootdisk/boot/vmlinuz-%{version}.rpmsave
1186 fi
1187 rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1188 ln -snf %{version}-%{release}BOOT %{_libdir}/bootdisk/lib/modules/%{version}
1189 rm -f %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1190 ln -snf vmlinuz-%{version}-%{release}BOOT %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1191
1192 %postun
1193 if [ -L /lib/modules/%{version} ]; then
1194         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}" ]; then
1195                 if [ "$1" = "0" ]; then
1196                         rm -f /lib/modules/%{version}
1197                 fi
1198         fi
1199 fi
1200 rm -f /boot/initrd-%{version}-%{release}.gz
1201
1202 %post pcmcia-cs
1203 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1204
1205 %postun pcmcia-cs
1206 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1207
1208 %post drm
1209 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1210
1211 %postun drm
1212 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1213
1214 %postun smp
1215 if [ -L /lib/modules/%{version} ]; then
1216         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}smp" ]; then
1217                 if [ "$1" = "0" ]; then
1218                         rm -f /lib/modules/%{version}
1219                 fi
1220         fi
1221 fi
1222 rm -f /boot/initrd-%{version}-%{release}smp.gz
1223
1224 %post smp-pcmcia-cs
1225 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1226
1227 %postun smp-pcmcia-cs
1228 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1229
1230 %post smp-drm
1231 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1232
1233 %postun smp-drm
1234 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1235
1236 %postun BOOT
1237 if [ -L %{_libdir}/bootdisk/lib/modules/%{version} ]; then
1238         if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}BOOT" ]; then
1239                 if [ "$1" = "0" ]; then
1240                         rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1241                 fi
1242         fi
1243 fi
1244
1245 %post headers
1246 rm -f /usr/src/linux
1247 ln -snf linux-%{version} /usr/src/linux
1248
1249 %postun headers
1250 if [ -L /usr/src/linux ]; then
1251         if [ "`ls -l /usr/src/linux | awk '{ print $11 }'`" = "linux-%{version}" ]; then
1252                 if [ "$1" = "0" ]; then
1253                         rm -f /usr/src/linux
1254                 fi
1255         fi
1256 fi
1257
1258 %if %{?_without_up:0}%{!?_without_up:1}
1259 %files
1260 %defattr(644,root,root,755)
1261 %ifarch alpha sparc sparc64 ppc
1262 /boot/vmlinux-%{version}-%{release}
1263 %endif
1264 /boot/vmlinuz-%{version}-%{release}
1265 /boot/System.map-%{version}-%{release}
1266 %dir /lib/modules/%{version}-%{release}
1267 /lib/modules/%{version}-%{release}/kernel
1268 %ifnarch sparc sparc64
1269 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1270 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1271 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1272 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1273 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1274 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1275 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1276 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1277 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1278 %endif
1279 %ifnarch ppc sparc sparc64
1280 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1281 %ifnarch alpha
1282 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1283 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1284 %endif
1285 %endif
1286 %ifnarch sparc
1287 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1288 %endif
1289 /lib/modules/%{version}-%{release}/build
1290 %ghost /lib/modules/%{version}-%{release}/modules.*
1291
1292 %ifnarch sparc sparc64
1293 %files pcmcia-cs
1294 %defattr(644,root,root,755)
1295 /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1296 /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1297 /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1298 /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1299 /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1300 /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1301 /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1302 /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1303 /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1304 %ifnarch ppc
1305 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1306 %ifnarch alpha
1307 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1308 /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1309 %endif
1310 %endif
1311 %endif
1312
1313 %ifnarch sparc
1314 %files drm
1315 %defattr(644,root,root,755)
1316 /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1317 %endif                  # %%{_without_up}
1318 %endif
1319
1320 %if %{?_without_smp:0}%{!?_without_smp:1}
1321 %files smp
1322 %defattr(644,root,root,755)
1323 %ifarch alpha sparc sparc64 ppc
1324 /boot/vmlinux-%{version}-%{release}smp
1325 %endif
1326 /boot/vmlinuz-%{version}-%{release}smp
1327 /boot/System.map-%{version}-%{release}smp
1328 %dir /lib/modules/%{version}-%{release}smp
1329 /lib/modules/%{version}-%{release}smp/kernel
1330 %ifnarch sparc sparc64
1331 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1332 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1333 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1334 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1335 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1336 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1337 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1338 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1339 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.o*
1340 %endif
1341 %ifnarch ppc sparc sparc64
1342 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1343 %ifnarch alpha
1344 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1345 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1346 %endif
1347 %endif
1348 %ifnarch sparc
1349 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1350 %endif
1351 /lib/modules/%{version}-%{release}smp/build
1352 %ghost /lib/modules/%{version}-%{release}smp/modules.*
1353
1354 %ifnarch sparc sparc64
1355 %files -n kernel-smp-pcmcia-cs
1356 %defattr(644,root,root,755)
1357 /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1358 /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1359 /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1360 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1361 /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1362 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1363 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1364 /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1365 /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/dtl1_cs.o*
1366 %ifnarch ppc
1367 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1368 %ifnarch alpha
1369 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1370 /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1371 %endif
1372 %endif
1373 %endif
1374
1375 %ifnarch sparc
1376 %files -n kernel-smp-drm
1377 %defattr(644,root,root,755)
1378 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1379 %endif                  # %%{_without_smp}
1380 %endif
1381
1382 %if %{?_without_boot:0}%{!?_without_boot:1}
1383 %ifnarch i586 i686 athlon               # narch
1384 %files BOOT
1385 %defattr(644,root,root,755)
1386 %ifarch alpha sparc sparc64 ppc         # arch
1387 %{_libdir}/bootdisk/boot/vmlinux-%{version}-%{release}BOOT
1388 %endif                          #arch
1389 %{_libdir}/bootdisk/boot/vmlinuz-%{version}-%{release}BOOT
1390 %{_libdir}/bootdisk/boot/System.map-%{version}-%{release}BOOT
1391 %dir %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT
1392 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/kernel
1393 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/build
1394 %ghost %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/modules.*
1395 %endif                          # narch
1396 %endif                          # %%{_without_boot}
1397
1398 %files headers
1399 %defattr(644,root,root,755)
1400 %dir %{_prefix}/src/linux-%{version}
1401 %{_prefix}/src/linux-%{version}/include
1402 %{?_without_kheaders:%{_includedir}/asm}
1403 %{?_without_kheaders:%{_includedir}/linux}
1404
1405 %if %{?_without_doc:0}%{!?_without_doc:1}
1406 %files doc
1407 %defattr(644,root,root,755)
1408 %{_prefix}/src/linux-%{version}/Documentation
1409 %endif
1410
1411 %if %{?_without_source:0}%{!?_without_source:1}
1412 %files source
1413 %defattr(644,root,root,755)
1414 %{_prefix}/src/linux-%{version}/arch
1415 %{_prefix}/src/linux-%{version}/crypto
1416 %{_prefix}/src/linux-%{version}/drivers
1417 %{_prefix}/src/linux-%{version}/fs
1418 %{_prefix}/src/linux-%{version}/init
1419 %{!?_without_grsec:%{_prefix}/src/linux-%{version}/grsecurity}
1420 %{_prefix}/src/linux-%{version}/ipc
1421 #%{_prefix}/src/linux-%{version}/kdb
1422 %{_prefix}/src/linux-%{version}/kernel
1423 %{_prefix}/src/linux-%{version}/lib
1424 %{_prefix}/src/linux-%{version}/mm
1425 %{_prefix}/src/linux-%{version}/net
1426 %{_prefix}/src/linux-%{version}/scripts
1427 %{_prefix}/src/linux-%{version}/.config
1428 %{_prefix}/src/linux-%{version}/.depend
1429 %{_prefix}/src/linux-%{version}/.hdepend
1430 %{_prefix}/src/linux-%{version}/COPYING
1431 %{_prefix}/src/linux-%{version}/CREDITS
1432 %{_prefix}/src/linux-%{version}/MAINTAINERS
1433 %{_prefix}/src/linux-%{version}/Makefile
1434 %{_prefix}/src/linux-%{version}/README
1435 %{_prefix}/src/linux-%{version}/REPORTING-BUGS
1436 %{_prefix}/src/linux-%{version}/Rules.make
1437 %{_prefix}/src/linux-%{version}/config*
1438 %endif
This page took 0.180249 seconds and 4 git commands to generate.