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

Diff of /sys-kernel/linux-extras/linux-extras-2.4.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
2# Distributed under the terms of the GNU General Public License, v2 or later 2# Distributed under the terms of the GNU General Public License, v2 or later
3# Author Daniel Robbins <drobbins@gentoo.org> 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 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 5
6#OKV=original kernel version, KV=patched kernel version 6#OKV=original kernel version, KV=patched kernel version
7
7OKV=2.4.6 8OKV=2.4.6
8KV=2.4.6 9KV=2.4.6
9S=${WORKDIR}/linux-${KV} 10S=${WORKDIR}/linux-${KV}
11S2=${WORKDIR}/linux-${KV}-extras
12if [ $PN = "linux-extras" ]
13then
14 KS=/usr/src/linux-${KV}
15 KS2=/usr/src/linux-${KV}-extras
16else
17 KS=${S}
18 KS2=${S2}
19fi
10 20
11# Versions of LVM 21# Kernel Features Enabled USE Variable Status
22#
23# Reiserfs Y - Production-ready
24# JFS N jfs Testing-only (commented out for now)
25# LVM Y lvm Production-ready
26# ext3 Y ext3 Production-ready
27# MOSIX Y mosix Testing only
28# XFS N xfs Will add soon
29# PCMCIA-CS Y pcmcia Need to move this to its own ebuild
30# ALSA N alsa Need to move this to its own ebuild
31# lm-sensors N lm_sensors Need to move this to its own ebuild
32
12LVMV=0.9.1_beta7 33LVMV=0.9.1_beta7
13 34EXT3V=2.4-0.9.1-246
14LVMVARC=0.9.1_beta7 35MOSV=1.0.5
15
16# alsa is coming out of the kernel
17# Versions of alsa
18# AV=0.5.11 36# AV=0.5.11
19
20# Versionos of jfs
21JFSV=1.0.0 37#JFSV=1.0.0
22
23# Versions of lm_sensors
24#SENV=2.6.0
25
26# Versions of reiserfs
27RV=20010327
28KNV="6.g" 38#KNV="6.g"
29PIV="1.d" 39#PIV="1.d"
30
31# Versions of xmlprocfs
32XMLV=0.3
33
34# Versions of pcmcia-cs
35PCV="3.1.27" 40PCV="3.1.27"
36 41
37[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" 42[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes"
38[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" 43[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources"
39[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" 44[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries"
41# We use build in /usr/src/linux in case of linux-extras 46# We use build in /usr/src/linux in case of linux-extras
42# so we need no sources 47# so we need no sources
43if [ ! "${PN}" = "linux-extras" ] ; then 48if [ ! "${PN}" = "linux-extras" ] ; then
44SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 49SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2
45 http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz 50 http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz
46 http://www.zip.com.au/~akpm/ext3-2.4-0.9.1-246.gz 51 http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz
47 http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz 52 http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz
48 ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-1.0.5.tar.gz" 53 ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz"
54 ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMV}.tar.gz
49fi 55fi
50# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz 56# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz
51# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz 57# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz
52# ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz
53# ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2 58# ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2
54 59
55if [ "$PN" != "linux-extras" ] 60if [ "$PN" != "linux-extras" ]
56then 61then
57 PROVIDE="virtual/kernel" 62 PROVIDE="virtual/kernel"
107# for x in easy only tricky acl-extattr misc 112# for x in easy only tricky acl-extattr misc
108# do 113# do
109# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1 114# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1
110# done 115# done
111 116
112 mkdir ${S}/extras 117 dodir /usr/src/linux-${KV}-extras
113 118
114 if [ "`use mosix`" ] 119 if [ "`use mosix`" ]
115 then 120 then
116 echo "Applying MOSIX patch..." 121 echo "Applying MOSIX patch..."
117 cd ${S}/extras 122 cd ${S2}
118 mkdir MOSIX-1.0.5 123 mkdir MOSIX-${MOSV}
119 cd MOSIX-1.0.5 124 cd MOSIX-${MOSV}
120 unpack MOSIX-1.0.5.tar.gz 125 unpack MOSIX-${MOSV}.tar.gz
126 cd ${S}
127 try cat ${S2}/MOSIX-${MOSV}/patches.2.4.6 | patch -p0
128 tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.2.4.6.tar
129 cd ${S2}
130 mkdir user
121 tar -x --no-same-owner -vf user.tar 131 tar -x --no-same-owner -vf user.tar -C user
122 rm user.tar 132 rm user.tar
123 cd ${S}
124 try cat extras/MOSIX-1.0.5/patches.2.4.6 | patch -p0
125 tar -x --no-same-owner -vf extras/MOSIX-1.0.5/kernel.new.2.4.6.tar
126 fi 133 fi
127 134
128 cd ${S} 135 cd ${S}
129 echo "Applying reiserfs-NFS fix..." 136 echo "Applying reiserfs-NFS fix..."
130 try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1 137 try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1
131 138
132 if [ "`use lvm`" ] 139 if [ "`use lvm`" ]
133 then 140 then
134 #create and apply LVM patch. The tools get built later. 141 #create and apply LVM patch. The tools get built later.
135 cd ${S}/extras 142 cd ${S2}
136 echo "Unpacking and applying LVM patch..." 143 echo "Unpacking and applying LVM patch..."
137 unpack lvm_${LVMVARC}.tar.gz 144 unpack lvm_${LVMV}.tar.gz
138 try cd LVM/${LVMV} 145 try cd LVM/${LVMV}
139 146
140 # I had to hack this in so that LVM will look in the current linux 147 # I had to hack this in so that LVM will look in the current linux
141 # source directory instead of /usr/src/linux for stuff - pete 148 # source directory instead of /usr/src/linux for stuff - pete
142 try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" 149 try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
143 cd PATCHES 150 cd PATCHES
144 try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} 151 try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
145 cd ${S} 152 cd ${S}
146 # the -l option allows this patch to apply cleanly (ignore whitespace changes) 153 # the -l option allows this patch to apply cleanly (ignore whitespace changes)
147 try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch 154 try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
148 cd ${S}/drivers/md 155 cd ${S}/drivers/md
149 try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff 156 try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff
150 fi 157 fi
151 158
152# if [ "`use alsa`" ] 159# if [ "`use alsa`" ]
190# Makefile.orig > Makefile 197# Makefile.orig > Makefile
191# fi 198# fi
192 if [ "`use pcmcia-cs`" ] 199 if [ "`use pcmcia-cs`" ]
193 then 200 then
194 echo "Unpacking pcmcia-cs tools..." 201 echo "Unpacking pcmcia-cs tools..."
195 cd ${S}/extras 202 cd ${S2}
196 unpack pcmcia-cs-${PCV}.tar.gz 203 unpack pcmcia-cs-${PCV}.tar.gz
197 # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff 204 # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff
198 fi 205 fi
199 206
200 #JFS patch works; commented out because it's not ready for production use 207 #JFS patch works; commented out because it's not ready for production use
216 echo 223 echo
217 echo "There will be one reject; we will fix it. (no worries)" 224 echo "There will be one reject; we will fix it. (no worries)"
218 echo 225 echo
219 fi 226 fi
220 cd ${S} 227 cd ${S}
221 gzip -dc ${DISTDIR}/ext3-2.4-0.9.1-246.gz | patch -l -p1 228 gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1
222 if [ "`use mosix`" ] 229 if [ "`use mosix`" ]
223 then 230 then
224 echo 231 echo
225 echo "Fixing reject in include/linux/sched.h..." 232 echo "Fixing reject in include/linux/sched.h..."
226 echo 233 echo
248 chown -R 0.0 ${S} 255 chown -R 0.0 ${S}
249 chmod -R a+r-w+X,u+w ${S} 256 chmod -R a+r-w+X,u+w ${S}
250 257
251 fi 258 fi
252} 259}
253 260
254src_compile() { 261src_compile() {
255
256 if [ "${PN}" != "linux-sources" ] 262 if [ "${PN}" != "linux-sources" ]
257 then 263 then
258 if [ $PN = "linux-extras" ]
259 then
260 KS=/usr/src/linux
261 else
262 KS=${S}
263 fi
264 if [ $PN = "linux" ] 264 if [ $PN = "linux" ]
265 then 265 then
266 try make symlinks 266 try make symlinks
267 fi 267 fi
268 if [ "`use lvm`" ] 268 if [ "`use lvm`" ]
269 then 269 then
270 #LVM tools are included in the linux and linux-extras pakcages 270 #LVM tools are included in the linux and linux-extras pakcages
271 cd ${KS}/extras/LVM/${LVMV} 271 cd ${KS2}/LVM/${LVMV}
272 272
273 # This is needed for linux-extras 273 # This is needed for linux-extras
274 if [ -f "Makefile" ] 274 if [ -f "Makefile" ]
275 then 275 then
276 try make clean 276 try make clean
321# try make 321# try make
322# fi 322# fi
323 323
324 if [ "`use mosix`" ] 324 if [ "`use mosix`" ]
325 then 325 then
326 cd ${KS}/extras/MOSIX-1.0.5 326 cd ${KS2}/MOSIX-${MOSV}
327 local x 327 local x
328 for x in lib/moslib sbin/setpe sbin/tune bin/mosrun usr.bin/mon usr.bin/migrate usr.bin/mosctl 328 for x in lib/moslib sbin/setpe sbin/tune bin/mosrun usr.bin/mon usr.bin/migrate usr.bin/mosctl
329 do 329 do
330 cd $x 330 cd $x
331 make 331 make
333 done 333 done
334 fi 334 fi
335 335
336 if [ "`use pcmcia-cs`" ] 336 if [ "`use pcmcia-cs`" ]
337 then 337 then
338 cd ${KS}/extras/pcmcia-cs-${PCV} 338 cd ${KS2}/pcmcia-cs-${PCV}
339 # This is needed for linux-extras 339 # This is needed for linux-extras
340 if [ -f "Makefile" ] 340 if [ -f "Makefile" ]
341 then 341 then
342 try make clean 342 try make clean
343 fi 343 fi
350 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep 350 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
351 fi 351 fi
352} 352}
353 353
354src_install() { 354src_install() {
355
356 if [ $PN = "linux-extras" ] ; then
357 KS=/usr/src/linux
358 else
359 KS=${S}
360 fi
361 # We install the alsa headers in all three packages 355 # We install the alsa headers in all three packages
362# if [ "`use alsa`" ] 356# if [ "`use alsa`" ]
363# then 357# then
364# #i get alsa includes 358# #i get alsa includes
365# cd ${KS}/extras/alsa-driver-${AV} 359# cd ${KS}/extras/alsa-driver-${AV}
368# doins asound.h asoundid.h asequencer.h ainstr_*.h 362# doins asound.h asoundid.h asequencer.h ainstr_*.h
369# fi 363# fi
370 364
371 if [ ! "${PN}" = "linux-sources" ] 365 if [ ! "${PN}" = "linux-sources" ]
372 then 366 then
373 if [ $PN = "linux" ]
374 then
375 KS=${S}
376 else
377 KS=/usr/src/linux
378 fi
379 dodir /usr/lib 367 dodir /usr/lib
380 368
381 if [ "`use mosix`" ] 369 if [ "`use mosix`" ]
382 then 370 then
383 cd ${KS}/extras/MOSIX-1.0.5/lib/moslib 371 cd ${KS2}/MOSIX-${MOSV}
384 dodir /usr/lib /usr/include 372 dodir /usr/lib /usr/include
385 dolib.a libmos.a 373 dolib.a libmos.a
386 dolib.so libmos.so.0 374 dolib.so libmos.so.0
387 ln -s libmos.so.0 ${D}/usr/lib/libmos.so 375 ln -s libmos.so.0 ${D}/usr/lib/libmos.so
388 insinto /usr/include 376 insinto /usr/include
391 cd ../../sbin/setpe 379 cd ../../sbin/setpe
392 doman setpe.1 380 doman setpe.1
393 into / 381 into /
394 dosbin setpe 382 dosbin setpe
395 383
396# Tune is missing a file so compilation aborts
397# cd ../tune 384 cd ../tune
398# dosbin tune mtune tunepass tune_kernel prep_tune 385 dosbin tune mtune tunepass tune_kernel prep_tune
399# doman tune.1 386 doman tune.1
400 387
401 cd ../../bin/mosrun 388 cd ../../bin/mosrun
402 dobin mosrun nomig runhome runon cpujob iojob nodecay slowdecay fastdecay 389 dobin mosrun nomig runhome runon cpujob iojob nodecay slowdecay fastdecay
403 doman mosrun.1 390 doman mosrun.1
404 local x 391 local x
420 dobin mosctl 407 dobin mosctl
421 doman mosctl.1 408 doman mosctl.1
422 409
423 exeinto /etc/rc.d/init.d 410 exeinto /etc/rc.d/init.d
424 newexe ${FILESDIR}/${KV}/mosix.init mosix 411 newexe ${FILESDIR}/${KV}/mosix.init mosix
412
413 cd ${KS2}/MOSIX-${MOSV}
414 for x in lib/moslib sbin/setpe sbin/tune bin/mosrun usr.bin/mon usr.bin/migrate usr.bin/mosctl
415 do
416 cd ${x}
417 make clean
418 cd ../..
419 done
425 fi 420 fi
426 421
427 if [ "`use lvm`" ] 422 if [ "`use lvm`" ]
428 then 423 then
429 cd ${KS}/extras/LVM/${LVMV}/tools 424 cd ${KS2}/LVM/${LVMV}/tools
430 425
431 try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ 426 try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \
432 sbindir=${D}/sbin libdir=${D}/lib 427 sbindir=${D}/sbin libdir=${D}/lib
433 #no need for a static library in /lib 428 #no need for a static library in /lib
434 mv ${D}/lib/*.a ${D}/usr/lib 429 mv ${D}/lib/*.a ${D}/usr/lib
482# cp modules/*.o ${D}/lib/modules/${KV}/misc 477# cp modules/*.o ${D}/lib/modules/${KV}/misc
483# fi 478# fi
484 if [ "`use pcmcia-cs`" ] 479 if [ "`use pcmcia-cs`" ]
485 then 480 then
486 #install PCMCIA modules and utilities 481 #install PCMCIA modules and utilities
487 cd ${KS}/extras/pcmcia-cs-${PCV} 482 cd ${KS2}/pcmcia-cs-${PCV}
488 try make PREFIX=${D} MANDIR=${D}/usr/share/man install 483 try make PREFIX=${D} MANDIR=${D}/usr/share/man install
489 rm -rf ${D}/etc/rc.d 484 rm -rf ${D}/etc/rc.d
490 exeinto /etc/rc.d/init.d 485 exeinto /etc/rc.d/init.d
491 doexe ${FILESDIR}/${KV}/pcmcia 486 doexe ${FILESDIR}/${KV}/pcmcia
492 fi 487 fi

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20