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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20