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