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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20