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

Contents of /sys-kernel/linux-extras/linux-extras-2.4.4-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sat May 26 05:01:36 2001 UTC (18 years, 10 months ago) by pete
Branch: MAIN
Changes since 1.1: +60 -26 lines
fixes to linux{,-extras,-sources}-2.4.4-r5

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

  ViewVC Help
Powered by ViewVC 1.1.20