/[gentoo-x86]/sys-kernel/linux-extras/linux-extras-2.4.5.ebuild
Gentoo

Contents of /sys-kernel/linux-extras/linux-extras-2.4.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jul 10 06:47:45 2001 UTC (18 years, 6 months ago) by drobbins
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
removed 2.4.5 to the Attic; a bit too flaky to still keep around

1 # Copyright 1999-2000 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2 or later
3 # Author Daniel Robbins <drobbins@gentoo.org>
4 # /home/cvsroot/gentoo-x86/sys-kernel/linux/linux-2.4.4.3.ebuild,v 1.1 2001/05/02 14:31:06 achim Exp
5
6 #OKV=original kernel version, KV=patched kernel version
7 OKV=2.4.5
8 KV=${OKV}
9 if [ "${PN}" = "linux-extras" ]
10 then
11 S=/usr/src/linux-${KV}
12 else
13 S=${WORKDIR}/linux-${KV}
14 fi
15
16 # Versions of LVM
17 LVMV=0.9.1_beta7
18
19 LVMVARC=0.9.1_beta7
20 # Versions of alsa
21 AV=0.5.11
22
23 # Versionos of jfs
24 JFSV=0.2.1
25
26 # Versions of lm_sensors and i2c
27 SENV=20010530-gentoo
28 I2CV=20010530-gentoo
29
30 # Versions of reiserfs
31 RV=20010327
32 KNV="6.g"
33 PIV="1.d"
34
35 # Versions of xmlprocfs
36 XMLV=0.3
37
38 # Versions of pcmcia-cs
39 PCV="3.1.25"
40
41 # Version of XFS
42 XFSV=20010530-gentoo
43
44 [ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes"
45 [ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources"
46 [ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries"
47
48 # We use build in /usr/src/linux in case of linux-extras
49 # so we need no sources
50 if [ "${PN}" != "linux-extras" ]
51 then
52 SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2
53 http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-${OKV}/bigpatch-${OKV}.diff.bz2"
54 # http://www.kernel.org/pub/linux/kernel/people/alan/2.4/patch-${KV}.bz2
55 # http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-${JFSV}-patch.tar.gz
56 # http://download.sourceforge.net/xmlprocfs/linux-2.4-xmlprocfs-${XMLV}.patch.gz
57 # ftp://ftp.reiserfs.com/pub/reiserfs-for-2.4/linux-${OKV}-reiserfs-${RV}.patch.gz
58
59 if [ "`use i2c`" ] || [ "`use lm_sensors`" ]
60 then
61 # SRC_URI="${SRC_URI} http://www.netroedge.com/~lm78/archive/i2c-${I2CV}.tar.gz"
62 SRC_URI="${SRC_URI} ftp://ftp.ibiblio.org/pub/Linux/distributions/gentoo/gentoo-sources/i2c-${I2CV}.tar.gz"
63 fi
64 if [ "`use lm_sensors`" ]
65 then
66 # SRC_URI="${SRC_URI} http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz"
67 SRC_URI="${SRC_URI} ftp://ftp.ibiblio.org/pub/Linux/distributions/gentoo/gentoo-sources/lm_sensors-${SENV}.tar.gz"
68 fi
69 if [ "`use lvm`" ]
70 then
71 SRC_URI="${SRC_URI} ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz"
72 fi
73 if [ "`use alsa`" ]
74 then
75 SRC_URI="${SRC_URI} ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2"
76 fi
77 if [ "`use pcmcia-cs`" ]
78 then
79 SRC_URI="${SRC_URI} http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz"
80 fi
81 if [ "`use xfs`" ]
82 then
83 SRC_URI="${SRC_URI} ftp://ftp.ibiblio.org/pub/Linux/distributions/gentoo/gentoo-sources/linux-${KV}-xfs-${XFSV}.diff.gz"
84 fi
85 fi
86
87 if [ "${PN}" = "linux-extras" ]
88 then
89 DEPEND=">=sys-kernel/linux-sources-${PVR}"
90 RDEPEND=" "
91 if [ "`use xfs`" ]
92 then
93 DEPEND="${DEPEND} >=sys-devel/autoconf-2.13"
94 fi
95 if [ "`use alsa`" ]
96 then
97 PROVIDE="virtual/alsa"
98 fi
99 elif [ "${PN}" = "linux" ]
100 then
101 PROVIDE="virtual/kernel"
102 RDEPEND=">=sys-apps/reiserfs-utils-3.6.25-r1"
103 DEPEND=">=sys-apps/modutils-2.4.2
104 >=sys-devel/flex-2.5.4a-r3
105 >=dev-util/yacc-1.9.1-r1"
106 if [ "`use xfs`" ]
107 then
108 DEPEND="${DEPEND} >=sys-devel/autoconf-2.13"
109 fi
110 if [ "`use alsa`" ]
111 then
112 PROVIDE="${PROVIDE} virtual/alsa"
113 fi
114 fi
115
116 HOMEPAGE="http://www.kernel.org/
117 http://www.netroedge.com/~lm78/
118 http://www.namesys.com
119 http://www.sistina.com/lvm/
120 http://www.alsa-project.org
121 http://pcmcia-cs.sourceforge.net
122 http://linux-xfs.sgi.com/projects/xfs/"
123
124 # this is not pretty...
125 LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include"
126
127 src_unpack() {
128
129 # We only need to unpack for linux and linux-sources
130
131 if [ "${PN}" != "linux-extras" ]
132 then
133
134 #unpack kernel and apply reiserfs-related patches
135 cd ${WORKDIR}
136 unpack linux-${OKV}.tar.bz2
137 try mv linux linux-${KV}
138 cd ${S}
139
140 # echo "Applying reiserfs-knfsd patch..."
141 # try gzip -dc ${DISTDIR}/linux-${OKV}-knfsd-${KNV}.patch.gz | patch -p1
142 # echo "Applying reiserfs-procinfo patch..."
143 # try gzip -dc ${DISTDIR}/linux-${OKV}-procinfo-${PIV}.patch.gz | patch -p1
144 # echo "Applying reiserfs-quota patch..."
145 # try bzip2 -dc ${DISTDIR}/reiserfs-quota-${OKV}.dif.bz2 | patch -p1
146 echo "Applying reiserfs patch..."
147 try bzip2 -dc ${DISTDIR}/bigpatch-${OKV}.diff.bz2 | patch -p1
148 try patch -p0 < ${FILESDIR}/${PVR}/fs-super.c.diff
149
150 if [ "`use lvm`" ] || [ "`use alsa`" ] || [ "`use i2c`" ] || [ "`use lm_sensors`" ] || [ "`use pcmcia-cs`" ]
151 then
152 mkdir -p ${S}/extras
153 fi
154
155 if [ "`use xfs`" ]
156 then
157 cd ${S}
158 echo "Applying xfs patch..."
159 try gzip -dc ${DISTDIR}/linux-${KV}-xfs-${XFSV}.diff.gz | patch -p1
160 fi
161
162 if [ "`use lvm`" ]
163 then
164 #create and apply LVM patch. The tools get built later.
165 cd ${S}/extras
166 echo "Unpacking and applying LVM patch..."
167 unpack lvm_${LVMVARC}.tar.gz
168 try cd LVM/${LVMV}
169
170 # I had to hack this in so that LVM will look in the current linux
171 # source directory instead of /usr/src/linux for stuff - pete
172 try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
173
174 cd PATCHES
175 try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
176 cd ${S}
177 # the -l option allows this patch to apply cleanly (ignore whitespace changes)
178 if [ "`use xfs`" ]
179 then
180 try patch -l -p1 < ${FILESDIR}/${PVR}/linux-${KV}-xfs-${XFSV}-pre-lvm.diff
181 fi
182 try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
183 cd ${S}/drivers/md
184 try patch -p0 < ${FILESDIR}/${PVR}/lvm.c.diff
185 fi
186
187 if [ "`use alsa`" ]
188 then
189 #unpack alsa drivers
190 echo "Unpacking ALSA drivers..."
191 cd ${S}/extras
192 unpack alsa-driver-${AV}.tar.bz2
193 fi
194
195 if [ "`use i2c`" ] || [ "`use lm_sensors`" ]
196 then
197 if [ -z "`use i2c`" ]
198 then
199 echo "Note: Using i2c since lm_sensors is enabled."
200 fi
201 #unpack and apply the i2c patch
202 echo "Unpacking and applying i2c patch..."
203 cd ${S}/extras
204 unpack i2c-${I2CV}.tar.gz
205 try cd i2c-${I2CV}
206 try mkpatch/mkpatch.pl . ${S} > ${S}/i2c-patch
207 try cp -a Makefile Makefile.orig
208
209 cd ${S}
210 try patch -p1 < i2c-patch
211 rm -f i2c-patch
212 fi
213
214 if [ "`use lm_sensors`" ]
215 then
216 #unpack and apply the lm_sensors patch
217 echo "Unpacking and applying lm_sensors patch..."
218 cd ${S}/extras
219 unpack lm_sensors-${SENV}.tar.gz
220 try cd lm_sensors-${SENV}
221 try mkpatch/mkpatch.pl . ${S} > ${S}/lm_sensors-patch
222 try rmdir src
223 try ln -s ../.. src
224 try cp -a Makefile Makefile.orig
225
226 cd ${S}
227 try patch -p1 < lm_sensors-patch
228 rm -f lm_sensors-patch
229 fi
230
231 if [ "`use xfs`" ]
232 then
233 echo "Applying xfs cleanup patch..."
234 try patch -p1 < ${FILESDIR}/${PVR}/linux-${KV}-xfs-${XFSV}-cleanup.diff
235 fi
236
237 if [ "`use pcmcia-cs`" ]
238 then
239 echo "Unpacking pcmcia-cs tools..."
240 cd ${S}/extras
241 unpack pcmcia-cs-${PCV}.tar.gz
242 patch -p0 < ${FILESDIR}/${PVR}/pcmcia-cs-${PCV}-gentoo.diff
243 fi
244 #get sources ready for compilation or for sitting at /usr/src/linux
245 echo "Preparing for compilation..."
246
247 cd ${S}
248
249 #sometimes we have icky kernel symbols; this seems to get rid of them
250 try make mrproper
251
252 #fix silly permissions in tarball
253 cd ${WORKDIR}
254 chown -R 0.0 ${S}
255 chmod -R a+r-w+X,u+w ${S}
256 fi
257 }
258
259 src_compile() {
260
261 if [ "${PN}" != "linux-sources" ]
262 then
263 if [ "${PN}" = "linux" ]
264 then
265 #this is the configuration for the default kernel
266 try cp ${FILESDIR}/${PVR}/config.bootcomp .config
267 try yes \"\" \| make oldconfig
268 echo "Ignore any errors from the yes command above."
269 try make include/linux/version.h
270 fi
271
272 if [ "$PN" = "linux" ]
273 then
274 try make symlinks
275 fi
276
277 if [ "`use lvm`" ]
278 then
279 #LVM tools are included in the linux and linux-extras pakcages
280 cd ${S}/extras/LVM/${LVMV}
281
282 # This is needed for linux-extras
283 if [ -f "Makefile" ]
284 then
285 try make distclean
286 fi
287 # I had to hack this in so that LVM will look in the current linux
288 # source directory instead of /usr/src/linux for stuff - pete
289 try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
290
291 try make
292 fi
293
294 if [ "`use i2c`" ] || [ "`use lm_sensors`" ]
295 then
296 cd ${S}/extras/i2c-${I2CV}
297 try sed -e \''s:^LINUX=.*:LINUX=src:'\' \
298 -e \''s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 0/'\' \
299 -e \''s:^I2C_HEADERS.*:I2C_HEADERS=src/include:'\' \
300 -e \'"s#^DESTDIR.*#DESTDIR := ${D}#"\' \
301 Makefile.orig > Makefile
302
303 try make clean
304
305 try make
306 fi
307
308 if [ "`use lm_sensors`" ]
309 then
310 cd ${S}/extras/lm_sensors-${SENV}
311 try sed -e \''s:^LINUX=.*:LINUX=src:'\' \
312 -e \''s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 0/'\' \
313 -e \''s:^I2C_HEADERS.*:I2C_HEADERS=src/include:'\' \
314 -e \'"s#^DESTDIR.*#DESTDIR := ${D}#"\' \
315 -e \''s#^PREFIX.*#PREFIX := /usr#'\' \
316 -e \''s#^MANDIR.*#MANDIR := /usr/share/man#'\' \
317 Makefile.orig > Makefile
318
319 try make clean
320
321 try make
322 fi
323
324 if [ "`use xfs`" ]
325 then
326 cd ${S}/extras/xfs-${XFSV}/acl
327 try make distclean
328 rm -f include/builddefs
329 try make \
330 CPPFLAGS=\""-I${S}/include"\" \
331 configure
332 try make \
333 PKG_SBIN_DIR=/sbin \
334 PKG_INC_DIR=/usr/include/acl \
335 PKG_LIB_DIR=/usr/lib \
336 PKG_MAN_DIR=/usr/share/man \
337 CC=\""gcc -I${S}/include"\" \
338 OPTIMIZER=\""${CFLAGS}"\" \
339 DEBUG=\"\"
340
341 cd ${S}/extras/xfs-${XFSV}/attr
342 try make distclean
343 rm -f include/builddefs
344 try make \
345 CPPFLAGS=\""-I${S}/include"\" \
346 configure
347 try make \
348 PKG_SBIN_DIR=/bin \
349 PKG_INC_DIR=/usr/include/acl \
350 PKG_LIB_DIR=/usr/lib \
351 PKG_MAN_DIR=/usr/share/man \
352 CC=\""gcc -I${S}/include"\" \
353 OPTIMIZER=\""${CFLAGS}"\" \
354 DEBUG=\"\"
355
356 cd ${S}/extras/xfs-${XFSV}/xfsprogs
357 try make distclean
358 rm -f include/builddefs
359 try make \
360 CPPFLAGS=\""-I${S}/include"\" \
361 configure
362 try make \
363 PKG_SBIN_DIR=/sbin \
364 PKG_BIN_DIR=/usr/sbin \
365 PKG_INC_DIR=/usr/include/xfs \
366 PKG_LIB_DIR=/usr/lib \
367 PKG_MAN_DIR=/usr/share/man \
368 CC=\""gcc -I${S}/include"\" \
369 OPTIMIZER=\""${CFLAGS}"\" \
370 DEBUG=\"\"
371
372 # dmapi and xfsdump must be built last, cuz they depend on libattr (in attr) and libxfs (in xfsprogs)
373 cd ${S}/extras/xfs-${XFSV}/dmapi
374 ln -sf ../../xfsprogs/include include/xfs
375 try make distclean
376 rm -f include/builddefs
377 try make \
378 CPPFLAGS=\""-I${S}/include -I${S}/extras/xfs-${XFSV}/dmapi/include"\" \
379 configure
380 try make \
381 PKG_INC_DIR=/usr/include/dmapi \
382 PKG_LIB_DIR=/usr/lib \
383 PKG_MAN_DIR=/usr/share/man \
384 CC=\""gcc -I${S}/include"\" \
385 OPTIMIZER=\""${CFLAGS}"\" \
386 DEBUG=\"\"
387
388 cd ${S}/extras/xfs-${XFSV}/xfsdump
389 ln -sf ../../xfsprogs/include include/xfs
390 ln -sf ../../attr/include include/attr
391 try make distclean
392 rm -f include/builddefs
393 try make \
394 CPPFLAGS=\""-I${S}/include -I${S}/extras/xfs-${XFSV}/xfsdump/include -I${S}/extras/xfs-${XFSV}/xfsprogs/include -I${S}/extras/xfs-${XFSV}/attr/include"\" \
395 LDFLAGS=\""-L${S}/extras/xfs-${XFSV}/attr/libattr -L${S}/extras/xfs-${XFSV}/xfsprogs/libxfs -L${S}/extras/xfs-${XFSV}/xfsprogs/libhandle -lhandle"\" \
396 configure
397 try make \
398 PKG_BIN_DIR=/usr/sbin \
399 PKG_LIB_DIR=/usr/lib \
400 PKG_MAN_DIR=/usr/share/man \
401 CC=\""gcc -I${S}/include -I${S}/extras/xfs-${XFSV}/xfsprogs/include -I${S}/extras/xfs-${XFSV}/attr/include"\" \
402 OPTIMIZER=\""${CFLAGS}"\" \
403 DEBUG=\"\" \
404 LIBATTR=\""-L${S}/extras/xfs-${XFSV}/attr/libattr -lattr"\" \
405 LIBXFS=\""-L${S}/extras/xfs-${XFSV}/xfsprogs/libxfs -lxfs"\" \
406 LIBHANDLE=\""-L${S}/extras/xfs-${XFSV}/xfsprogs/libhandle -lhandle"\"
407
408 fi
409
410 cd ${S}
411
412 if [ "${PN}" == "linux" ]
413 then
414 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
415 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" LEX=\""flex -l"\" bzImage
416 #LEX=\""flex -l"\" bzImage
417 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" LEX=\""flex -l"\" modules
418 #LEX=\""flex -l"\" modules
419
420 fi
421 # This must come after the kernel compilation in linux
422 if [ "`use alsa`" ]
423 then
424 cd ${S}/extras/alsa-driver-${AV}
425 # This is needed for linux-extras
426 if [ -f "Makefile.conf" ]
427 then
428 try make mrproper
429 fi
430 try ./configure --with-kernel=\"${S}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all
431 mkdir -p modules
432 try make
433 fi
434 if [ "`use pcmcia-cs`" ]
435 then
436 cd ${S}/extras/pcmcia-cs-${PCV}
437 # This is needed for linux-extras
438 if [ -f "Makefile" ]
439 then
440 try make clean
441 fi
442 try ./Configure -n --kernel=${S} --moddir=/lib/modules/${KV} \
443 --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/
444 try make all
445 fi
446 fi
447 }
448
449 src_install() {
450
451 # We install the alsa headers in all three packages
452 if [ "`use alsa`" ]
453 then
454 # get alsa includes
455 cd ${S}/extras/alsa-driver-${AV}
456 insinto /usr/src/linux-${KV}/include/linux
457 cd include
458 doins asound.h asoundid.h asequencer.h ainstr_*.h
459 fi
460
461 if [ "${PN}" != "linux-sources" ]
462 then
463 dodir /usr/lib
464
465 if [ "`use lvm`" ]
466 then
467 cd ${S}/extras/LVM/${LVMV}/tools
468
469 try CFLAGS=\""${CFLAGS} -I${S}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \
470 sbindir=${D}/sbin libdir=${D}/lib
471 #no need for a static library in /lib
472 mv ${D}/lib/*.a ${D}/usr/lib
473
474 cd ${S}/extras/LVM/${LVMV}
475 docinto LVM-${LVMV}
476 dodoc ABSTRACT CHANGELOG CONTRIBUTORS COPYING COPYING.LIB FAQ KNOWN_BUGS LVM-HOWTO
477 dodoc README TODO WHATSNEW
478 fi
479
480 if [ "`use lm_sensors`" ]
481 then
482 echo "Install sensor tools..."
483 #install sensors tools
484 cd ${S}/extras/lm_sensors-${SENV}
485 make install
486 docinto lm_sensors-${SENV}
487 dodoc BACKGROUND BUGS CHANGES CONTRIBUTORS COPYING INSTALL QUICKSTART README
488 fi
489
490 if [ "`use xfs`" ]
491 then
492 cd ${S}/extras/xfs-${XFSV}/acl
493 chmod +x install-sh
494 try make \
495 PKG_SBIN_DIR=${D}/sbin \
496 PKG_INC_DIR=${D}/usr/include/acl \
497 PKG_LIB_DIR=${D}/usr/lib \
498 PKG_MAN_DIR=${D}/usr/share/man \
499 install install-dev
500 rm -rf ${D}/usr/share/doc/acl
501 docinto xfs-${XFSV}/acl
502 dodoc README doc/CHANGES doc/COPYING doc/PORTING
503
504 cd ${S}/extras/xfs-${XFSV}/attr
505 chmod +x install-sh
506 try make \
507 PKG_SBIN_DIR=${D}/bin \
508 PKG_INC_DIR=${D}/usr/include/acl \
509 PKG_LIB_DIR=${D}/usr/lib \
510 PKG_MAN_DIR=${D}/usr/share/man \
511 install install-dev
512 rm -rf ${D}/usr/share/doc/attr
513 docinto xfs-${XFSV}/attr
514 dodoc README doc/CHANGES doc/COPYING doc/PORTING
515
516 cd ${S}/extras/xfs-${XFSV}/xfsprogs
517 chmod +x install-sh
518 try make \
519 PKG_SBIN_DIR=${D}/sbin \
520 PKG_BIN_DIR=${D}/usr/sbin \
521 PKG_INC_DIR=${D}/usr/include/xfs \
522 PKG_LIB_DIR=${D}/usr/lib \
523 PKG_MAN_DIR=${D}/usr/share/man \
524 install install-dev
525 rm -rf ${D}/usr/share/doc/xfsprogs
526 docinto xfs-${XFSV}/xfsprogs
527 dodoc README doc/CHANGES doc/COPYING docs/CREDITS doc/PORTING doc/README.LVM doc/README.quota
528
529 cd ${S}/extras/xfs-${XFSV}/dmapi
530 chmod +x install-sh
531 try make \
532 PKG_INC_DIR=${D}/usr/include/dmapi \
533 PKG_LIB_DIR=${D}/usr/lib \
534 PKG_MAN_DIR=${D}/usr/share/man \
535 install install-dev
536 rm -rf ${D}/usr/share/doc/dmapi
537 docinto xfs-${XFSV}/dmapi
538 dodoc README doc/CHANGES doc/COPYING doc/PORTING
539
540 cd ${S}/extras/xfs-${XFSV}/xfsdump
541 chmod +x install-sh
542 try make \
543 PKG_BIN_DIR=${D}/usr/sbin \
544 PKG_LIB_DIR=${D}/usr/lib \
545 PKG_MAN_DIR=${D}/usr/share/man \
546 install install-dev
547 rm -rf ${D}/usr/share/doc/xfsprogs
548 docinto xfs-${XFSV}/xfsdump
549 dodoc README doc/CHANGES doc/COPYING doc/PORTING doc/README.xfsdump
550 fi
551
552 if [ "${PN}" = "linux" ]
553 then
554 dodir /usr/src
555
556 dodir /usr/src/linux-${KV}
557 cd ${D}/usr/src
558 #grab includes and documentation only
559 echo ">>> Copying includes and documentation..."
560 find ${S}/include ${S}/Documentation -type f -name "*~" -exec rm -vf {} \;
561 cp -ax ${S}/include ${D}/usr/src/linux-${KV}
562 cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV}
563
564 #grab compiled kernel
565 dodir /boot/boot
566 insinto /boot/boot
567 cd ${S}
568 doins arch/i386/boot/bzImage
569
570 #grab modules
571 # Do we have a bug in modutils ?
572 # Meanwhile we use this quick fix (achim)
573
574 install -d ${D}/lib/modules/`uname -r`
575 try make INSTALL_MOD_PATH=${D} modules_install
576
577 depmod -b ${D} -F ${S}/System.map ${KV}
578 # rm -rf ${D}/lib/modules/`uname -r`
579 #fix symlink
580 cd ${D}/lib/modules/${KV}
581 rm build
582 ln -sf /usr/src/linux-${KV} build
583 fi
584
585 if [ "`use alsa`" ]
586 then
587 cd ${S}/extras/alsa-driver-${AV}
588 docinto alsa-${AV}
589 dodoc COPYING INSTALL FAQ README WARNING
590 docinto alsa-${AV}/doc
591 dodoc doc/README.1st doc/SOUNDCARDS
592 mkdir -p ${D}/lib/modules/${KV}/misc
593 cp modules/*.o ${D}/lib/modules/${KV}/misc
594 fi
595 if [ "`use pcmcia-cs`" ]
596 then
597 #install PCMCIA modules and utilities
598 cd ${S}/extras/pcmcia-cs-${PCV}
599 try make PREFIX=${D} install
600 rm -rf ${D}/etc/rc.d
601 exeinto /etc/rc.d/init.d
602 doexe ${FILESDIR}/${PVR}/pcmcia
603 docinto pcmcia-cs-${PCV}
604 dodoc BUGS CHANGES COPYING LICENSE MAINTAINERS README README-2.4 SUPPORTED.CARDS
605 cd doc ; docinto pcmcia-cs-${PCV}/doc
606 dodoc PCMCIA-HOWTO PCMCIA-HOWTO.ps PCMCIA-PROG PCMCIA-PROG.ps
607 fi
608 else
609 dodir /usr/src
610
611 cd ${S}
612 make mrproper
613
614 if [ "`use lvm`" ]
615 then
616 cd ${S}/extras/LVM/${LVMV}
617 if [ -f Makefile ]
618 then
619 make distclean
620 fi
621 fi
622 if [ "`use lm_sensors`" ]
623 then
624 cd ${S}/extras/lm_sensors-${SENV}
625 make clean
626 fi
627
628 echo ">>> Copying sources..."
629 find ${S} -type f -name "*~" -exec rm -vf {} \;
630 cp -ax ${S} ${D}/usr/src
631
632 #don't overwrite existing .config if present
633 cd ${D}/usr/src/linux-${KV}
634 if [ -e .config ]
635 then
636 cp -a .config .config.eg
637 fi
638 fi
639 }
640
641 pkg_postinst() {
642 if [ "${PN}" != "linux-extras" ]
643 then
644 rm -f ${ROOT}/usr/src/linux
645 ln -sf linux-${KV} ${ROOT}/usr/src/linux
646 fi
647
648 #copy over our .config if one isn't already present
649 cd ${ROOT}/usr/src/linux-${KV}
650 if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ]
651 then
652 cp -a .config.eg .config
653 fi
654 }

  ViewVC Help
Powered by ViewVC 1.1.20