/[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.2 Revision 1.3
7 7
8OKV=2.4.6 8OKV=2.4.6
9KV=2.4.6 9KV=2.4.6
10S=${WORKDIR}/linux-${KV} 10S=${WORKDIR}/linux-${KV}
11S2=${WORKDIR}/linux-${KV}-extras 11S2=${WORKDIR}/linux-${KV}-extras
12if [ $PN = "linux-extras" ] 12if [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ]
13then 13then
14 KS=/usr/src/linux-${KV} 14 KS=/usr/src/linux-${KV}
15 KS2=/usr/src/linux-${KV}-extras 15 KS2=/usr/src/linux-${KV}-extras
16else 16else
17 KS=${S} 17 KS=${S}
20 20
21# Kernel Features Enabled USE Variable Status 21# Kernel Features Enabled USE Variable Status
22# 22#
23# Reiserfs Y - Production-ready 23# Reiserfs Y - Production-ready
24# JFS N jfs Testing-only (commented out for now) 24# JFS N jfs Testing-only (commented out for now)
25# LVM Y lvm Production-ready 25# LVM Y lvm almost production-ready (still has race conditions during pvmove)
26# ext3 Y ext3 Production-ready 26# ext3 Y ext3 Production-ready
27# MOSIX Y mosix Testing only 27# MOSIX Y mosix Testing only
28# XFS N xfs Will add soon 28# XFS N xfs Will add soon
29# PCMCIA-CS Y pcmcia Need to move this to its own ebuild 29# PCMCIA-CS N 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 30# lm-sensors N lm_sensors Need to move this to its own ebuild
32 31
33LVMV=0.9.1_beta7 32LVMV=0.9.1_beta7
34EXT3V=2.4-0.9.1-246 33EXT3V=2.4-0.9.1-246
35MOSV=1.0.5 34MOSV=1.0.5
36# AV=0.5.11 35# AV=0.5.11
37#JFSV=1.0.0 36#JFSV=1.0.0
38#KNV="6.g" 37#KNV="6.g"
39#PIV="1.d" 38#PIV="1.d"
40PCV="3.1.27" 39#PCV="3.1.27"
41 40
42[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" 41[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes"
43[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" 42[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources"
44[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" 43[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries"
45 44
46# We use build in /usr/src/linux in case of linux-extras 45# We use build in /usr/src/linux in case of linux-extras
47# so we need no sources 46# so we need no sources
48if [ ! "${PN}" = "linux-extras" ] ; then 47if [ ! "${PN}" = "linux-extras" ] ; then
49SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 48SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2
50 http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz
51 http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz 49 http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz
52 http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz 50 http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz
53 ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz" 51 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 52 ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMV}.tar.gz"
55fi 53fi
56# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz 54# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz
57# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz 55# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz
58# ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2 56# http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz
59 57
60if [ "$PN" != "linux-extras" ] 58if [ "$PN" != "linux-extras" ]
61then 59then
62 PROVIDE="virtual/kernel" 60 PROVIDE="virtual/kernel"
63fi 61fi
64#if [ "$PN" != "linux-sources" ]
65#then
66# if [ "`use alsa`" ]
67# then
68# PROVIDE="$PROVIDE virtual/alsa"
69# fi
70#fi
71 62
72HOMEPAGE="http://www.kernel.org/ 63HOMEPAGE="http://www.kernel.org/
73 http://www.netroedge.com/~lm78/ 64 http://www.netroedge.com/~lm78/
74 http://www.namesys.com 65 http://www.namesys.com
75 http://www.sistina.com/lvm/ 66 http://www.sistina.com/lvm/"
76 http://pcmcia-cs.sourceforge.net"
77 67
78 68DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl"
79#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig) 69#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig)
80if [ $PN != "linux-extras" ] ; then 70if [ $PN = "linux" ]
71then
81 RDEPEND=">=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" 72 RDEPEND="mosix? ( ~sys-apps/mosix-user-1.0.5 ) >=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1"
82 DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl" 73elif [ $PN = "linux-sources" ]
74then
75 if [ "`use build`" ]
76 then
77 DEPEND=""
78 RDEPEND=""
83else 79 else
84 DEPEND=">=sys-kernel/${PF/extras/sources}" 80 #ncurses is required for "make menuconfig"
81 RDEPEND=">=sys-libs/ncurses-5.2"
85fi 82 fi
86if [ "`use build`" ] && [ $PN = "linux-sources" ] ; then 83elif [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ]
87 DEPEND="" 84then
88 RDEPEND="" 85 #linux-extras/headers requires a rev of the current kernel sources to be installed
86 DEPEND="~sys-kernel/linux-sources-${PV}"
89fi 87fi
90 88
91# this is not pretty... 89# this is not pretty...
92LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" 90LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include"
93 91
94src_unpack() { 92src_unpack() {
95 93 if [ "$PN" = "linux-extras" ] || [ "$PN" = "linux-headers" ]
96 # We only need to unpack for linux and linux-sources
97
98 if [ ! "$PN" = "linux-extras" ]
99 then 94 then
95 return
96 fi
100 97
98 mkdir ${S2}
99
101 #unpack kernel and apply reiserfs-related patches 100 #unpack kernel and apply reiserfs-related patches
102 cd ${WORKDIR} 101 cd ${WORKDIR}
103 unpack linux-${OKV}.tar.bz2 102 unpack linux-${OKV}.tar.bz2
104 try mv linux linux-${KV} 103 try mv linux linux-${KV}
105 cd ${S} 104 cd ${S}
105 if [ "$KV" != "$OKV" ]
106 then
106# echo "Applying ${KV} patch..." 107 echo "Applying ${KV} patch..."
107# try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 108 try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1
108 109 fi
109# This patch is just *too* unweildy and creates tons of rejects all over the place (boo!) 110# This patch is just *too* unweildy and creates tons of rejects all over the place (boo!)
110# echo "Applying XFS patch..." 111# echo "Applying XFS patch..."
111# local x 112# local x
112# for x in easy only tricky acl-extattr misc 113# for x in easy only tricky acl-extattr misc
113# do 114# do
114# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1 115# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1
115# done 116# done
116 117
117 dodir /usr/src/linux-${KV}-extras 118 dodir /usr/src/linux-${KV}-extras
118 119
119 if [ "`use mosix`" ] 120 if [ "`use mosix`" ]
120 then 121 then
121 echo "Applying MOSIX patch..." 122 echo "Applying MOSIX patch..."
122 cd ${S2} 123 cd ${S2}
123 mkdir MOSIX-${MOSV} 124 mkdir MOSIX-${MOSV}
124 cd MOSIX-${MOSV} 125 cd MOSIX-${MOSV}
125 unpack MOSIX-${MOSV}.tar.gz 126 tar xzf MOSIX-${MOSV}.tar.gz patches.${OKV} kernel.new.${OKV}.tar
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
131 tar -x --no-same-owner -vf user.tar -C user
132 rm user.tar
133 fi
134
135 cd ${S} 127 cd ${S}
128 try cat ${S2}/MOSIX-${MOSV}/patches.2.4.6 | patch -p0
129 tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.2.4.6.tar
130 fi
131
132 cd ${S}
136 echo "Applying reiserfs-NFS fix..." 133 echo "Applying reiserfs-NFS fix..."
137 try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1 134 try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1
138 135
139 if [ "`use lvm`" ] 136 if [ "`use lvm`" ]
140 then 137 then
141 #create and apply LVM patch. The tools get built later. 138 #create and apply LVM patch. The tools get built later.
142 cd ${S2} 139 cd ${S2}
143 echo "Unpacking and applying LVM patch..." 140 echo "Unpacking and applying LVM patch..."
144 unpack lvm_${LVMV}.tar.gz 141 unpack lvm_${LVMV}.tar.gz
145 try cd LVM/${LVMV} 142 try cd LVM/${LVMV}
146 143
147 # I had to hack this in so that LVM will look in the current linux 144 # I had to hack this in so that LVM will look in the current linux
148 # source directory instead of /usr/src/linux for stuff - pete 145 # source directory instead of /usr/src/linux for stuff - pete
149 try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" 146 try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
150 cd PATCHES 147 cd PATCHES
151 try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} 148 try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
152 cd ${S} 149 cd ${S}
153 # the -l option allows this patch to apply cleanly (ignore whitespace changes) 150 # the -l option allows this patch to apply cleanly (ignore whitespace changes)
154 try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch 151 try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
155 cd ${S}/drivers/md 152 cd ${S}/drivers/md
156 try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff 153 try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff
157 fi 154 fi
158 155
159# if [ "`use alsa`" ]
160# then
161# #unpack alsa drivers
162# echo "Unpacking ALSA drivers..."
163# cd ${S}/extras
164# unpack alsa-driver-${AV}.tar.bz2
165# fi
166
167# if [ "`use lm_sensors`" ] 156# if [ "`use lm_sensors`" ]
168# then 157# then
169# #unpack and apply the lm_sensors patch 158# #unpack and apply the lm_sensors patch
170# echo "Unpacking and applying lm_sensors patch..." 159# echo "Unpacking and applying lm_sensors patch..."
171# cd ${S}/extras 160# cd ${S}/extras
194# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ 183# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \
195# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ 184# -e \"s#^PREFIX.*#PREFIX := /usr#\" \
196# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ 185# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \
197# Makefile.orig > Makefile 186# Makefile.orig > Makefile
198# fi 187# fi
199 if [ "`use pcmcia-cs`" ] 188# if [ "`use pcmcia-cs`" ]
200 then 189# then
201 echo "Unpacking pcmcia-cs tools..." 190# echo "Unpacking pcmcia-cs tools..."
202 cd ${S2} 191# cd ${S2}
203 unpack pcmcia-cs-${PCV}.tar.gz 192# unpack pcmcia-cs-${PCV}.tar.gz
204 # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff 193 # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff
194# fi
195
196 #JFS patch works; commented out because it's not ready for production use
197 #if [ "`use jfs`" ]
198 #then
199 # echo "Applying JFS patch..."
200 # cd ${WORKDIR}
201 # unpack jfs-${JFSV}-patch.tar.gz
202 # cd ${S}
203 # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch
204 # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch
205 #fi
206
207 if [ "`use ext3`" ]
208 then
209 echo "Applying ext3 patch..."
210 if [ "`use mosix`" ]
211 then
212 echo
213 echo "There will be one reject; we will fix it. (no worries)"
214 echo
215 fi
216 cd ${S}
217 gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1
218 if [ "`use mosix`" ]
219 then
220 echo
221 echo "Fixing reject in include/linux/sched.h..."
222 echo
223 cp ${FILESDIR}/${KV}/sched.h include/linux
224 fi
205 fi 225 fi
206 226
207 #JFS patch works; commented out because it's not ready for production use
208 #if [ "`use jfs`" ]
209 #then
210 # echo "Applying JFS patch..."
211 # cd ${WORKDIR}
212 # unpack jfs-${JFSV}-patch.tar.gz
213 # cd ${S}
214 # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch
215 # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch
216 #fi
217
218 if [ "`use ext3`" ]
219 then
220 echo "Applying ext3 patch..."
221 if [ "`use mosix`" ]
222 then
223 echo
224 echo "There will be one reject; we will fix it. (no worries)"
225 echo
226 fi
227 cd ${S}
228 gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1
229 if [ "`use mosix`" ]
230 then
231 echo
232 echo "Fixing reject in include/linux/sched.h..."
233 echo
234 cp ${FILESDIR}/${KV}/sched.h include/linux
235 fi
236 fi
237
238 #get sources ready for compilation or for sitting at /usr/src/linux 227 #get sources ready for compilation or for sitting at /usr/src/linux
239 echo "Preparing for compilation..." 228 echo "Preparing for compilation..."
240 cd ${S} 229 cd ${S}
241 #sometimes we have icky kernel symbols; this seems to get rid of them 230 #sometimes we have icky kernel symbols; this seems to get rid of them
242 try make mrproper 231 try make mrproper
243 232
244 #linux-sources needs to be fully configured, too. Not just linux 233 #linux-sources needs to be fully configured, too. Not just linux
245 if [ "${PN}" != "linux-extras" ]
246 then
247 #this is the configuration for the default kernel 234 #this is the configuration for the default kernel
248 try cp ${FILESDIR}/${KV}/config.bootcd .config 235 try cp ${FILESDIR}/${KV}/config.bootcd .config
249 try yes \"\" \| make oldconfig 236 try yes \"\" \| make oldconfig
250 echo "Ignore any errors from the yes command above." 237 echo "Ignore any errors from the yes command above."
251 fi
252 238
253 #fix silly permissions in tarball 239 #fix silly permissions in tarball
254 cd ${WORKDIR} 240 cd ${WORKDIR}
255 chown -R 0.0 ${S} 241 chown -R 0.0 *
256 chmod -R a+r-w+X,u+w ${S} 242 chmod -R a+r-w+X,u+w *
257
258 fi
259} 243}
260 244
261src_compile() { 245src_compile() {
262 if [ "${PN}" != "linux-sources" ] 246 if [ "${PN}" = "linux-sources" ] || [ "${PN}" = "linux-headers" ]
263 then 247 then
248 cd ${KS}
249 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
250 else
264 if [ $PN = "linux" ] 251 if [ $PN = "linux" ]
265 then 252 then
253 cd ${KS}
266 try make symlinks 254 try make symlinks
267 fi 255 fi
268 if [ "`use lvm`" ] 256 if [ "`use lvm`" ]
269 then 257 then
270 #LVM tools are included in the linux and linux-extras pakcages 258 #LVM tools are included in the linux and linux-extras pakcages
305 #LEX=\""flex -l"\" bzImage 293 #LEX=\""flex -l"\" bzImage
306 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules 294 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules
307 #LEX=\""flex -l"\" modules 295 #LEX=\""flex -l"\" modules
308 fi 296 fi
309 297
310#This is moving into its own package RSN
311# This must come after the kernel compilation in linux
312# if [ "`use alsa`" ] 298# if [ "`use pcmcia-cs`" ]
313# then 299# then
314# cd ${KS}/extras/alsa-driver-${AV} 300# cd ${KS2}/pcmcia-cs-${PCV}
315# # This is needed for linux-extras 301# # This is needed for linux-extras
316# if [ -f "Makefile.conf" ] 302# if [ -f "Makefile" ]
317# then 303# then
318# try make clean 304# try make clean
319# fi 305# fi
320# try ./configure --with-kernel=\"${KS}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all 306# try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \
307# --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/
321# try make 308# try make all
322# fi 309# fi
323
324 if [ "`use mosix`" ]
325 then
326 cd ${KS2}/MOSIX-${MOSV}
327 local x
328 for x in lib/moslib sbin/setpe sbin/tune bin/mosrun usr.bin/mon usr.bin/migrate usr.bin/mosctl
329 do
330 cd $x
331 make
332 cd ../..
333 done
334 fi
335
336 if [ "`use pcmcia-cs`" ]
337 then
338 cd ${KS2}/pcmcia-cs-${PCV}
339 # This is needed for linux-extras
340 if [ -f "Makefile" ]
341 then
342 try make clean
343 fi
344 try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \
345 --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/
346 try make all
347 fi
348 else
349 #linux-sources
350 try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
351 fi 310 fi
352} 311}
353 312
354src_install() { 313src_install() {
355 # We install the alsa headers in all three packages 314 if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ]
356# if [ "`use alsa`" ]
357# then
358# #i get alsa includes
359# cd ${KS}/extras/alsa-driver-${AV}
360# insinto /usr/src/linux-${KV}/include/linux
361# cd include
362# doins asound.h asoundid.h asequencer.h ainstr_*.h
363# fi
364
365 if [ ! "${PN}" = "linux-sources" ]
366 then 315 then
367 dodir /usr/lib 316 dodir /usr/lib
368 317
369 if [ "`use mosix`" ]
370 then
371 cd ${KS2}/MOSIX-${MOSV}
372 dodir /usr/lib /usr/include
373 dolib.a libmos.a
374 dolib.so libmos.so.0
375 ln -s libmos.so.0 ${D}/usr/lib/libmos.so
376 insinto /usr/include
377 doins *.h
378
379 cd ../../sbin/setpe
380 doman setpe.1
381 into /
382 dosbin setpe
383
384 cd ../tune
385 dosbin tune mtune tunepass tune_kernel prep_tune
386 doman tune.1
387
388 cd ../../bin/mosrun
389 dobin mosrun nomig runhome runon cpujob iojob nodecay slowdecay fastdecay
390 doman mosrun.1
391 local x
392 for x in nomig runhome runon cpujob iojob nodecay slowdecay fastdecay
393 do
394 ln -s mosrun.1.gz ${D}/usr/share/man/man1/${x}.1.gz
395 done
396
397 cd ../../usr.bin/mon
398 into /usr
399 dobin mon
400 doman mon.1
401
402 cd ../migrate
403 dobin migrate
404 doman migrate.1
405
406 cd ../mosctl
407 dobin mosctl
408 doman mosctl.1
409
410 exeinto /etc/rc.d/init.d
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
420 fi
421
422 if [ "`use lvm`" ] 318 if [ "`use lvm`" ]
423 then 319 then
424 cd ${KS2}/LVM/${LVMV}/tools 320 cd ${KS2}/LVM/${LVMV}/tools
425 321
426 try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ 322 try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \
437# make install 333# make install
438# fi 334# fi
439 335
440 if [ "${PN}" = "linux" ] 336 if [ "${PN}" = "linux" ]
441 then 337 then
442 dodir /usr/src
443 dodir /usr/src/linux-${KV} 338 dodir /usr/src/linux-${KV}
444 cd ${D}/usr/src 339 cd ${D}/usr/src
445 #grab includes and documentation only 340 #grab includes and documentation only
446 echo ">>> Copying includes and documentation..." 341 echo ">>> Copying includes and documentation..."
447 cp -ax ${S}/include ${D}/usr/src/linux-${KV} 342 cp -ax ${S}/include ${D}/usr/src/linux-${KV}
466 cd ${D}/lib/modules/${KV} 361 cd ${D}/lib/modules/${KV}
467 rm build 362 rm build
468 ln -sf /usr/src/linux-${KV} build 363 ln -sf /usr/src/linux-${KV} build
469 fi 364 fi
470 365
471# if [ "`use alsa`" ]
472# then
473# #install ALSA modules
474# cd ${KS}/extras/alsa-driver-${AV}
475# dodoc INSTALL FAQ
476# dodir /lib/modules/${KV}/misc
477# cp modules/*.o ${D}/lib/modules/${KV}/misc
478# fi
479 if [ "`use pcmcia-cs`" ] 366# if [ "`use pcmcia-cs`" ]
480 then 367# then
481 #install PCMCIA modules and utilities 368# #install PCMCIA modules and utilities
482 cd ${KS2}/pcmcia-cs-${PCV} 369# cd ${KS2}/pcmcia-cs-${PCV}
483 try make PREFIX=${D} MANDIR=${D}/usr/share/man install 370# try make PREFIX=${D} MANDIR=${D}/usr/share/man install
484 rm -rf ${D}/etc/rc.d 371# rm -rf ${D}/etc/rc.d
485 exeinto /etc/rc.d/init.d 372# exeinto /etc/rc.d/init.d
486 doexe ${FILESDIR}/${KV}/pcmcia 373# doexe ${FILESDIR}/${KV}/pcmcia
487 fi 374# fi
488 else 375 elif [ "$PN" = "linux-sources" ]
376 then
489 dodir /usr/src 377 dodir /usr/src
490 cd ${S} 378 cd ${S}
491 #make mrproper
492 379
493 if [ "`use build`" ] ; then 380 if [ "`use build`" ] ; then
494 dodir /usr/src/linux-${KV} 381 dodir /usr/src/linux-${KV}
495 #grab includes and documentation only 382 #grab includes and documentation only
496 echo ">>> Copying includes..." 383 echo ">>> Copying includes..."
497 cp -ax ${S}/include ${D}/usr/src/linux-${KV} 384 cp -ax ${S}/include ${D}/usr/src/linux-${KV}
498 else 385 else
499 echo ">>> Copying sources..." 386 echo ">>> Copying sources..."
500 cp -ax ${S} ${D}/usr/src 387 cp -ax ${WORKDIR}/* ${D}/usr/src
388 fi
389 elif [ "$PN" = "linux-headers" ]
390 then
391 #the linux-headers package basically takes a "snapshot" of your current linux headers
392 dodir /usr/include/linux
393 cp -ax ${KS}/include/linux/* ${D}/usr/include/linux
394 dodir /usr/include/asm
395 cp -ax ${KS}/include/asm-i386/* ${D}/usr/include/asm
501 fi 396 fi
502 fi 397 if [ -d ${D}/usr/src/linux-${KV} ]
503 if [ "$PN" != "linux-extras" ] 398 then
504 then
505 #don't overwrite existing .config if present 399 #don't overwrite existing .config if present
506 cd ${D}/usr/src/linux-${KV} 400 cd ${D}/usr/src/linux-${KV}
507 if [ -e .config ] 401 if [ -e .config ]
508 then 402 then
509 cp -a .config .config.eg 403 cp -a .config .config.eg
404 fi
405 fi
406}
407
408pkg_preinst() {
409 if [ "$PN" = "linux-headers" ]
410 then
411 if [ -L ${ROOT}usr/include/linux ]
412 then
413 rm ${ROOT}usr/include/linux
414 fi
415 if [ -L ${ROOT}usr/include/asm ]
416 then
417 rm ${ROOT}usr/include/asm
510 fi 418 fi
511 fi 419 fi
512} 420}
513 421
514pkg_postinst() { 422pkg_postinst() {

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

  ViewVC Help
Powered by ViewVC 1.1.20