]> git.pld-linux.org Git - packages/kernel.git/blob - kernel.spec
- O(1) scheduler fixes by Ingo Molnar (backported from 2.5, sched-2.5.64-A5)
[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_grsec        - build without grsecurity patch
6 # _with_preemptive      - build with Preemptible patch
7 # _without_smp          - don't build SMP kernel
8 # _without_up           - don't build UP kernel
9 # _without_boot         - don't build BOOT kernel
10 # _without_source       - don't build source
11 # _without_doc          - don't build documentation package
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             pre1
18 %define         ipvs_version            1.0.7
19 %define         freeswan_version        1.97
20 %define         IPperson_version        20020819-2.4.19
21 %define         grsec_version           1.9.9c
22 %define         jfs_version             2.4-1.1.1
23 %define         lvm_version             1.0.5
24 %define         evms_version            1.2.0
25 %define         ntfs_version            2.1.0a
26 %define         drm_xfree_version       4.2.99
27 %define         hostap_version          2002-10-12
28 %define         netfilter_snap          20030306
29 Summary:        The Linux kernel (the core of the Linux operating system)
30 Summary(de):    Der Linux-Kernel (Kern des Linux-Betriebssystems)
31 Summary(fr):    Le Kernel-Linux (La partie centrale du systeme)
32 Summary(pl):    JĀ±dro Linuxa
33 Name:           kernel
34 Version:        2.4.20
35 Release:        4.1%{?_with_preemptive:_pr}%{?_without_grsec:_nogrsec}
36 License:        GPL
37 Group:          Base/Kernel
38 Source0:        ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-%{version}.tar.bz2
39 Source1:        %{name}-autoconf.h
40 Source2:        %{name}-BuildASM.sh
41 Source3:        http://www.garloff.de/kurt/linux/dc395/dc395-141.tar.gz
42 Source4:        linux-2.4.20-netfilter-%{netfilter_snap}.tar.gz
43 Source5:        linux-2.4.19-netfilter-IMQ.patch.tar.bz2
44 Source6:        http://download.sourceforge.net/ippersonality/ippersonality-%{IPperson_version}.tar.gz
45 Source7:        http://www10.software.ibm.com/developer/opensource/jfs/project/pub/jfs-%{jfs_version}.tar.gz
46 Source8:        http://www.xfree86.org/~alanh/linux-drm-%{drm_xfree_version}-kernelsource.tar.bz2
47 Source9:        http://hostap.epitest.fi/releases/hostap-%{hostap_version}.tar.gz
48 Source10:       linux-2.4.20-aacraid.tar.bz2
49 Source20:       %{name}-ia32.config
50 Source21:       %{name}-ia32-smp.config
51 Source50:       %{name}-sparc.config
52 Source51:       %{name}-sparc-smp.config
53 Source60:       %{name}-sparc64.config
54 Source61:       %{name}-sparc64-smp.config
55 Source70:       %{name}-alpha.config
56 Source71:       %{name}-alpha-smp.config
57 Source73:       %{name}-ppc.config
58 Source74:       %{name}-ppc-smp.config
59 Source1000:     %{name}-addon.config
60 Source1001:     %{name}-netfilter.config
61 Source1100:     %{name}-preemptive.config
62 Source1666:     %{name}-grsec.config
63 Source2000:     %{name}-win4lin.config
64
65 # New features/updates/backports
66
67 # Essential stuff
68
69 Patch0:         %{name}-pldfblogo.patch
70 # from ftp://ftp.kerneli.org/pub/linux/kernel/crypto/v2.4/testing/
71 Patch10:        patch-int-2.4.20.1.bz2
72 Patch11:        loop-jari-2.4.20.0.patch
73 # from ftp://ftp.xs4all.nl/pub/crypto/freeswan/freeswan-*
74 Patch12:        linux-2.4.18-freeswan-%{freeswan_version}.patch.gz
75 Patch15:        linux-2.4.20-sched-O1.patch
76 Patch16:        linux-2.4.20-sched-O1-ingo-fixes.patch
77 Patch20:        http://dl.sourceforge.net/user-mode-linux/uml-patch-2.4.20-1.bz2
78 Patch21:        linux-2.4.20-uml-o1.patch
79 # http://unc.dl.sourceforge.net/sourceforge/user-mode-linux/host-skas3.patch
80 Patch22:        linux-2.4.20-uml-host-skas3.patch
81
82 # New filesystems
83
84 # http://linux-xfs.sgi.com/projects/xfs/
85 Patch25:        linux-2.4.20-core-xfs-1.2.0.patch.bz2
86 Patch26:        linux-2.4.20-xfs-1.2.0.patch.bz2
87 # http://acl.bestbits.at/
88 Patch30:        linux-2.4.20-jfs-xattr.patch
89 Patch31:        linux-2.4.20-jfs-1.1.1-acl.patch
90 Patch32:        linux-2.4.20-xattr+acl+trusted-0.8.55.diff.gz
91 Patch33:        linux-2.4.20-acl-intermezzo-fix.patch
92 # http://unc.dl.sourceforge.net/sourceforge/linux-ntfs/
93 Patch40:        linux-2.4.20-ntfs-%{ntfs_version}.patch.bz2
94 Patch41:        linux-2.4.20-ntfs.patch
95 # http://dl.sourceforge.net/linux-hfsplus/hfsplus-patch-20020606.patch
96 Patch45:        hfsplus-20020606.patch.bz2
97 # FC01_davfs_0.2.4.patch
98 Patch50:        linux-2.4.20-davfs-0.2.4.patch.bz2
99 # FC02_davfs__FUNCTION__.patch
100 Patch55:        linux-2.4.20-davfs-_FUNCTION_.patch
101 # quota for reiserfs
102 Patch60:        linux-2.4.20-reiserfs-quota.patch.bz2
103 # http://dl.sourceforge.net/squashfs/squashfs-1.1b.tar.gz
104 Patch65:        linux-2.4.20-squashfs.patch
105 #Patch70:       linux-2.4.20-afs.patch.bz2
106 #from http://sci.felk.cvut.cz/nwd/linux/nwd-patch-2.4.19
107 Patch75:        nwd-2.4.20.patch
108
109 # Networking
110
111 # new version of netfilter.
112 Patch100:       linux-2.4.20-netfilter-%{netfilter_snap}.patch.gz
113 # from http://users.pandora.be/bart.de.schuymer/ebtables/sourcecode.html
114 #       ebtables_v2.0.003_vs_2.4.20.diff
115 Patch110:       ebtables-v2.0.003_vs_2.4.20.patch.bz2
116 #       bridge-nf-0.0.10-against-2.4.20.diff
117 Patch111:       linux-2.4.20-bridge-nf-0.0.10.patch.bz2
118 # http://www.linuxvirtualserver.org/software/kernel-2.4/linux-2.4.18-ipvs-%{ipvs_version}.patch.gz
119 Patch115:       linux-2.4.20-ipvs-%{ipvs_version}.patch.bz2
120 Patch120:       http://luxik.cdi.cz/~devik/qos/imq-2.4.18.diff-10
121 # ftp://ftp.samba.org/pub/unpacked/ppp/linux/mppe/
122 Patch125:       linux-2.4.18-mppe.patch
123
124 # ATM bugfixes
125 # Patches by Chas Williams <chas@locutus.cmf.nrl.navy.mil>
126 Patch150:       atm-00-backport-2.5.patch
127 Patch151:       atm-01-Makefile.patch
128 Patch152:       atm-04-min-frame-size.patch
129 Patch153:       atm-05-multicast-lec.patch
130 Patch154:       atm-06-skb_pull.patch
131 Patch155:       atm-07-atm_dev_lock-sem.patch
132 Patch156:       atm-08-lane-MOD_USE_COUNT.patch
133 Patch157:       atm-09-suni-MOD_USE_COUNT.patch
134 Patch158:       atm-10-modular-atm.patch
135 Patch159:       atm-11-correct-lec-net_device-names.patch
136 Patch160:       atm-12-br2684-xmit-return.patch
137 Patch161:       atm-13-atm_vcc-cleanup.patch
138 Patch162:       atm-14-clip-neigh-lock.patch
139 Patch180:       atm-20-fore200e-gettimeofday.patch
140 # http://tulipe.cnam.fr/personne/lizzi/linux/linux-2.3.99-pre6-fore200e-0.2f.tar.gz
141 # http://christophe.lizzi.free.fr/linux/linux-2.4.0-test9-fore200e-0.3.tar.gz
142 Patch181:       atm-21-fore200e-0.2f.patch
143 # Oopses on me - baggins
144 #Patch191:      atm-21-fore200e-0.3.patch
145 Patch185:       atm-30-idt77105-cleanup.patch
146
147 # New devices/drivers
148
149 # from http://people.sistina.com/~thornber/patches/2.4-stable/2.4.20/2.4.20-dm-9.tar.bz2DM-9 patch
150 Patch200:       linux-2.4.20-dm-9.patch.bz2
151 # EVMS support (http://www.sourceforge.net/projects/evms/)
152 Patch201:       linux-2.4.20-evms-1.9.0.patch.bz2
153 # from http://www.promise.com/support/file/driver/promise-patch-2.4.19.gz
154 Patch205:       linux-2.4.20-promise.patch.bz2
155 # from http://www.promise.com/support/file/driver/st6000src_1.30_01_0326.tgz
156 Patch206:       linux-2.4.20-promise-st6000.patch.bz2
157
158 #from http://prdownloads.sourceforge.net/i810fb/linux-2.4.20-i810fb.diff.bz2
159 Patch210:       linux-2.4.20-I810FB.patch.bz2
160
161 # Support for CDRW packet writing
162 Patch215:       %{name}-cdrw-packet.patch
163 Patch216:       %{name}-cd-mrw-2.patch
164 Patch220:       linux-2.4.19-pre8-konicawc.patch
165 Patch225:       wrr-linux-2.4.9.patch
166 Patch230:       linux-2.4.20-aic79xx.patch.bz2
167 Patch235:       linux-2.4.20-audigy.patch.bz2
168 Patch240:       linux-2.4.20-ecc.patch
169 Patch245:       linux-2.4.20-01-edd.patch
170 Patch246:       linux-2.4.20-02-edd-allocate.patch
171 #i2c - version 2.7.0
172 Patch255:       linux-2.4.20-i2c-2.7.0.patch.gz
173 # from ftp://ftp.lsil.com/pub/symchips/scsi/FusionMPT/Linux/2.03.00/mptlinux-2.03.00-src.tar.gz
174 Patch260:       linux-2.4.20-mptlinux-2.03.00.patch.bz2
175 Patch265:       linux-2.4.20-e820.patch
176 # Syntax bug
177 Patch270:       dc395-tab.patch
178 # http://www.qlogic.com/
179 Patch275:       linux-2.4.20-qla2x00-v6.04.00-fo.patch.gz
180
181 # The following go last as they touch a lot of code
182 # and/or are on bcond and/or are ifarch
183
184 # from http://grsecurity.net/grsecurity-%{grsec_version}.patch
185 Patch800:       grsecurity-%{grsec_version}-%{version}.patch.bz2
186 Patch801:       PPC-grsecurity-pgtable.h.patch
187 Patch802:       linux-2.4.20-grsecurity-%{grsec_version}-kmem.patch
188
189 # Win4Lin
190 #Patch900:      linux-2.4.20-Win4Lin.PLD.patch.bz2
191 #Patch991:      linux-2.4.20-Win4Lin-mki-adapter.patch.bz2
192
193 # Assorted bugfixes
194
195 # jam - http://giga.cps.unizar.es/~magallon/linux/kernel/
196 Patch1000:      jam-04-clone-detached.patch
197 Patch1001:      jam-05-module-size-checks.patch
198 Patch1002:      jam-06-force-inline.patch
199 Patch1003:      jam-07-scsi-error-tmout.patch
200 Patch1004:      jam-08-memparam.patch
201 Patch1005:      jam-09-cache-detection.patch
202 Patch1006:      jam-10-highpage-init.patch
203 Patch1007:      jam-11-self_exec_id.patch
204 Patch1008:      jam-15-fast-csum-D.patch
205 Patch1009:      jam-21-mem-barriers.patch
206 Patch1010:      jam-23-config-nr_cpus.patch
207 Patch1011:      jam-30-smptimers-A0.patch
208
209 Patch1100:      linux-2.4.18-lvm-VFSlock.patch
210 Patch1102:      linux-2.4.20-lvm-updates.patch
211
212 # fix lun probing on multilun RAID chassis
213 Patch1105:      linux-2.4.12-scsi_scan.patch
214 Patch1106:      linux-scsi-debug-bug.patch
215
216 Patch1110:      01-sound.diff
217 # This patch allows to create more than one sound device using alsa
218 # and devfs with two or more sound cards
219 Patch1111:      linux-sound_core.patch
220 Patch1112:      linux-2.4.21-pre4-ac4-via82cxxx_audio.patch.bz2
221 Patch1113:      linux-2.4.20-i810_audio.patch
222
223 # rivafb - fix for text background in 16bpp modes
224 Patch1150:      linux-rivafb16.patch
225 # misc tdfxfb fixes - detailed description inside
226 Patch1151:      linux-tdfxfb-fixes.patch
227 Patch1152:      linux-2.4.20-agp_uninorth.patch
228 Patch1153:      linux-2.4.20-radeonfb_clean.patch
229 Patch1154:      linux-2.4.20-drm-Makefile.patch
230 # support for VIA KT400 chipset in agpgart
231 Patch1155:      linux-2.4.20-kt400.patch
232
233 Patch1200:      hpt3xx.patch
234 Patch1201:      linux-2.4.10-cpqfc.patch
235 Patch1202:      linux-2.4.20-440gx.patch
236 Patch1203:      linux-2.4.20-amd-golem.patch
237 Patch1205:      linux-53c7,8xx-build.fix
238 Patch1206:      piix-ide-fix.patch
239 Patch1207:      linux-2.4.20-serverworks.patch
240 Patch1208:      PCI_ISA_bridge.patch
241 # this patch adds support for "io" and "irq" options in PCNet32 driver module
242 Patch1209:      linux-2.4.19-pcnet-parms.patch
243
244 # disable some networking printk's
245 Patch1250:      linux-2.4.1-netdebug.patch
246 Patch1251:      linux-2.4.2-raw-ip.patch
247 Patch1252:      linux-2.4.19-netmos_pci_parallel_n_serial.patch
248 Patch1253:      linux-proc_net_dev-counter-fix.patch
249 Patch1254:      kernel-2.4.17-netsyms-export-fix.patch
250 Patch1255:      linux-2.4.20-pre1-nr_frags.patch
251
252 Patch1301:      linux-2.4.18-hpfs.patch
253 Patch1302:      linux-2.4.18-nfs-default-size.patch
254 Patch1303:      linux-2.4.20-irixnfs.patch
255 # Tru64 NFS kludge
256 Patch1304:      linux-2.4.20-tru64nfs.patch
257 Patch1305:      linux-2.4.20-ext3-updates.patch
258 Patch1306:      linux-2.4.20-ext3.patch
259
260 Patch1350:      linux-2.4.18-nousb.patch
261 # usb patches from ftp://ftp.kernel.org/pub/linux/people/gregkh/usb/*-2.4.20.*
262 Patch1351:      linux-2.4.20-USB.patch.bz2
263 Patch1352:      linux-2.4.20-usb-bugs.patch
264 # PWC USB Webcam Driver update (only for 2.4.20; 2.4.21 should have this fix)
265 Patch1353:      linux-2.4.20-pwc.patch
266 # from http://www.noc.uoa.gr/~avel/page.php?page=nokia&lang=en
267 Patch1354:      linux-2.4.20-Nokia5510.patch
268
269 # raid5 xor fix for PIII/P4, should go away shortly
270 Patch1400:      linux-2.4.0-raid5xor.patch
271 Patch1401:      linux-2.4.0-nonintconfig.patch
272 # Add an ioctl to the block layer so we can be EFI compliant
273 Patch1402:      linux-2.4.2-blkioctl-sector.patch
274 Patch1403:      linux-2.4.3-pcipenalty.patch
275 Patch1404:      linux-2.4.3-rawio.patch
276 Patch1405:      linux-2.4.7-suspend.patch
277 Patch1406:      linux-2.4.7-quotareturn.patch
278 Patch1407:      kernel-Makefile-include-fix.patch
279 Patch1408:      kernel-pswscancode.patch
280 Patch1409:      linux-2.4.18-dmi-hall-of-shame.patch
281 Patch1410:      linux-2.4.18-input-35215.patch
282 Patch1411:      linux-2.4.18-kiobuf.patch
283 Patch1412:      linux-2.4.18-sendfile64.patch
284 Patch1413:      linux-2.4.20-andrea-fix-pausing.patch
285 Patch1414:      linux-2.4.20-oopsmeharder.patch
286 Patch1415:      linux-mtd-missing-include-fix-2.4.7-pre6.patch
287 Patch1416:      linux-2.4.20-no-FPU.patch
288 Patch1417:      linux-2.4.20-initrd-close-fds.patch
289
290 Patch2000:      linux-PPC-SMP.patch
291 Patch2001:      linux-2.4-ppc-procesor.patch
292 Patch2002:      kernel-2.4.18-SPARC64-PLD.patch
293 Patch2003:      linux-2.4.20-AXP-avma1_cs.patch
294
295 Patch3000:      linux-2.4.1-compilefailure.patch
296 Patch3001:      linux-2.4.20-nicupdates.patch
297 Patch3002:      linux-2.4.20-EXPORT_SYMBOL.patch
298 Patch3003:      linux-2.4.20-missing-license-tags.patch
299
300 ExclusiveOS:    Linux
301 URL:            http://www.kernel.org/
302 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
303 %ifarch sparc64
304 BuildRequires:  egcs64
305 #%else
306 #BuildRequires: %{kgcc_package}
307 %endif
308 BuildRequires:  modutils
309 Buildrequires:  perl
310 Provides:       %{name}-up = %{version}-%{release}
311 Provides:       module-info
312 Provides:       i2c = 2.7.0
313 Provides:       bttv = 0.7.83
314 Provides:       %{name}(netfilter) = 1.2.7a-%{netfilter_snap}
315 Provides:       %{name}(grsecurity) = %{grsec_version}
316 Provides:       %{name}(reiserfs) = %{version}
317 Provides:       %{name}(agpgart) = %{version}
318 Provides:       %{name}(cdrw)
319 Provides:       %{name}(cdmrw)
320 Provides:       %{name}(hostap)
321 Autoreqprov:    no
322 Prereq:         fileutils
323 Prereq:         modutils
324 Prereq:         geninitrd >= 2.21
325 Obsoletes:      kernel-modules
326 ExclusiveArch:  %{ix86} sparc sparc64 alpha ppc
327 %ifarch         %{ix86}
328 BuildRequires:  bin86
329 %endif
330 Conflicts:      iptables < 1.2.7a
331 Conflicts:      lvm < 1.0.4
332 Conflicts:      xfsprogs < 2.1.0
333 Conflicts:      reiserfsprogs < 3.6.3
334 Conflicts:      e2fsprogs < 1.25
335 Conflicts:      jfsutils < 1.0.12
336 Conflicts:      util-linux < 2.10o
337 Conflicts:      modutils < 2.4.2
338 Conflicts:      quota < 3.06
339
340 %description
341 This package contains the Linux kernel that is used to boot and run
342 your system. It contains few device drivers for specific hardware.
343 Most hardware is instead supported by modules loaded after booting.
344
345 %description -l de
346 Das Kernel-Paket enthƤlt den Linux-Kernel (vmlinuz), den Kern des
347 Linux-Betriebssystems. Der Kernel ist fĆ¼r grundliegende
348 Systemfunktionen verantwortlich: Speicherreservierung,
349 ProzeƟ-Management, GerƤte Ein- und Ausgaben, usw.
350
351 %description -l fr
352 Le package kernel contient le kernel linux (vmlinuz), la partie
353 centrale d'un systĆØme d'exploitation Linux. Le noyau traite les
354 fonctions basiques d'un systĆØme d'exploitation: allocation mĆ©moire,
355 allocation de process, entrĆ©e/sortie de peripheriques, etc.
356
357 %description -l pl
358 Pakiet zawiera jĀ±dro Linuxa niezbĆŖdne do prawidĀ³owego dziaĀ³ania
359 Twojego komputera. Zawiera w sobie sterowniki do sprzĆŖtu znajdujĀ±cego
360 siĆŖ w komputerze, takich jak karty muzyczne, sterowniki dyskĆ³w, etc.
361
362 %package smp
363 Summary:        Kernel version %{version} compiled for SMP machines
364 Summary(de):    Kernel version %{version} fĆ¼r Multiprozessor-Maschinen
365 Summary(fr):    Kernel version %{version} compiler pour les machine Multi-Processeur
366 Group:          Base/Kernel
367 Provides:       %{name}-smp = %{version}-%{release}
368 Provides:       module-info
369 Provides:       i2c = 2.7.0
370 Provides:       bttv = 0.7.83
371 Provides:       %{name}(netfilter) = 1.2.7a-%{netfilter_snap}
372 Provides:       %{name}(grsecurity) = %{grsec_version}
373 Provides:       %{name}(reiserfs) = %{version}
374 Provides:       %{name}(agpgart) = %{version}
375 Provides:       %{name}(cdrw)
376 Provides:       %{name}(cdmrw)
377 Provides:       %{name}(hostap)
378 Prereq:         fileutils
379 Prereq:         modutils
380 Prereq:         geninitrd >= 2.21
381 Autoreqprov:    no
382 Conflicts:      iptables < 1.2.7a
383 Conflicts:      lvm < 1.0.4
384 Conflicts:      xfsprogs < 2.1.0
385 Conflicts:      reiserfsprogs < 3.6.3
386 Conflicts:      e2fsprogs < 1.25
387 Conflicts:      jfsutils < 1.0.12
388 Conflicts:      util-linux < 2.10o
389 Conflicts:      modutils < 2.4.2
390 Conflicts:      quota < 3.06
391
392 %description smp
393 This package includes a SMP version of the Linux %{version} kernel. It
394 is required only on machines with two or more CPUs, although it should
395 work fine on single-CPU boxes.
396
397 %description -l de smp
398 Dieses Paket enthƤlt eine SMP (Multiprozessor)-Version von
399 Linux-Kernel %{version}. Es wird fĆ¼r Maschinen mit zwei oder mehr
400 Prozessoren gebraucht, sollte aber auch auf Computern mit nur einer
401 CPU laufen.
402
403 %description -l fr smp
404 Ce package inclu une version SMP du noyau de Linux version {version}.
405 Il et nĆ©cessaire seulement pour les machine avec deux processeurs ou
406 plus, il peut quand mĆŖme fonctionner pour les systĆØme mono-processeur.
407
408 %description -l pl smp
409 Pakiet zawiera jĀ±dro SMP Linuksa w wersji %{version}. Jest ono
410 wymagane przez komputery zawierajĀ±ce dwa lub wiĆŖcej procesorĆ³w.
411 Powinno rĆ³wnieĀæ dobrze dziaĀ³aƦ na maszynach z jednym procesorem.
412
413 %package BOOT
414 Summary:        Kernel version %{version} used on the installation boot disks
415 Summary(de):    Kernel version %{version} fĆ¼r Installationsdisketten
416 Summary(fr):    Kernel version %{version} utiliser pour les disquettes d'installation
417 Group:          Base/Kernel
418 Prereq:         modutils
419 Autoreqprov:    no
420
421 %description BOOT
422 This package includes a trimmed down version of the Linux %{version}
423 kernel. This kernel is used on the installation boot disks only and
424 should not be used for an installed system, as many features in this
425 kernel are turned off because of the size constraints.
426
427 %description -l de BOOT
428 Dieses Paket enthƤlt eine verkleinerte Version vom Linux-Kernel
429 version %{version}. Dieser Kernel wird auf den
430 Installations-Bootdisketten benutzt und sollte nicht auf einem
431 installierten System verwendet werden, da viele Funktionen wegen der
432 Platzprobleme abgeschaltet sind.
433
434 %description -l pl BOOT
435 Pakiet zawiera jĀ±dro Linuksa dedykowane dyskietkom startowym i powinno
436 byƦ uĀæywane jedynie podczas instalacji systemu. Wiele uĀæytecznych
437 opcji zostaĀ³o wyĀ³Ā±czonych, aby jak najbardziej zmniejszyƦ jego
438 rozmiar.
439
440 %package pcmcia-cs
441 Summary:        PCMCIA-CS modules
442 Summary(pl):    ModuĀ³y PCMCIA-CS 
443 Group:          Base/Kernel
444 Provides:       %{name}-pcmcia-cs = %{pcmcia_version}
445 PreReq:         %{name}-up = %{version}-%{release}
446 Requires(postun):       %{name}-up = %{version}-%{release}
447
448 %description pcmcia-cs
449 PCMCIA-CS modules (%{pcmcia_version}).
450
451 %description -l pl pcmcia-cs
452 ModuĀ³y PCMCIA-CS (%{pcmcia_version}).
453
454 %package smp-pcmcia-cs
455 Summary:        PCMCIA-CS modules for SMP kernel
456 Summary(pl):    ModuĀ³y PCMCIA-CS dla maszyn SMP
457 Group:          Base/Kernel
458 Provides:       %{name}-pcmcia-cs = %{pcmcia_version}
459 PreReq:         %{name}-smp = %{version}-%{release}
460 Requires(postun):       %{name}-smp = %{version}-%{release}
461
462 %description smp-pcmcia-cs
463 PCMCIA-CS modules for SMP kernel (%{pcmcia_version}).
464
465 %description -l pl smp-pcmcia-cs
466 ModuĀ³y PCMCIA-CS dla maszyn SMP (%{pcmcia_version}).
467
468 %package drm
469 Summary:        DRM kernel modules
470 Summary(pl):    Sterowniki DRM
471 Group:          Base/Kernel
472 Provides:       %{name}-drm = %{drm_xfree_version}
473 PreReq:         %{name}-up = %{version}-%{release}
474 Requires(postun):       %{name}-up = %{version}-%{release}
475
476 %description drm
477 DRM kernel modules (%{drm_xfree_version}).
478
479 %description -l pl drm
480 Sterowniki DRM (%{drm_xfree_version}).
481
482 %package smp-drm
483 Summary:        DRM SMP kernel modules
484 Summary(pl):    Sterowniki DRM dla maszyn wieloprocesorowych
485 Group:          Base/Kernel
486 Provides:       %{name}-drm = %{drm_xfree_version}
487 PreReq:         %{name}-smp = %{version}-%{release}
488 Requires(postun):       %{name}-smp = %{version}-%{release}
489
490 %description smp-drm
491 DRM SMP kernel modules (%{drm_xfree_version}).
492
493 %description -l pl smp-drm
494 Sterowniki DRM dla maszyn wieloprocesorowych (%{drm_xfree_version}).
495
496 %package headers
497 Summary:        Header files for the Linux kernel
498 Summary(pl):    Pliki nagĀ³Ć³wkowe jĀ±dra
499 Group:          Base/Kernel
500 Provides:       %{name}-headers(agpgart) = %{version}
501 Provides:       %{name}-headers(reiserfs) = %{version}
502 Provides:       %{name}-headers(bridging) = %{version}
503 Provides:       i2c-devel = 2.7.0
504 Provides:       %{name}(netfilter) = 1.2.7a-%{netfilter_snap}
505 Autoreqprov:    no
506
507 %description headers
508 These are the C header files for the Linux kernel, which define
509 structures and constants that are needed when building most standard
510 programs under Linux, as well as to rebuild the kernel.
511
512 %description headers -l pl
513 Pakiet zawiera pliki nagĀ³Ć³wkowe jĀ±dra, niezbedne do rekompilacji jĀ±dra
514 oraz niektĆ³rych programĆ³w.
515
516 %package source
517 Summary:        Kernel source tree
518 Summary(pl):    Kod Ā¼rĆ³dĀ³owy jĀ±dra Linuxa
519 Group:          Base/Kernel
520 Autoreqprov:    no
521 Requires:       %{name}-headers = %{version}-%{release}
522 %ifarch %{ix86}
523 Requires:       bin86
524 %endif
525
526 %description source
527 This is the source code for the Linux kernel. It is required to build
528 most C programs as they depend on constants defined in here. You can
529 also build a custom kernel that is better tuned to your particular
530 hardware.
531
532 %description -l de source
533 Das Kernel-Source-Paket enthƤlt den source code (C/Assembler-Code) des
534 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
535 C-Programme zu compilieren, da sie auf Konstanten zurĆ¼ckgreifen, die
536 im Kernel-Source definiert sind. Die Source-Dateien kƶnnen auch
537 benutzt werden, um einen Kernel zu compilieren, der besser auf Ihre
538 Hardware ausgerichtet ist.
539
540 %description -l fr source
541 Le package pour le kernel-source contient le code source pour le noyau
542 linux. Ces sources sont nĆ©cessaires pour compiler la plupart des
543 programmes C, car il dĆ©pend de constantes dĆ©finies dans le code
544 source. Les sources peuvent ĆŖtre aussi utilisĆ©e pour compiler un noyau
545 personnalisĆ© pour avoir de meilleures performances sur des matĆ©riels
546 particuliers.
547
548 %description source -l pl
549 Pakiet zawiera kod Ā¼rĆ³dĀ³owy jadra systemu.
550
551 %package doc
552 Summary:        Kernel documentation
553 Summary(pl):    Dokumentacja do kernela
554 Group:          Base/Kernel
555 Provides:       %{name}-doc = %{version}
556 Autoreqprov:    no
557
558 %description doc
559 This is the documentation for the Linux kernel, as found in
560 /usr/src/linux/Documentation directory.
561
562 %description -l pl doc
563 Pakiet zawiera dokumentacjĆŖ jĀ±dra z katalogu
564 /usr/src/linux/Documentation.
565
566 %prep
567 %setup -q -a3 -a6 -a8 -a9 -n linux-%{version}
568 # JFS 1.1.1
569 rm -fr fs/jfs
570 gzip -dc %{SOURCE7} | tar -xf -
571 # Adaptec AACRaid new drivers
572 rm -fr drivers/scsi/aacraid
573 bzip2 -dc %{SOURCE10} | tar -xf - -C drivers/scsi/
574 # Changing DRM source ....
575 cp -f drm/*.{c,h} drivers/char/drm/
576 %patch0 -p1
577 %patch10 -p1
578 %patch11 -p1
579 %patch12 -p1
580 %patch15 -p1
581 %patch16 -p1
582 %patch20 -p1
583 %patch21 -p1
584 %patch22 -p1
585 %patch25 -p1
586 %patch26 -p1
587 %patch30 -p1
588 %patch31 -p1
589 %patch32 -p1
590 %patch33 -p1
591 %patch40 -p1
592 %patch41 -p1
593 %patch45 -p1
594 %patch50 -p1
595 %patch55 -p1
596 %patch60 -p1
597 %patch65 -p1
598 #%patch70 -p1
599 %patch75 -p1
600 %patch100 -p1
601 %patch110 -p1
602 %patch111 -p1
603 %patch115 -p1
604 %patch120 -p1
605 %patch125 -p1
606 %patch150 -p1
607 %patch151 -p1
608 %patch152 -p1
609 %patch153 -p1
610 %patch154 -p1
611 %patch155 -p1
612 %patch156 -p1
613 %patch157 -p1
614 %patch158 -p1
615 %patch159 -p1
616 %patch160 -p1
617 %patch161 -p1
618 %patch162 -p0
619 %patch180 -p1
620 %patch181 -p1
621 %patch185 -p1
622 %patch200 -p1
623 %patch201 -p1
624 %patch205 -p1
625 %patch206 -p1
626 %patch210 -p1
627 %patch215 -p1
628 %patch216 -p1
629 %patch220 -p1
630 %patch225 -p1
631 %patch230 -p1
632 %patch235 -p1
633 %patch240 -p1
634 %patch245 -p1
635 %patch246 -p1
636 %patch255 -p1
637 %patch260 -p1
638 %patch265 -p1
639 %patch275 -p1
640 %patch1000 -p1
641 %patch1001 -p1
642 %patch1002 -p1
643 %patch1003 -p1
644 %patch1004 -p1
645 %patch1005 -p1
646 %patch1006 -p1
647 %patch1007 -p1
648 %patch1008 -p1
649 %patch1009 -p1
650 %patch1010 -p1
651 %patch1011 -p1
652 %patch1100 -p1
653 %patch1102 -p1
654 %patch1105 -p1
655 %patch1106 -p0
656 %patch1110 -p1
657 %patch1111 -p1
658 %patch1112 -p1
659 %patch1113 -p1
660 %patch1150 -p1
661 %patch1151 -p1
662 %patch1152 -p1
663 %patch1153 -p1
664 %patch1154 -p1
665 %patch1155 -p1
666 %patch1200 -p1
667 %patch1201 -p1
668 %patch1202 -p1
669 %patch1203 -p1
670 %patch1205 -p1
671 %patch1206 -p0
672 %patch1207 -p1
673 %patch1208 -p0
674 %patch1209 -p1
675 %patch1250 -p1
676 %patch1251 -p1
677 %patch1252 -p1
678 %patch1253 -p1
679 %patch1254 -p0
680 %patch1255 -p1
681 %patch1301 -p1
682 %patch1302 -p1
683 %patch1303 -p1
684 %patch1304 -p1
685 %patch1305 -p1
686 %patch1306 -p1
687 %patch1350 -p1
688 %patch1351 -p1
689 %patch1352 -p1
690 %patch1353 -p1
691 %patch1354 -p1
692 %patch1400 -p1
693 %patch1401 -p1
694 %patch1402 -p1
695 %patch1403 -p1
696 %patch1404 -p1
697 %patch1405 -p1
698 %patch1406 -p1
699 %patch1407 -p0
700 %patch1408 -p1
701 %patch1409 -p1
702 %patch1410 -p1
703 %patch1411 -p1
704 %patch1412 -p1
705 %patch1413 -p1
706 %patch1414 -p1
707 %patch1415 -p0
708 %patch1416 -p1
709 %patch1417 -p1
710
711 %patch2000 -p0
712 %patch2001 -p1
713 %patch2002 -p1
714 %patch2003 -p1
715
716 %patch3000 -p1
717 %patch3001 -p1
718 %patch3002 -p1
719 %patch3003 -p1
720
721 # Tekram DC395/315 U/UW SCSI host driver
722 echo Adding Tekram DC395/315 driver
723 patch -p1 -s <dc395/dc395-integ24.diff
724 install dc395/dc395x_trm.? dc395/README.dc395x drivers/scsi/
725 %patch270 -p0
726
727 # IP personality
728 #echo Adding IP Personality 
729 #patch -p1 -s <ippersonality-%{IPperson_version}/patches/ippersonality-20020819-linux-2.4.19.diff
730
731 # hostap
732 echo Installing Host AP support
733 patch -p1 -s < hostap-%{hostap_version}/kernel-patches/hostap-linux-2.4.19-rc3.patch
734 cp hostap-%{hostap_version}/driver/modules/hostap*.[ch] drivers/net/wireless/
735
736 # The following go last as they touch a lot of code
737 # and/or are on bcond and/or are ifarch
738
739 %{!?_without_grsec:echo GRSecurity}
740 %{!?_without_grsec:%patch800 -p1}
741 %{!?_without_grsec:%patch801 -p1}
742 %{!?_without_grsec:%patch802 -p1}
743
744 #%ifarch %{ix86}
745 #echo Win4Lin patch ...
746 #%patch900 -p1
747 #%patch991 -p1
748 #%endif
749
750 # Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
751 mv -f drivers/atm/Makefile drivers/atm/Makefile.orig
752 sed -e 's/EXTRA_CFLAGS.*//g' drivers/atm/Makefile.orig > drivers/atm/Makefile
753 mv -f net/ipsec/Makefile net/ipsec/Makefile.orig
754 sed -e 's/EXTRA_CFLAGS.*-g//g' net/ipsec/Makefile.orig > net/ipsec/Makefile
755
756 # Fix EXTRAVERSION and CC in main Makefile
757 mv -f Makefile Makefile.orig
758 sed -e 's/EXTRAVERSION =.*/EXTRAVERSION =/g' \
759 %ifarch sparc64
760     -e 's/CC.*$(CROSS_COMPILE)gcc/CC            = sparc64-linux-gcc/g' \
761 %endif
762     Makefile.orig >Makefile
763
764 %build
765 BuildKernel() {
766         %{?_debug:set -x}
767         # is this a special kernel we want to build?
768         BOOT=
769         smp=
770         [ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
771         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
772 %ifarch %{ix86}
773         if [ "$smp" = "yes" ]; then
774                 Config="ia32-smp"
775         else
776                 Config="ia32"
777         fi
778 %else
779         if [ "$smp" = "yes" ]; then
780                 Config="%{_target_cpu}-smp"
781         else
782                 Config="%{_target_cpu}"
783         fi
784 %endif
785         if [ "$BOOT" = "yes" ]; then
786                 KernelVer=%{version}-%{release}BOOT
787         else
788                 KernelVer=%{version}-%{release}$1
789         fi
790         echo "BUILDING THE NORMAL KERNEL $*..."
791 :> arch/%{base_arch}/defconfig
792         cat $RPM_SOURCE_DIR/kernel-$Config.config >> arch/%{base_arch}/defconfig
793 %ifarch i386
794         echo "CONFIG_M386=y" >> arch/%{base_arch}/defconfig
795 %endif
796 %ifarch i586
797         echo "CONFIG_M586=y" >> arch/%{base_arch}/defconfig
798 %endif
799 %ifarch i686
800         echo "CONFIG_M686=y" >> arch/%{base_arch}/defconfig
801 %endif
802 %ifarch athlon
803         echo "CONFIG_MK7=y" >> arch/%{base_arch}/defconfig
804 %endif
805         %{?_with_preemptive:cat %{SOURCE1100} >> arch/%{base_arch}/defconfig}
806         %{!?_with_preemptive:echo "# CONFIG_PREEMPT is not set" >> arch/%{base_arch}/defconfig}
807         cat %{SOURCE1000} >> arch/%{base_arch}/defconfig
808         cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
809         
810         if [ "$BOOT" = "yes" ] ; then
811                 echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig
812                 echo "# CONFIG_CRYPTO is not set" >> arch/%{base_arch}/defconfig
813                 echo "CONFIG_ROMFS_FS=y" >> arch/%{base_arch}/defconfig
814                 echo "# CONFIG_IP_NF_MATCH_STEALTH is not set">> arch/%{base_arch}/defconfig
815                 echo "# CONFIG_NET_SCH_WRR is not set" >> arch/%{base_arch}/defconfig
816                 echo "# CONFIG_HOSTAP is not set" >> arch/%{base_arch}/defconfig
817                 echo "# CONFIG_USB_KONICAWC is not set">> arch/%{base_arch}/defconfig
818         %ifarch %{ix86}
819                 echo "# CONFIG_MKI is not set" >> arch/%{base_arch}/defconfig
820         %endif
821         fi
822 %ifarch %{ix86}
823                 cat %{SOURCE2000} >> arch/%{base_arch}/defconfig
824 %endif
825 %{?_without_grsec:echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig}
826 %{?_without_grsec:echo "# CONFIG_IP_NF_MATCH_STEALTH is not set">> arch/%{base_arch}/defconfig}
827 %{!?_without_grsec:cat %{SOURCE1666} >> arch/%{base_arch}/defconfig}
828
829 %ifarch i386
830         mv -f arch/%{base_arch}/defconfig arch/%{base_arch}/defconfig.orig
831         sed -e 's/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/' \
832                 arch/%{base_arch}/defconfig.orig > arch/%{base_arch}/defconfig
833 %endif
834
835         %{__make} mrproper
836         ln -sf arch/%{base_arch}/defconfig .config
837
838 %ifarch sparc
839         sparc32 %{__make} oldconfig
840         sparc32 %{__make} dep clean
841 %else
842         %{__make} oldconfig
843         %{__make} dep clean
844 %endif
845         %{__make} include/linux/version.h
846
847 # making  table for soundmodem.
848         (cd drivers/net/hamradio/soundmodem; \
849         %{__cc} -o gentbl -lm gentbl.c; \
850         ./gentbl)       
851
852 %ifarch %{ix86}
853         %{__make} bzImage
854 %endif
855 %ifarch sparc
856         sparc32 %{__make} boot
857 %else
858 %ifnarch %{ix86}
859         %{__make}
860 %endif
861 %endif
862 %ifarch sparc
863         sparc32 %{__make} modules
864 %else
865         %{__make} modules
866 %endif
867
868         mkdir -p $KERNEL_INSTALL_DIR/boot
869         install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
870 %ifarch %{ix86}
871         cp arch/i386/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
872 %endif
873 %ifarch alpha sparc sparc64
874         gzip -cfv vmlinux > vmlinuz
875         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
876         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
877 %endif
878 %ifarch ppc
879         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
880         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
881 %endif
882 %ifarch sparc
883         sparc32 %{__make} modules_install \
884         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
885         KERNELRELEASE=$KernelVer
886         echo KERNEL RELEASE $KernelVer
887 %else
888         %{__make} modules_install \
889         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
890         KERNELRELEASE=$KernelVer
891         echo KERNEL RELEASE $KernelVer
892 %endif
893 }
894
895 KERNEL_BUILD_DIR=`pwd`
896 KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
897 rm -rf $KERNEL_INSTALL_DIR
898 install -d $KERNEL_INSTALL_DIR
899
900 # make drivers/scsi/ missing files
901 #       (cd drivers/scsi; make -f M)
902         
903 # UP KERNEL
904 %{!?_without_up:BuildKernel}
905
906 # SMP KERNEL
907 %{!?_without_smp:BuildKernel smp}
908
909 # BOOT kernel
910 %ifnarch i586 i686 athlon
911 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed/%{_libdir}/bootdisk"
912 rm -rf $KERNEL_INSTALL_DIR
913 %{!?_without_boot:BuildKernel BOOT}
914 %endif
915
916 %install
917 rm -rf $RPM_BUILD_ROOT
918 umask 022
919
920 install -d $RPM_BUILD_ROOT%{_prefix}/{include,src/linux-%{version}}
921
922 KERNEL_BUILD_DIR=`pwd`
923
924 KERNEL_BUILD_INSTALL=no
925 %{!?_without_up:KERNEL_BUILD_INSTALL=yes}
926 %{!?_without_smp:KERNEL_BUILD_INSTALL=yes}
927 [ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
928
929 for i in "" smp ; do
930         if [ -e  $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
931                 rm -f $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
932                 ln -sf %{_prefix}/src/linux-%{version} \
933                         $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
934         fi
935 done
936 ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT%{_includedir}/linux
937 ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
938
939 %ifarch sparc sparc64
940 ln -s /usr/src/linux/include/asm-sparc $RPM_BUILD_ROOT%{_includedir}/asm-sparc
941 ln -s ../src/linux/include/asm-sparc64 $RPM_BUILD_ROOT%{_includedir}/asm-sparc64
942 %else
943 ln -sf ../src/linux/include/asm $RPM_BUILD_ROOT/usr/include/asm
944 %endif
945
946 %if %{?_without_source:0}%{!?_without_source:1}
947 cp -a . $RPM_BUILD_ROOT/usr/src/linux-%{version}/
948 %else
949 cp -a {include,scripts,Makefile,Rules.make,Documentation} $RPM_BUILD_ROOT/usr/src/linux-%{version}/
950 %endif
951
952 %ifarch sparc sparc64
953 sh %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}
954 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/asm/BuildASM
955 %endif
956
957 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
958
959 %if %{?_without_source:0}%{!?_without_source:1}
960 %{__make} mrproper
961
962 find  -name "*~" -print | xargs rm -f
963 find  -name "*.orig" -print | xargs rm -f
964
965 %ifarch %{ix86}
966 cat $RPM_SOURCE_DIR/kernel-ia32.config > .config
967 %else
968 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}.config .config
969 %endif
970
971 %ifarch i386
972 echo "CONFIG_M386=y" >> .config
973 %endif
974 %ifarch i586
975 echo "CONFIG_M586=y" >> .config
976 %endif
977 %ifarch i686
978 echo "CONFIG_M686=y" >> .config
979 %endif
980 %ifarch athlon
981 echo "CONFIG_MK7=y" >> .config
982 %endif
983 %{?_with_preemptive:cat %{SOURCE1100} >> .config}
984 %{!?_with_preemptive:echo "# CONFIG_PREEMPT is not set" >> .config}
985 cat %{SOURCE1000} >> .config
986 cat %{SOURCE1001} >> .config
987 %{!?_without_grsec:cat %{SOURCE1666} >> .config}
988
989 %ifarch %{ix86}
990 cat %{SOURCE2000} >> .config
991 %endif
992
993 %ifarch sparc
994 sparc32 %{__make} oldconfig
995 %else
996 %{__make} oldconfig
997 %endif
998
999 mv include/linux/autoconf.h include/linux/autoconf-up.h
1000 cp .config config-up
1001
1002 %ifarch %{ix86}
1003 cat $RPM_SOURCE_DIR/kernel-ia32-smp.config >> .config
1004 %else
1005 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}-smp.config .config
1006 %endif
1007
1008 %ifarch i386
1009 echo "CONFIG_M386=y" >> .config
1010 %endif
1011 %ifarch i586
1012 echo "CONFIG_M586=y" >> .config
1013 %endif
1014 %ifarch i686
1015 echo "CONFIG_M686=y" >> .config
1016 %endif
1017 %ifarch athlon
1018 echo "CONFIG_MK7=y" >> .config
1019 %endif
1020
1021 %{?_with_preemptive:cat %{SOURCE1100} >> .config}
1022 %{!?_with_preemptive:echo "# CONFIG_PREEMPT is not set" >> .config}
1023 cat %{SOURCE1000} >> .config
1024 cat %{SOURCE1001} >> .config
1025 %{!?_without_grsec:cat %{SOURCE1666} >> .config}
1026
1027 %ifarch %{ix86}
1028 cat %{SOURCE2000} >> .config
1029 %endif
1030
1031 %ifarch sparc
1032 sparc32 %{__make} oldconfig
1033 %else
1034 %{__make} oldconfig
1035 %endif
1036 mv include/linux/autoconf.h include/linux/autoconf-smp.h
1037 cp .config config-smp
1038 %endif
1039
1040 install %{SOURCE1} $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux/autoconf.h
1041
1042 %if %{?_without_source:0}%{!?_without_source:1}
1043 # this generates modversions info which we want to include and we may as
1044 # well include the depends stuff as well
1045 %{__make} symlinks 
1046 %{__make} include/linux/version.h
1047 #%{__make} "`pwd`/include/linux/modversions.h"
1048 %endif
1049 rm -f include/linux/modversions.h
1050 echo "#include <linux/modsetver.h>" > include/linux/modversions.h
1051
1052
1053 # this generates modversions info which we want to include and we may as
1054 # well include the depends stuff as well, after we fix the paths
1055
1056 %if %{?_without_source:0}%{!?_without_source:1}
1057 %{__make} depend 
1058 find $RPM_BUILD_ROOT/usr/src/linux-%{version} -name ".*depend" | \
1059 while read file ; do
1060         mv $file $file.old
1061         sed -e "s|$RPM_BUILD_ROOT\(/usr/src/linux\)|\1|g" < $file.old > $file
1062         rm -f $file.old
1063 done
1064
1065 %{__make} clean
1066 rm -f scripts/mkdep
1067 rm -f drivers/net/hamradio/soundmodem/gentbl
1068 %endif
1069
1070 # BOOT
1071 %if %{?_without_boot:0}%{!?_without_boot:1}
1072 %ifnarch i586 i686 athlon
1073 install -d $RPM_BUILD_ROOT/%{_libdir}/bootdisk
1074 cp -rdp $KERNEL_BUILD_DIR-installed/%{_libdir}/bootdisk/* $RPM_BUILD_ROOT/%{_libdir}/bootdisk
1075 %endif
1076 %endif
1077
1078 %clean
1079 rm -rf $RPM_BUILD_ROOT
1080 rm -rf $RPM_BUILD_DIR/linux-installed
1081
1082 %post
1083 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null 
1084 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1085 ln -sf vmlinuz-%{version}-%{release} /boot/vmlinuz
1086 ln -sf System.map-%{version}-%{release} /boot/System.map
1087
1088 if [ ! -L /lib/modules/%{version} ] ; then
1089         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1090 fi
1091 rm -f /lib/modules/%{version}
1092 ln -snf %{version}-%{release} /lib/modules/%{version}
1093 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1094
1095 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}.gz %{version}-%{release}
1096 mv -f /boot/initrd /boot/initrd.old
1097 ln -sf initrd-%{version}-%{release}.gz /boot/initrd
1098
1099 if [ -f %{_prefix}/src/linux-%{version}/config-up ] ; then
1100         ln -s %{_prefix}/src/linux-%{version}/config-up %{_prefix}/src/linux-%{version}/.config
1101 fi
1102
1103 if [ -x /sbin/rc-boot ] ; then
1104         /sbin/rc-boot 1>&2 || :
1105 fi
1106
1107 %post smp
1108 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1109 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1110 ln -sf vmlinuz-%{version}-%{release}smp /boot/vmlinuz
1111 ln -sf System.map-%{version}-%{release}smp /boot/System.map
1112
1113 if [ ! -L /lib/modules/%{version} ] ; then
1114         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1115 fi
1116 rm -f /lib/modules/%{version}
1117 ln -snf %{version}-%{release}smp /lib/modules/%{version}
1118 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1119
1120 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
1121 mv -f /boot/initrd /boot/initrd.old
1122 ln -sf initrd-%{version}-%{release}smp.gz /boot/initrd
1123
1124 if [ -f %{_prefix}/src/linux-%{version}/config-smp ] ; then
1125         ln -s %{_prefix}/src/linux-%{version}/config-smp %{_prefix}/src/linux-%{version}/.config
1126 fi
1127
1128 if [ -x /sbin/rc-boot ] ; then
1129         /sbin/rc-boot 1>&2 || :
1130 fi
1131
1132 %post BOOT
1133 if [ ! -L %{_libdir}/bootdisk/lib/modules/%{version} ] ; then
1134         mv -f %{_libdir}/bootdisk/lib/modules/%{version} %{_libdir}/bootdisk/lib/modules/%{version}.rpmsave
1135 fi
1136 if [ ! -L %{_libdir}/bootdisk/boot/vmlinuz-%{version} ] ; then
1137         mv -f %{_libdir}/bootdisk/boot/vmlinuz-%{version} %{_libdir}/bootdisk/boot/vmlinuz-%{version}.rpmsave
1138 fi
1139 rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1140 ln -snf %{version}-%{release}BOOT %{_libdir}/bootdisk/lib/modules/%{version}
1141 rm -f %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1142 ln -snf vmlinuz-%{version}-%{release}BOOT %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1143
1144 %postun
1145 if [ -L /lib/modules/%{version} ]; then 
1146         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}" ]; then
1147                 if [ "$1" = "0" ]; then
1148                         rm -f /lib/modules/%{version}
1149                 fi
1150         fi
1151 fi
1152 rm -f /boot/initrd-%{version}-%{release}.gz
1153
1154 %post pcmcia-cs
1155 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1156
1157 %postun pcmcia-cs
1158 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1159
1160 %post drm
1161 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1162
1163 %postun drm
1164 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1165
1166 %postun smp
1167 if [ -L /lib/modules/%{version} ]; then 
1168         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}smp" ]; then
1169                 if [ "$1" = "0" ]; then
1170                         rm -f /lib/modules/%{version}
1171                 fi
1172         fi
1173 fi
1174 rm -f /boot/initrd-%{version}-%{release}smp.gz
1175
1176 %post smp-pcmcia-cs
1177 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1178
1179 %postun smp-pcmcia-cs
1180 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1181
1182 %post smp-drm
1183 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1184
1185 %postun smp-drm
1186 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1187
1188 %postun BOOT
1189 if [ -L %{_libdir}/bootdisk/lib/modules/%{version} ]; then 
1190         if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}BOOT" ]; then
1191                 if [ "$1" = "0" ]; then
1192                         rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1193                 fi
1194         fi
1195 fi
1196
1197 %post headers
1198 rm -f /usr/src/linux
1199 ln -snf linux-%{version} /usr/src/linux
1200
1201 %postun headers
1202 if [ -L /usr/src/linux ]; then 
1203         if [ "`ls -l /usr/src/linux | awk '{ print $11 }'`" = "linux-%{version}" ]; then
1204                 if [ "$1" = "0" ]; then
1205                         rm -f /usr/src/linux
1206                 fi
1207         fi
1208 fi
1209
1210 %if %{?_without_up:0}%{!?_without_up:1}
1211 %files
1212 %defattr(644,root,root,755)
1213 %ifarch alpha sparc ppc
1214 /boot/vmlinux-%{version}-%{release}
1215 %endif
1216 /boot/vmlinuz-%{version}-%{release}
1217 /boot/System.map-%{version}-%{release}
1218 %dir /lib/modules/%{version}-%{release}
1219 /lib/modules/%{version}-%{release}/kernel
1220 %ifnarch sparc
1221 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1222 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1223 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1224 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1225 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1226 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1227 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1228 %endif
1229 %ifnarch ppc sparc
1230 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/ide/ide-cs.o*
1231 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1232 %ifnarch alpha
1233 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1234 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1235 %endif
1236 %endif
1237 %ifnarch sparc
1238 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1239 %endif
1240 /lib/modules/%{version}-%{release}/build
1241 %ghost /lib/modules/%{version}-%{release}/modules.*
1242
1243 %ifnarch sparc
1244 %files pcmcia-cs
1245 %defattr(644,root,root,755)
1246 /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1247 /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1248 /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1249 /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1250 /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1251 /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1252 /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1253 %ifnarch ppc
1254 /lib/modules/%{version}-%{release}/kernel/drivers/ide/ide-cs.o*
1255 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1256 %ifnarch alpha
1257 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1258 /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1259 %endif
1260 %endif
1261 %endif
1262
1263 %ifnarch sparc
1264 %files drm
1265 %defattr(644,root,root,755)
1266 /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1267 %endif                  # %%{_without_up}
1268 %endif
1269
1270 %if %{?_without_smp:0}%{!?_without_smp:1}
1271 %files smp
1272 %defattr(644,root,root,755)
1273 %ifarch sparc ppc
1274 /boot/vmlinux-%{version}-%{release}smp
1275 %endif
1276 /boot/vmlinuz-%{version}-%{release}smp
1277 /boot/System.map-%{version}-%{release}smp
1278 %dir /lib/modules/%{version}-%{release}smp
1279 /lib/modules/%{version}-%{release}smp/kernel
1280 %ifnarch sparc
1281 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1282 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1283 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1284 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1285 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1286 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1287 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.o*
1288 %endif
1289 %ifnarch ppc sparc
1290 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/ide-cs.o*
1291 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1292 %ifnarch alpha
1293 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1294 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1295 %endif
1296 %endif
1297 %ifnarch sparc
1298 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1299 %endif
1300 /lib/modules/%{version}-%{release}smp/build
1301 %ghost /lib/modules/%{version}-%{release}smp/modules.*
1302
1303 %ifnarch sparc
1304 %files -n kernel-smp-pcmcia-cs
1305 %defattr(644,root,root,755)
1306 /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1307 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1308 /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1309 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1310 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1311 /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1312 /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/dtl1_cs.o*
1313 %ifnarch ppc
1314 /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/ide-cs.o*
1315 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1316 %ifnarch alpha
1317 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1318 /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1319 %endif
1320 %endif
1321 %endif
1322
1323 %ifnarch sparc
1324 %files -n kernel-smp-drm
1325 %defattr(644,root,root,755)
1326 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1327 %endif                  # %%{_without_smp}
1328 %endif
1329
1330 %if %{?_without_boot:0}%{!?_without_boot:1}
1331 %ifnarch i586 i686 athlon               # narch
1332 %files BOOT
1333 %defattr(644,root,root,755)
1334 %ifarch alpha sparc ppc         # arch
1335 %{_libdir}/bootdisk/boot/vmlinux-%{version}-%{release}BOOT
1336 %endif                          #arch
1337 %{_libdir}/bootdisk/boot/vmlinuz-%{version}-%{release}BOOT
1338 %{_libdir}/bootdisk/boot/System.map-%{version}-%{release}BOOT
1339 %dir %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT
1340 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/kernel
1341 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/build
1342 %ghost %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/modules.*
1343 %endif                          # narch
1344 %endif                          # %%{_without_boot}
1345
1346 %files headers
1347 %defattr(644,root,root,755)
1348 %dir %{_prefix}/src/linux-%{version}
1349 %{_prefix}/src/linux-%{version}/include
1350 %{_includedir}/asm
1351 %{_includedir}/linux
1352
1353 %if %{?_without_doc:0}%{!?_without_doc:1}
1354 %files doc
1355 %defattr(644,root,root,755)
1356 %{_prefix}/src/linux-%{version}/Documentation
1357 %endif
1358
1359 %if %{?_without_source:0}%{!?_without_source:1}
1360 %files source
1361 %defattr(644,root,root,755)
1362 %{_prefix}/src/linux-%{version}/arch
1363 %{_prefix}/src/linux-%{version}/crypto
1364 %{_prefix}/src/linux-%{version}/drivers
1365 %{_prefix}/src/linux-%{version}/fs
1366 %{!?_without_grsec:%{_prefix}/src/linux-%{version}/grsecurity}
1367 %{_prefix}/src/linux-%{version}/init
1368 %{_prefix}/src/linux-%{version}/ipc
1369 #%{_prefix}/src/linux-%{version}/kdb
1370 %{_prefix}/src/linux-%{version}/kernel
1371 %{_prefix}/src/linux-%{version}/lib
1372 %{_prefix}/src/linux-%{version}/mm
1373 %{_prefix}/src/linux-%{version}/net
1374 %{_prefix}/src/linux-%{version}/scripts
1375 %{_prefix}/src/linux-%{version}/.config
1376 %{_prefix}/src/linux-%{version}/.depend
1377 %{_prefix}/src/linux-%{version}/.hdepend
1378 %{_prefix}/src/linux-%{version}/COPYING
1379 %{_prefix}/src/linux-%{version}/CREDITS
1380 %{_prefix}/src/linux-%{version}/MAINTAINERS
1381 %{_prefix}/src/linux-%{version}/Makefile
1382 %{_prefix}/src/linux-%{version}/README
1383 %{_prefix}/src/linux-%{version}/REPORTING-BUGS
1384 %{_prefix}/src/linux-%{version}/Rules.make
1385 %{_prefix}/src/linux-%{version}/config*
1386 %endif
This page took 0.136817 seconds and 4 git commands to generate.