]> git.pld-linux.org Git - packages/kernel.git/blob - kernel.spec
i- updated netfilter to 1.2.9rc1 and 2003-10-09 CVS
[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          20031009
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.2
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 # http://www.hardrock.org/kernel/current-updates/
257 # taken at 20031008 (update this date if you update patch)
258 # also rememver to remove EXTRAVERSION from this patch
259 Patch1424:      linux-2.4.22-updates.patch
260
261 # htb
262 # http://luxik.cdi.cz/~devik/qos/htb/v3/
263 Patch1501:      htb_killdbg_2421.diff
264
265 Patch2000:      linux-PPC-SMP.patch
266 Patch2001:      linux-2.4-ppc-procesor.patch
267 Patch2002:      kernel-2.4.18-SPARC64-PLD.patch
268 Patch2003:      linux-2.4.20-AXP-avma1_cs.patch
269 Patch2004:      linux-2.4.22-ppc-amd8111e.patch
270
271 Patch3000:      linux-2.4.1-compilefailure.patch
272 Patch3002:      linux-2.4.20-EXPORT_SYMBOL.patch
273 Patch3003:      linux-2.4.20-missing-license-tags.patch
274 Patch3004:      linux-2.4.20-sym53c8xx_old.patch
275 Patch3005:      linux-2.4.21-gcc33.patch
276 Patch3006:      linux-2.4.21-sparc-gcc3.patch
277 Patch3008:      linux-drm-4.2.0-force-cmpxchg.patch
278 Patch3009:      linux-2.4.21-alpha-gcc33.patch
279 Patch3010:      linux-2.4.21-ipsec-sparc64.patch
280 Patch3011:      linux-2.4.22-gcc33-inline.patch
281 Patch3012:      linux-2.4.22-gcc-ext3.patch
282
283 # Security patches/fixes
284
285 Patch4000:      linux-2.4.22-ow1-stack.patch
286 Patch4001:      grsecurity-nopax-2.0-rc3-2.4.22.patch
287
288 Patch5000:      linux-2.4.22-security.patch
289
290 #Patch10000:    ftp://ftp.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.21-rc6.bz2
291
292 ExclusiveOS:    Linux
293 URL:            http://www.kernel.org/
294 %ifarch         %{ix86}
295 BuildRequires:  bin86
296 %endif
297 #BuildRequires: %{kgcc_package}
298 BuildRequires:  modutils
299 BuildRequires:  ed
300 Autoreqprov:    no
301 PreReq:         modutils
302 PreReq:         geninitrd >= 2.40
303 Requires(post,postun):  fileutils
304 Requires(postun):       awk
305 Provides:       %{name}-up = %{version}-%{release}
306 Provides:       module-info
307 Provides:       i2c = %{i2c_version}
308 Provides:       bttv = 0.7.83
309 Provides:       %{name}(netfilter) = 1.2.9rc1-%{netfilter_snap}
310 Provides:       %{name}(reiserfs) = %{version}
311 Provides:       %{name}(agpgart) = %{version}
312 #Provides:      %{name}(cdrw)
313 #Provides:      %{name}(cdmrw)
314 Obsoletes:      kernel-modules
315 ExclusiveArch:  %{ix86} sparc sparc64 alpha ppc
316 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
317 Conflicts:      iptables < 1.2.9rc1
318 Conflicts:      lvm < 1.0.4
319 Conflicts:      xfsprogs < 2.1.0
320 Conflicts:      reiserfsprogs < 3.6.3
321 Conflicts:      e2fsprogs < 1.25
322 Conflicts:      jfsutils < 1.0.12
323 Conflicts:      util-linux < 2.10o
324 Conflicts:      modutils < 2.4.2
325 Conflicts:      quota < 3.06
326 Conflicts:      linux-atm < 2.4.1
327 Conflicts:      device-mapper < 1.00.05
328
329 %description
330 This package contains the Linux kernel that is used to boot and run
331 your system. It contains few device drivers for specific hardware.
332 Most hardware is instead supported by modules loaded after booting.
333
334 %description -l de
335 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
336 Linux-Betriebssystems. Der Kernel ist für grundliegende
337 Systemfunktionen verantwortlich: Speicherreservierung,
338 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
339
340 %description -l es
341 Este paquete contiene núcleo (kernel) Linux que se usa para arranque y
342 funcionamiento de tu sistema. Contiene soporte a pocos hardwares
343 específicos. La mayoría de los hardwares son soportados, vía módulos
344 que se cargan después del arranque.
345
346 %description -l fr
347 Le package kernel contient le kernel linux (vmlinuz), la partie
348 centrale d'un système d'exploitation Linux. Le noyau traite les
349 fonctions basiques d'un système d'exploitation: allocation mémoire,
350 allocation de process, entrée/sortie de peripheriques, etc.
351
352 %description -l pl
353 Pakiet zawiera j±dro Linuksa niezbêdne do prawid³owego dzia³ania
354 Twojego komputera. Zawiera w sobie sterowniki do sprzêtu znajduj±cego
355 siê w komputerze, takich jak karty muzyczne, sterowniki dysków, etc.
356
357 %description -l pt_BR
358 Este pacote contém o kernel Linux que é usado para inicialização
359 e funcionamento de seu sistema. Contém suporte a poucos hardwares
360 específicos. A maioria dos hardwares são suportados via módulos
361 que são carregados após a inicialização.
362
363 %package smp
364 Summary:        Kernel version %{version} compiled for SMP machines
365 Summary(de):    Kernel version %{version} für Multiprozessor-Maschinen
366 Summary(es):    Núcleo (kernel) compilado para máquinas SMP
367 Summary(fr):    Kernel version %{version} compiler pour les machine Multi-Processeur
368 Summary(pl):    J±dro Linuksa %{version} skompilowane dla maszyn wieloprocesorowych
369 Summary(pt_BR): Kernel compilado para máquinas SMP
370 Group:          Base/Kernel
371 Autoreqprov:    no
372 PreReq:         modutils
373 PreReq:         geninitrd >= 2.21
374 Requires(post,postun):  fileutils
375 Requires(postun):       awk
376 Provides:       %{name}-smp = %{version}-%{release}
377 Provides:       module-info
378 Provides:       i2c = %{i2c_version}
379 Provides:       bttv = 0.7.83
380 Provides:       %{name}(netfilter) = 1.2.9rc1-%{netfilter_snap}
381 Provides:       %{name}(reiserfs) = %{version}
382 Provides:       %{name}(agpgart) = %{version}
383 #Provides:      %{name}(cdrw)
384 #Provides:      %{name}(cdmrw)
385 Conflicts:      iptables < 1.2.9rc1
386 Conflicts:      lvm < 1.0.4
387 Conflicts:      xfsprogs < 2.1.0
388 Conflicts:      reiserfsprogs < 3.6.3
389 Conflicts:      e2fsprogs < 1.25
390 Conflicts:      jfsutils < 1.0.12
391 Conflicts:      util-linux < 2.10o
392 Conflicts:      modutils < 2.4.2
393 Conflicts:      quota < 3.06
394 Conflicts:      linux-atm < 2.4.1
395 Conflicts:      device-mapper < 1.00.05
396
397 %description smp
398 This package includes a SMP version of the Linux %{version} kernel. It
399 is required only on machines with two or more CPUs, although it should
400 work fine on single-CPU boxes.
401
402 %description smp -l de
403 Dieses Paket enthält eine SMP (Multiprozessor)-Version von
404 Linux-Kernel %{version}. Es wird für Maschinen mit zwei oder mehr
405 Prozessoren gebraucht, sollte aber auch auf Computern mit nur einer
406 CPU laufen.
407
408 %description smp -l es
409 Núcleo (kernel) compilado para máquinas SMP
410
411 %description smp -l fr
412 Ce package inclu une version SMP du noyau de Linux version %{version}.
413 Il et nécessaire seulement pour les machine avec deux processeurs ou
414 plus, il peut quand même fonctionner pour les système mono-processeur.
415
416 %description smp -l pl
417 Pakiet zawiera j±dro SMP Linuksa w wersji %{version}. Jest ono
418 wymagane przez komputery zawieraj±ce dwa lub wiêcej procesorów.
419 Powinno równie¿ dobrze dzia³aæ na maszynach z jednym procesorem.
420
421 %description smp -l pt_BR
422 Este pacote inclui uma versão SMP do kernel Linux versão %{version}.
423 Ele deve ser utilizado apenas em máquinas com dois ou mais processadores,
424 apesar de trabalhar perfeitamente em máquinas com apenas um processador.
425
426 %package BOOT
427 Summary:        Kernel version %{version} used on the installation boot disks
428 Summary(de):    Kernel version %{version} für Installationsdisketten
429 Summary(es):    Núcleo (kernel) de Linux, utilizado en el disco de instalación
430 Summary(fr):    Kernel version %{version} utiliser pour les disquettes d'installation
431 Summary(pl):    J±dro Linuksa %{version} dla bootkietek instalacyjnych
432 Summary(pt_BR): Kernel Linux utilizado no disco de instalação
433 Group:          Base/Kernel
434 Autoreqprov:    no
435 PreReq:         modutils
436 Requires(post,postun):  fileutils
437 Requires(postun):       awk
438
439 %description BOOT
440 This package includes a trimmed down version of the Linux %{version}
441 kernel. This kernel is used on the installation boot disks only and
442 should not be used for an installed system, as many features in this
443 kernel are turned off because of the size constraints.
444
445 %description BOOT -l de
446 Dieses Paket enthält eine verkleinerte Version vom Linux-Kernel
447 version %{version}. Dieser Kernel wird auf den
448 Installations-Bootdisketten benutzt und sollte nicht auf einem
449 installierten System verwendet werden, da viele Funktionen wegen der
450 Platzprobleme abgeschaltet sind.
451
452 %description BOOT -l es
453 Núcleo (kernel) de Linux, utilizado en el disco de instalación
454
455 %description BOOT -l pl
456 Pakiet zawiera j±dro Linuksa dedykowane dyskietkom startowym i powinno
457 byæ u¿ywane jedynie podczas instalacji systemu. Wiele u¿ytecznych
458 opcji zosta³o wy³±czonych, aby jak najbardziej zmniejszyæ jego
459 rozmiar.
460
461 %description BOOT -l pt_BR
462 Este pacote inclui uma versão minimizada do kernel Linux, criada para
463 ser utilizada *apenas* no disco de instalação, e não deve ser utilizada
464 em máquinas já instaladas, pois várias características do kernel
465 são desabilitadas para diminuir o tamanho final do kernel a ser utilizado.
466
467 %package pcmcia-cs
468 Summary:        PCMCIA-CS modules
469 Summary(pl):    Modu³y PCMCIA-CS
470 Group:          Base/Kernel
471 PreReq:         %{name}-up = %{version}-%{release}
472 Requires(postun):       %{name}-up = %{version}-%{release}
473 Provides:       %{name}-pcmcia-cs = %{pcmcia_version}
474
475 %description pcmcia-cs
476 PCMCIA-CS modules (%{pcmcia_version}).
477
478 %description pcmcia-cs -l pl
479 Modu³y PCMCIA-CS (%{pcmcia_version}).
480
481 %package smp-pcmcia-cs
482 Summary:        PCMCIA-CS modules for SMP kernel
483 Summary(pl):    Modu³y PCMCIA-CS dla maszyn SMP
484 Group:          Base/Kernel
485 PreReq:         %{name}-smp = %{version}-%{release}
486 Requires(postun):       %{name}-smp = %{version}-%{release}
487 Provides:       %{name}-pcmcia-cs = %{pcmcia_version}
488
489 %description smp-pcmcia-cs
490 PCMCIA-CS modules for SMP kernel (%{pcmcia_version}).
491
492 %description smp-pcmcia-cs -l pl
493 Modu³y PCMCIA-CS dla maszyn SMP (%{pcmcia_version}).
494
495 %package drm
496 Summary:        DRM kernel modules
497 Summary(pl):    Sterowniki DRM
498 Group:          Base/Kernel
499 PreReq:         %{name}-up = %{version}-%{release}
500 Requires(postun):       %{name}-up = %{version}-%{release}
501 Provides:       %{name}-drm = %{drm_xfree_version}
502
503 %description drm
504 DRM kernel modules (%{drm_xfree_version}).
505
506 %description drm -l pl
507 Sterowniki DRM (%{drm_xfree_version}).
508
509 %package smp-drm
510 Summary:        DRM SMP kernel modules
511 Summary(pl):    Sterowniki DRM dla maszyn wieloprocesorowych
512 Group:          Base/Kernel
513 PreReq:         %{name}-smp = %{version}-%{release}
514 Requires(postun):       %{name}-smp = %{version}-%{release}
515 Provides:       %{name}-drm = %{drm_xfree_version}
516
517 %description smp-drm
518 DRM SMP kernel modules (%{drm_xfree_version}).
519
520 %description smp-drm -l pl
521 Sterowniki DRM dla maszyn wieloprocesorowych (%{drm_xfree_version}).
522
523 %package headers
524 Summary:        Header files for the Linux kernel
525 Summary(es):    Archivos de inclusión para núcleo (kernel) Linux.
526 Summary(pl):    Pliki nag³ówkowe j±dra
527 Summary(pt_BR): Arquivos de inclusão para o kernel Linux.
528 Group:          Base/Kernel
529 Autoreqprov:    no
530 Requires(post,postun):  fileutils
531 Requires(postun):       awk
532 Provides:       %{name}-headers(agpgart) = %{version}
533 Provides:       %{name}-headers(reiserfs) = %{version}
534 Provides:       %{name}-headers(bridging) = %{version}
535 Provides:       i2c-devel = %{i2c_version}
536 Provides:       %{name}-headers(netfilter) = 1.2.9rc1-%{netfilter_snap}
537
538 %description headers
539 These are the C header files for the Linux kernel, which define
540 structures and constants that are needed when building most standard
541 programs under Linux, as well as to rebuild the kernel.
542
543 %description headers -l es
544 Estos son los archivos de inclusión C para núcleo (kernel) Linux, que define
545 estructuras y constantes que son necesarias a la construcción de la
546 mayoría de los programas en el Linux, como también para reconstruir
547 el núcleo (kernel).
548
549 %description headers -l pl
550 Pakiet zawiera pliki nag³ówkowe j±dra, niezbêdne do rekompilacji j±dra
551 oraz niektórych programów.
552
553 %description headers -l pt_BR
554 Estes são os arquivos de inclusão C para o kernel Linux, os
555 quais definem estruturas e constantes que são necessárias para
556 a construção da maioria dos programas no Linux, bem como para
557 reconstruir o próprio kernel.
558
559 %package source
560 Summary:        Kernel source tree
561 Summary(es):    Fuentes del núcleo (kernel) Linux
562 Summary(pl):    Kod ¼ród³owy j±dra Linuksa
563 Summary(pt_BR): Fontes do kernel Linux
564 Group:          Base/Kernel
565 Autoreqprov:    no
566 Requires:       %{name}-headers = %{version}-%{release}
567 %ifarch %{ix86}
568 Requires:       bin86
569 %endif
570
571 %description source
572 This is the source code for the Linux kernel. It is required to build
573 most C programs as they depend on constants defined in here. You can
574 also build a custom kernel that is better tuned to your particular
575 hardware.
576
577 %description source -l de
578 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
579 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
580 C-Programme zu compilieren, da sie auf Konstanten zurückgreifen, die
581 im Kernel-Source definiert sind. Die Source-Dateien können auch
582 benutzt werden, um einen Kernel zu compilieren, der besser auf Ihre
583 Hardware ausgerichtet ist.
584
585 %description source -l es
586 Este es el fuente para el núcleo (kernel) Linux. Se necesita para la
587 construcción de la mayoría de los programas C, pues dependen de
588 constantes definidas en él. Tu puedes también construir un núcleo (kernel)
589 personalizado que será lo mejor configurado para tu hardware en
590 particular.
591
592 %description source -l fr
593 Le package pour le kernel-source contient le code source pour le noyau
594 linux. Ces sources sont nécessaires pour compiler la plupart des
595 programmes C, car il dépend de constantes définies dans le code
596 source. Les sources peuvent être aussi utilisée pour compiler un noyau
597 personnalisé pour avoir de meilleures performances sur des matériels
598 particuliers.
599
600 %description source -l pl
601 Pakiet zawiera kod ¼ród³owy j±dra systemu.
602
603 %description source -l pt_BR
604 Este é o fonte para o kernel Linux. É necessário para a
605 construção da maioria dos programas C, pois eles dependem de
606 constantes definidas nele. Você também pode construir um kernel
607 personalizado que será melhor configurado para seu hardware particular.
608
609 %package doc
610 Summary:        Kernel documentation
611 Summary(es):    Documentación para los archivos fuente del núcleo (kernel) de Linux
612 Summary(pl):    Dokumentacja do j±dra Linuksa
613 Summary(pt_BR): Documentação para os arquivos fontes do kernel Linux
614 Group:          Base/Kernel
615 Provides:       %{name}-doc = %{version}
616 Autoreqprov:    no
617
618 %description doc
619 This is the documentation for the Linux kernel, as found in
620 /usr/src/linux/Documentation directory.
621
622 %description doc -l es
623 Documentación para los archivos fuente del núcleo (kernel) de Linux
624
625 %description doc -l pl
626 Pakiet zawiera dokumentacjê j±dra z katalogu
627 /usr/src/linux/Documentation.
628
629 %description doc -l pt_BR
630 Este pacote contém documentação para o kernel Linux.
631
632 %prep
633 %setup -q -a3 -a8 -n linux-%{version}
634 # JFS 1.1.1
635 rm -fr fs/jfs
636 gzip -dc %{SOURCE7} | tar -xf -
637 # Adaptec AACRaid new drivers
638 rm -fr drivers/scsi/aacraid
639 bzip2 -dc %{SOURCE10} | tar -xf - -C drivers/scsi/
640 # Changing DRM source ....
641 cp -f drm/*.{c,h} drivers/char/drm/
642 %patch0 -p1
643 %patch10 -p1
644 %patch12 -p1
645 %patch15 -p1
646 %patch20 -p1
647 %patch21 -p1
648 %patch22 -p1
649 %patch23 -p1
650 %patch25 -p1
651 #%patch26 -p1
652 %patch30 -p1
653 %patch32 -p1
654 %patch31 -p1
655 %patch40 -p1
656 %patch50 -p1
657 %patch55 -p1
658 %patch65 -p1
659 %patch70 -p1
660 %patch80 -p1
661 %patch100 -p1
662 %patch110 -p1
663 %patch115 -p1
664 %patch120 -p1
665 %patch125 -p1
666 %patch130 -p1
667 #%patch150 -p1
668 %patch151 -p1
669 %patch152 -p1
670 %patch200 -p1
671 %patch205 -p1
672 %patch210 -p1
673 #%patch215 -p1
674 #%patch216 -p1
675 %patch225 -p1
676 %patch226 -p1
677 %patch227 -p1
678 %patch231 -p1
679 %patch235 -p1
680 %patch240 -p1
681 %patch245 -p1
682 %patch246 -p1
683 %patch255 -p1
684 %patch256 -p1
685 %patch257 -p1
686 %patch265 -p1
687 %patch275 -p1
688 %patch280 -p1
689 %patch300 -p1
690 %patch301 -p1
691 %patch302 -p1
692 %patch303 -p1
693 %patch1000 -p1
694 %patch1002 -p1
695 %patch1003 -p1
696 %patch1006 -p1
697 %patch1007 -p1
698 #%patch1008 -p1
699 %patch1009 -p1
700 %patch1010 -p1
701 %patch1102 -p1
702 %patch1104 -p0
703 %patch1105 -p1
704 %patch1106 -p0
705 %patch1111 -p1
706 %patch1150 -p1
707 %patch1152 -p1
708 %patch1154 -p1
709 %patch1201 -p1
710 %patch1203 -p1
711 %patch1205 -p1
712 %patch1207 -p1
713 %patch1209 -p1
714 %patch1250 -p1
715 %patch1251 -p1
716 %patch1252 -p1
717 %patch1253 -p1
718 %patch1254 -p0
719 %patch1255 -p1
720 %patch1301 -p1
721 %patch1302 -p1
722 %patch1303 -p1
723 %patch1304 -p1
724 %patch1305 -p1
725 %patch1350 -p1
726 %patch1354 -p1
727 %patch1400 -p1
728 %patch1401 -p1
729 %patch1402 -p1
730 %patch1403 -p1
731 %patch1404 -p1
732 %patch1405 -p1
733 %patch1407 -p1
734 %patch1408 -p1
735 %patch1410 -p1
736 %patch1411 -p1
737 %patch1413 -p1
738 %patch1414 -p1
739 %patch1415 -p0
740 %patch1416 -p1
741 %patch1417 -p1
742 %patch1418 -p1
743 %patch1419 -p1
744 %patch1420 -p1
745 %patch1421 -p1
746 %patch1422 -p1
747 %patch1423 -p1
748
749 %patch1424 -p1
750
751 %patch1501 -p1
752
753 %patch2000 -p0
754 %patch2001 -p1
755 %patch2002 -p1
756 %patch2003 -p1
757 %ifarch ppc
758 %patch2004 -p1
759 %endif
760
761 %patch3000 -p1
762 %patch3002 -p1
763 %patch3003 -p1
764 %patch3004 -p1
765 %patch3005 -p1
766 %patch3006 -p1
767 %patch3009 -p1
768 cd drivers/char/drm
769 %patch3008 -p1
770 cd ../../..
771
772 %ifarch sparc64
773 %patch3010 -p1
774 %endif
775
776 %patch3011 -p1
777 %patch3012 -p1
778
779 %patch5000 -p1
780
781 %patch4000 -p1
782 %{!?_without_grsec:%patch4001 -p1}
783
784 mv -f drivers/scsi/sym53c8xx.c drivers/scsi/sym53c8xx_old.c
785
786 # Tekram DC395/315 U/UW SCSI host driver
787 echo Adding Tekram DC395/315 driver
788 patch -p1 -s <dc395/dc395-integ24.diff
789 install dc395/dc395x_trm.? dc395/README.dc395x drivers/scsi/
790 %patch270 -p1
791
792 # The following go last as they touch a lot of code
793 # and/or are on bcond and/or are ifarch
794
795 %ifarch %{ix86}
796 %{?_with_win4lin:echo Win4Lin patch ...}
797 %{?_with_win4lin:%patch900 -p1}
798 %{?_with_win4lin:%patch991 -p1}
799 %endif
800
801 # Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
802 echo -e ',s/EXTRA_CFLAGS.*//g\n,w' | ed drivers/atm/Makefile
803 echo -e ',s/EXTRA_CFLAGS.*-g//g\n,w' | ed net/ipsec/Makefile
804
805 # Fix EXTRAVERSION and CC in main Makefile
806 echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION =/g\n,w' | ed Makefile
807 %ifarch sparc64
808 echo -e ',s/CC.*$(CROSS_COMPILE)gcc/CC          = sparc64-linux-gcc/g\n,w' | ed Makefile
809 %endif
810
811 %build
812 BuildKernel() {
813         %{?_debug:set -x}
814         # is this a special kernel we want to build?
815         BOOT=
816         smp=
817         [ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
818         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
819 %ifarch %{ix86}
820         if [ "$smp" = "yes" ]; then
821                 Config="ia32-smp"
822         else
823                 Config="ia32"
824         fi
825 %else
826         if [ "$smp" = "yes" ]; then
827                 Config="%{_target_cpu}-smp"
828         else
829                 Config="%{_target_cpu}"
830         fi
831 %endif
832         if [ "$BOOT" = "yes" ]; then
833                 KernelVer=%{version}-%{release}BOOT
834         else
835                 KernelVer=%{version}-%{release}$1
836         fi
837         echo "BUILDING THE NORMAL KERNEL $*..."
838 :> arch/%{base_arch}/defconfig
839         cat $RPM_SOURCE_DIR/kernel-$Config.config >> arch/%{base_arch}/defconfig
840 %ifarch i386
841         echo "CONFIG_M386=y" >> arch/%{base_arch}/defconfig
842 %endif
843 %ifarch i586
844         echo "CONFIG_M586=y" >> arch/%{base_arch}/defconfig
845 %endif
846 %ifarch i686
847         echo "CONFIG_M686=y" >> arch/%{base_arch}/defconfig
848 %endif
849 %ifarch athlon
850         echo "CONFIG_MK7=y" >> arch/%{base_arch}/defconfig
851 %endif
852         cat %{SOURCE1000} >> arch/%{base_arch}/defconfig
853         cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
854
855 %ifarch sparc64
856         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
857                 ed arch/%{base_arch}/defconfig
858         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
859                 ed arch/%{base_arch}/defconfig
860 %endif
861
862         if [ "$BOOT" = "yes" ] ; then
863                 echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig
864         else
865                 :;
866 %if %{?_without_grsec:0}%{!?_without_grsec:1}
867                 echo -e ',s/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g\n,w' | \
868                         ed arch/%{base_arch}/defconfig
869                 cat %{SOURCE1002} >> arch/%{base_arch}/defconfig
870 %endif
871         fi
872 %ifarch %{ix86}
873         cat %{SOURCE2000} >> arch/%{base_arch}/defconfig
874 %endif
875
876 %ifarch i386
877         echo -e ',s/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g\n,w' | \
878                 ed arch/%{base_arch}/defconfig
879 %endif
880
881         %{__make} mrproper
882         ln -sf arch/%{base_arch}/defconfig .config
883
884 %ifarch sparc
885         sparc32 %{__make} oldconfig
886         sparc32 %{__make} dep clean
887 %else
888         %{__make} oldconfig
889         %{__make} dep clean
890 %endif
891         %{__make} include/linux/version.h
892
893 # making  table for soundmodem.
894         cd drivers/net/hamradio/soundmodem
895         %{__cc} -o gentbl -lm gentbl.c
896         ./gentbl
897         cd ../../../..
898
899 %ifarch %{ix86}
900         %{__make} bzImage
901 %endif
902 %ifarch sparc
903         sparc32 %{__make} boot
904 %else
905 %ifnarch %{ix86}
906         %{__make}
907 %endif
908 %endif
909 %ifarch sparc
910         sparc32 %{__make} modules
911 %else
912         %{__make} modules
913 %endif
914
915         mkdir -p $KERNEL_INSTALL_DIR/boot
916         install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
917 %ifarch %{ix86}
918         cp arch/i386/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
919 %endif
920 %ifarch alpha sparc sparc64
921         gzip -cfv vmlinux > vmlinuz
922         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
923         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
924 %endif
925 %ifarch ppc
926         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
927         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
928 %endif
929 %ifarch sparc
930         sparc32 %{__make} modules_install \
931         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
932         KERNELRELEASE=$KernelVer
933         echo KERNEL RELEASE $KernelVer
934 %else
935         %{__make} modules_install \
936         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
937         KERNELRELEASE=$KernelVer
938         echo KERNEL RELEASE $KernelVer
939 %endif
940 }
941
942 KERNEL_BUILD_DIR=`pwd`
943 KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
944 rm -rf $KERNEL_INSTALL_DIR
945 install -d $KERNEL_INSTALL_DIR
946
947 # make drivers/scsi/ missing files
948 #       (cd drivers/scsi; make -f M)
949
950 # UP KERNEL
951 %{!?_without_up:BuildKernel}
952
953 # SMP KERNEL
954 %{!?_without_smp:BuildKernel smp}
955
956 # BOOT kernel
957 %ifnarch i586 i686 athlon
958 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk"
959 rm -rf $KERNEL_INSTALL_DIR
960 %{!?_without_boot:BuildKernel BOOT}
961 %endif
962
963 %install
964 rm -rf $RPM_BUILD_ROOT
965 umask 022
966
967 install -d $RPM_BUILD_ROOT%{_prefix}/{include,src/linux-%{version}}
968
969 KERNEL_BUILD_DIR=`pwd`
970
971 KERNEL_BUILD_INSTALL=no
972 %{!?_without_up:KERNEL_BUILD_INSTALL=yes}
973 %{!?_without_smp:KERNEL_BUILD_INSTALL=yes}
974 [ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
975
976 for i in "" smp ; do
977         if [ -e  $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
978                 rm -f $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
979                 ln -sf %{_prefix}/src/linux-%{version} \
980                         $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
981         fi
982 done
983 ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT%{_includedir}/linux
984 ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
985
986 %ifarch sparc sparc64
987 ln -s /usr/src/linux/include/asm-sparc $RPM_BUILD_ROOT%{_includedir}/asm-sparc
988 ln -s ../src/linux/include/asm-sparc64 $RPM_BUILD_ROOT%{_includedir}/asm-sparc64
989 %else
990 ln -sf ../src/linux/include/asm $RPM_BUILD_ROOT/usr/include/asm
991 %endif
992
993 %if %{?_without_source:0}%{!?_without_source:1}
994 cp -a . $RPM_BUILD_ROOT/usr/src/linux-%{version}
995 %else
996 cp -a {include,scripts,Makefile,Rules.make,Documentation} $RPM_BUILD_ROOT/usr/src/linux-%{version}
997 %endif
998
999 %ifarch sparc sparc64
1000 sh %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}
1001 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/asm/BuildASM
1002 %endif
1003
1004 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
1005
1006 %if %{?_without_source:0}%{!?_without_source:1}
1007 %{__make} mrproper
1008
1009 find  -name "*~" -print | xargs rm -f
1010 find  -name "*.orig" -print | xargs rm -f
1011
1012 %ifarch %{ix86}
1013 cat $RPM_SOURCE_DIR/kernel-ia32.config > .config
1014 %else
1015 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}.config .config
1016 %endif
1017
1018 %ifarch i386
1019 echo "CONFIG_M386=y" >> .config
1020 %endif
1021 %ifarch i586
1022 echo "CONFIG_M586=y" >> .config
1023 %endif
1024 %ifarch i686
1025 echo "CONFIG_M686=y" >> .config
1026 %endif
1027 %ifarch athlon
1028 echo "CONFIG_MK7=y" >> .config
1029 %endif
1030 cat %{SOURCE1000} >> .config
1031 cat %{SOURCE1001} >> .config
1032 %{!?_without_grsec:cat %{SOURCE1002} >> .config}
1033
1034 %ifarch sparc64
1035         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1036                 ed .config
1037         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1038                 ed .config
1039 %endif
1040
1041 %ifarch %{ix86}
1042 cat %{SOURCE2000} >> .config
1043 %endif
1044
1045 %ifarch sparc
1046 sparc32 %{__make} oldconfig
1047 %else
1048 %{__make} oldconfig
1049 %endif
1050
1051 mv include/linux/autoconf.h include/linux/autoconf-up.h
1052 cp .config config-up
1053
1054 %ifarch %{ix86}
1055 cat $RPM_SOURCE_DIR/kernel-ia32-smp.config >> .config
1056 %else
1057 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}-smp.config .config
1058 %endif
1059
1060 %ifarch i386
1061 echo "CONFIG_M386=y" >> .config
1062 %endif
1063 %ifarch i586
1064 echo "CONFIG_M586=y" >> .config
1065 %endif
1066 %ifarch i686
1067 echo "CONFIG_M686=y" >> .config
1068 %endif
1069 %ifarch athlon
1070 echo "CONFIG_MK7=y" >> .config
1071 %endif
1072
1073 cat %{SOURCE1000} >> .config
1074 cat %{SOURCE1001} >> .config
1075 %{!?_without_grsec:cat %{SOURCE1002} >> .config}
1076
1077 %ifarch sparc64
1078         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1079                 ed .config
1080         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1081                 ed .config
1082 %endif
1083
1084 %ifarch %{ix86}
1085 cat %{SOURCE2000} >> .config
1086 %endif
1087
1088 %ifarch sparc
1089 sparc32 %{__make} oldconfig
1090 %else
1091 %{__make} oldconfig
1092 %endif
1093 mv include/linux/autoconf.h include/linux/autoconf-smp.h
1094 cp .config config-smp
1095 %endif
1096
1097 install %{SOURCE1} $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux/autoconf.h
1098
1099 %if %{?_without_source:0}%{!?_without_source:1}
1100 # this generates modversions info which we want to include and we may as
1101 # well include the depends stuff as well
1102 %{__make} symlinks
1103 %{__make} include/linux/version.h
1104 #%{__make} "`pwd`/include/linux/modversions.h"
1105 %endif
1106 rm -f include/linux/modversions.h
1107 echo "#include <linux/modsetver.h>" > include/linux/modversions.h
1108
1109
1110 # this generates modversions info which we want to include and we may as
1111 # well include the depends stuff as well, after we fix the paths
1112
1113 %if %{?_without_source:0}%{!?_without_source:1}
1114 %{__make} depend
1115 find $RPM_BUILD_ROOT/usr/src/linux-%{version} -name ".*depend" \
1116         -exec /bin/sh -c "echo -e \",s|$RPM_BUILD_ROOT||g\n,w\" | ed {}" \;
1117
1118 %{__make} clean
1119 rm -f scripts/mkdep
1120 rm -f drivers/net/hamradio/soundmodem/gentbl
1121 %endif
1122
1123 # BOOT
1124 %if %{?_without_boot:0}%{!?_without_boot:1}
1125 %ifnarch i586 i686 athlon
1126 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk
1127 cp -rdp $KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk/* $RPM_BUILD_ROOT%{_libdir}/bootdisk
1128 %endif
1129 %endif
1130
1131 %clean
1132 rm -rf $RPM_BUILD_ROOT
1133 rm -rf $RPM_BUILD_DIR/linux-%{version}-installed
1134
1135 %post
1136 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1137 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1138 ln -sf vmlinuz-%{version}-%{release} /boot/vmlinuz
1139 ln -sf System.map-%{version}-%{release} /boot/System.map
1140
1141 if [ ! -L /lib/modules/%{version} ] ; then
1142         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1143 fi
1144 rm -f /lib/modules/%{version}
1145 ln -snf %{version}-%{release} /lib/modules/%{version}
1146 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1147
1148 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}.gz %{version}-%{release}
1149 mv -f /boot/initrd /boot/initrd.old
1150 ln -sf initrd-%{version}-%{release}.gz /boot/initrd
1151
1152 if [ -f %{_prefix}/src/linux-%{version}/config-up ] ; then
1153         ln -s %{_prefix}/src/linux-%{version}/config-up %{_prefix}/src/linux-%{version}/.config
1154 fi
1155
1156 if [ -x /sbin/rc-boot ] ; then
1157         /sbin/rc-boot 1>&2 || :
1158 fi
1159
1160 %post smp
1161 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1162 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1163 ln -sf vmlinuz-%{version}-%{release}smp /boot/vmlinuz
1164 ln -sf System.map-%{version}-%{release}smp /boot/System.map
1165
1166 if [ ! -L /lib/modules/%{version} ] ; then
1167         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1168 fi
1169 rm -f /lib/modules/%{version}
1170 ln -snf %{version}-%{release}smp /lib/modules/%{version}
1171 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1172
1173 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
1174 mv -f /boot/initrd /boot/initrd.old
1175 ln -sf initrd-%{version}-%{release}smp.gz /boot/initrd
1176
1177 if [ -f %{_prefix}/src/linux-%{version}/config-smp ] ; then
1178         ln -s %{_prefix}/src/linux-%{version}/config-smp %{_prefix}/src/linux-%{version}/.config
1179 fi
1180
1181 if [ -x /sbin/rc-boot ] ; then
1182         /sbin/rc-boot 1>&2 || :
1183 fi
1184
1185 %post BOOT
1186 if [ ! -L %{_libdir}/bootdisk/lib/modules/%{version} ] ; then
1187         mv -f %{_libdir}/bootdisk/lib/modules/%{version} %{_libdir}/bootdisk/lib/modules/%{version}.rpmsave
1188 fi
1189 if [ ! -L %{_libdir}/bootdisk/boot/vmlinuz-%{version} ] ; then
1190         mv -f %{_libdir}/bootdisk/boot/vmlinuz-%{version} %{_libdir}/bootdisk/boot/vmlinuz-%{version}.rpmsave
1191 fi
1192 rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1193 ln -snf %{version}-%{release}BOOT %{_libdir}/bootdisk/lib/modules/%{version}
1194 rm -f %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1195 ln -snf vmlinuz-%{version}-%{release}BOOT %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1196
1197 %postun
1198 if [ -L /lib/modules/%{version} ]; then
1199         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}" ]; then
1200                 if [ "$1" = "0" ]; then
1201                         rm -f /lib/modules/%{version}
1202                 fi
1203         fi
1204 fi
1205 rm -f /boot/initrd-%{version}-%{release}.gz
1206
1207 %post pcmcia-cs
1208 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1209
1210 %postun pcmcia-cs
1211 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1212
1213 %post drm
1214 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1215
1216 %postun drm
1217 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1218
1219 %postun smp
1220 if [ -L /lib/modules/%{version} ]; then
1221         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}smp" ]; then
1222                 if [ "$1" = "0" ]; then
1223                         rm -f /lib/modules/%{version}
1224                 fi
1225         fi
1226 fi
1227 rm -f /boot/initrd-%{version}-%{release}smp.gz
1228
1229 %post smp-pcmcia-cs
1230 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1231
1232 %postun smp-pcmcia-cs
1233 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1234
1235 %post smp-drm
1236 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1237
1238 %postun smp-drm
1239 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1240
1241 %postun BOOT
1242 if [ -L %{_libdir}/bootdisk/lib/modules/%{version} ]; then
1243         if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}BOOT" ]; then
1244                 if [ "$1" = "0" ]; then
1245                         rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1246                 fi
1247         fi
1248 fi
1249
1250 %post headers
1251 rm -f /usr/src/linux
1252 ln -snf linux-%{version} /usr/src/linux
1253
1254 %postun headers
1255 if [ -L /usr/src/linux ]; then
1256         if [ "`ls -l /usr/src/linux | awk '{ print $11 }'`" = "linux-%{version}" ]; then
1257                 if [ "$1" = "0" ]; then
1258                         rm -f /usr/src/linux
1259                 fi
1260         fi
1261 fi
1262
1263 %if %{?_without_up:0}%{!?_without_up:1}
1264 %files
1265 %defattr(644,root,root,755)
1266 %ifarch alpha sparc sparc64 ppc
1267 /boot/vmlinux-%{version}-%{release}
1268 %endif
1269 /boot/vmlinuz-%{version}-%{release}
1270 /boot/System.map-%{version}-%{release}
1271 %dir /lib/modules/%{version}-%{release}
1272 /lib/modules/%{version}-%{release}/kernel
1273 %ifnarch sparc sparc64
1274 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1275 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1276 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1277 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1278 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1279 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1280 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1281 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1282 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1283 %endif
1284 %ifnarch ppc sparc sparc64
1285 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1286 %ifnarch alpha
1287 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1288 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1289 %endif
1290 %endif
1291 %ifnarch sparc
1292 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1293 %endif
1294 /lib/modules/%{version}-%{release}/build
1295 %ghost /lib/modules/%{version}-%{release}/modules.*
1296
1297 %ifnarch sparc sparc64
1298 %files pcmcia-cs
1299 %defattr(644,root,root,755)
1300 /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1301 /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1302 /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1303 /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1304 /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1305 /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1306 /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1307 /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1308 /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1309 %ifnarch ppc
1310 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1311 %ifnarch alpha
1312 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1313 /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1314 %endif
1315 %endif
1316 %endif
1317
1318 %ifnarch sparc
1319 %files drm
1320 %defattr(644,root,root,755)
1321 /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1322 %endif                  # %%{_without_up}
1323 %endif
1324
1325 %if %{?_without_smp:0}%{!?_without_smp:1}
1326 %files smp
1327 %defattr(644,root,root,755)
1328 %ifarch alpha sparc sparc64 ppc
1329 /boot/vmlinux-%{version}-%{release}smp
1330 %endif
1331 /boot/vmlinuz-%{version}-%{release}smp
1332 /boot/System.map-%{version}-%{release}smp
1333 %dir /lib/modules/%{version}-%{release}smp
1334 /lib/modules/%{version}-%{release}smp/kernel
1335 %ifnarch sparc sparc64
1336 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1337 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1338 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1339 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1340 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1341 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1342 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1343 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1344 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.o*
1345 %endif
1346 %ifnarch ppc sparc sparc64
1347 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1348 %ifnarch alpha
1349 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1350 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1351 %endif
1352 %endif
1353 %ifnarch sparc
1354 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1355 %endif
1356 /lib/modules/%{version}-%{release}smp/build
1357 %ghost /lib/modules/%{version}-%{release}smp/modules.*
1358
1359 %ifnarch sparc sparc64
1360 %files -n kernel-smp-pcmcia-cs
1361 %defattr(644,root,root,755)
1362 /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1363 /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1364 /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1365 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1366 /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1367 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1368 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1369 /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1370 /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/dtl1_cs.o*
1371 %ifnarch ppc
1372 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1373 %ifnarch alpha
1374 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1375 /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1376 %endif
1377 %endif
1378 %endif
1379
1380 %ifnarch sparc
1381 %files -n kernel-smp-drm
1382 %defattr(644,root,root,755)
1383 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1384 %endif                  # %%{_without_smp}
1385 %endif
1386
1387 %if %{?_without_boot:0}%{!?_without_boot:1}
1388 %ifnarch i586 i686 athlon               # narch
1389 %files BOOT
1390 %defattr(644,root,root,755)
1391 %ifarch alpha sparc sparc64 ppc         # arch
1392 %{_libdir}/bootdisk/boot/vmlinux-%{version}-%{release}BOOT
1393 %endif                          #arch
1394 %{_libdir}/bootdisk/boot/vmlinuz-%{version}-%{release}BOOT
1395 %{_libdir}/bootdisk/boot/System.map-%{version}-%{release}BOOT
1396 %dir %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT
1397 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/kernel
1398 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/build
1399 %ghost %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/modules.*
1400 %endif                          # narch
1401 %endif                          # %%{_without_boot}
1402
1403 %files headers
1404 %defattr(644,root,root,755)
1405 %dir %{_prefix}/src/linux-%{version}
1406 %{_prefix}/src/linux-%{version}/include
1407 %{?_without_kheaders:%{_includedir}/asm}
1408 %{?_without_kheaders:%{_includedir}/linux}
1409
1410 %if %{?_without_doc:0}%{!?_without_doc:1}
1411 %files doc
1412 %defattr(644,root,root,755)
1413 %{_prefix}/src/linux-%{version}/Documentation
1414 %endif
1415
1416 %if %{?_without_source:0}%{!?_without_source:1}
1417 %files source
1418 %defattr(644,root,root,755)
1419 %{_prefix}/src/linux-%{version}/arch
1420 %{_prefix}/src/linux-%{version}/crypto
1421 %{_prefix}/src/linux-%{version}/drivers
1422 %{_prefix}/src/linux-%{version}/fs
1423 %{_prefix}/src/linux-%{version}/init
1424 %{!?_without_grsec:%{_prefix}/src/linux-%{version}/grsecurity}
1425 %{_prefix}/src/linux-%{version}/ipc
1426 #%{_prefix}/src/linux-%{version}/kdb
1427 %{_prefix}/src/linux-%{version}/kernel
1428 %{_prefix}/src/linux-%{version}/lib
1429 %{_prefix}/src/linux-%{version}/mm
1430 %{_prefix}/src/linux-%{version}/net
1431 %{_prefix}/src/linux-%{version}/scripts
1432 %{_prefix}/src/linux-%{version}/.config
1433 %{_prefix}/src/linux-%{version}/.depend
1434 %{_prefix}/src/linux-%{version}/.hdepend
1435 %{_prefix}/src/linux-%{version}/COPYING
1436 %{_prefix}/src/linux-%{version}/CREDITS
1437 %{_prefix}/src/linux-%{version}/MAINTAINERS
1438 %{_prefix}/src/linux-%{version}/Makefile
1439 %{_prefix}/src/linux-%{version}/README
1440 %{_prefix}/src/linux-%{version}/REPORTING-BUGS
1441 %{_prefix}/src/linux-%{version}/Rules.make
1442 %{_prefix}/src/linux-%{version}/config*
1443 %endif
This page took 0.234947 seconds and 4 git commands to generate.