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