wok-next view linux-libre/receipt @ rev 20456
Combine receipts
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 02 03:33:54 2018 +0200 (2018-03-02) |
parents | 6e60cb130afd |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="linux-libre"
4 VERSION="2.6.37-gnu"
5 CATEGORY="base-system"
6 SHORT_DESC="The Linux Libre kernel"
7 MAINTAINER="gokhlayeh@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
11 WGET_URL="http://www.fsfla.org/svnwiki/selibre/linux-libre/download/releases/$VERSION/$TARBALL"
13 BUILD_DEPENDS="slitaz-toolchain perl git lzma patch gcc3"
14 SPLIT="linux-libre-acpi linux-libre-agp linux-libre-aoe linux-libre-appletalk \
15 linux-libre-autofs linux-libre-bluetooth linux-libre-bridge linux-libre-btrfs \
16 linux-libre-cifs linux-libre-coda linux-libre-configfs linux-libre-cpufreq \
17 linux-libre-cramfs linux-libre-crypto linux-libre-cryptoloop \
18 linux-libre-dialup linux-libre-dlm linux-libre-drm linux-libre-firewire \
19 linux-libre-gfs2 linux-libre-hfs linux-libre-hfsplus linux-libre-hwmon \
20 linux-libre-input-misc linux-libre-input-tablet linux-libre-input-touchscreen \
21 linux-libre-ipv6 linux-libre-irda linux-libre-isdn linux-libre-jfs \
22 linux-libre-joystick linux-libre-kvm linux-libre-logfs linux-libre-md \
23 linux-libre-memstick linux-libre-minix linux-libre-mmc \
24 linux-libre-module-headers linux-libre-mwave linux-libre-nbd linux-libre-ncpfs \
25 linux-libre-netfilter linux-libre-nfsd linux-libre-reiserfs linux-libre-sched \
26 linux-libre-scsi linux-libre-sound linux-libre-source linux-libre-speakup \
27 linux-libre-squashfs linux-libre-toshiba linux-libre-udf linux-libre-usbdsl \
28 linux-libre-usbip linux-libre-usb-misc linux-libre-uwb linux-libre-video \
29 linux-libre-wimax linux-libre-wireless linux-libre-without-modules lguest-libre"
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 # this is code to help update the kernel version faster
35 #for i in $(grep -l 'WANTED="linux-libre"' $WOK/*/receipt)
36 #do
37 # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i
38 #done
40 # Check for Aufs and cook it if unbuilt.
41 echo "Checking for Aufs packages..."
42 _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
43 if [ ! -d "$AUFSDIR" ] && [ -x /usr/bin/cook ]; then
44 # Give info an redirect to /dev/null since aufs got it own log.
45 AUFSDIR=$WOK/aufs/source/aufs-${_AUFSVER}
46 echo "Cook: aufs $_AUFSVER"
47 cook aufs > /dev/null
48 elif [ ! -x /usr/bin/cook ]; then
49 # We only need aufs source. Also cooking now is a bad idea since it
50 # needs linux-module-headers.
51 AUFSDIR=$WOK/aufs/aufs-${_AUFSVER}
52 [ -d "$AUFSDIR" ] && rm -rf $AUFSDIR
53 tazwok get-src aufs --target=$AUFSDIR || return 1
54 fi
56 echo "Copying Aufs files and patches..."
57 cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src
58 cp -a $AUFSDIR/*.patch $stuff
60 # SliTaz db
61 rm -rf $WOK/$PACKAGE/slitaz && mkdir $WOK/$PACKAGE/slitaz
62 echo "$WGET_URL" > $WOK/$PACKAGE/slitaz/url
63 cp $stuff/gztazmod.sh $stuff/list_modules.sh $WOK/$PACKAGE/slitaz
64 cp $stuff/bootloader.sh $WOK/$PACKAGE/slitaz
66 # Apply patches
67 echo "Applying patches..."
68 while read patch_file; do
69 echo "$patch_file" >> $WOK/$PACKAGE/slitaz/patches
70 cp $stuff/$patch_file $WOK/$PACKAGE/slitaz
71 if [ -f done.$patch_file ]; then
72 echo "Skipping $patch_file"
73 continue
74 fi
75 echo "Apply $patch_file"
76 patch -p1 < $WOK/$PACKAGE/slitaz/$patch_file || return 1
77 touch done.$patch_file
78 done <<EOT
79 $PACKAGE-diff-$VERSION.u
80 $PACKAGE-header-$VERSION.u
81 $PACKAGE-freeinitrd-$VERSION.u
82 linux-timeconst.pl.u
83 aufs2-base.patch
84 aufs2-standalone.patch
85 001-squashfs-decompressors-add-xz-decompressor-module.patch
86 002-squashfs-decompressors-add-boot-time-xz-support.patch
87 003-squashfs-x86-support-xz-compressed-kernel.patch
88 004-squashfs-add-xz-compression-support.patch
89 005-squashfs-add-xz-compression-configuration-option.patch
90 EOT
92 export LD_LIBRARY_PATH="/usr/libgcc3:$LD_LIBRARY_PATH"
93 export MAKEFLAGS="$MAKEFLAGS CC=gcc-3 CXX=g++-3"
95 make mrproper
96 cd Documentation/lguest
97 make $MAKEFLAGS lguest || return 1
98 cd $src
100 # Build bzImage without modules first
101 cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config
102 sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config
104 # We can't keep every driver in staging
105 sed -i -e 's/^CONFIG_RTL8192/#&/' \
106 -e 's/^CONFIG_R8187SE/#&/' \
107 -e 's/^CONFIG_RT2870/#&/' .config
108 yes '' | make oldconfig
109 make $MAKEFLAGS bzImage || return 1
110 [ -d $DESTDIR ] || mkdir -p $DESTDIR
111 mv arch/x86/boot/bzImage $DESTDIR
112 mv System.map System.map-without-modules
114 # Build bzImage with modules
115 cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config
116 make oldconfig
117 ln .config $WOK/$PACKAGE/slitaz/config
118 make $MAKEFLAGS bzImage &&
119 make $MAKEFLAGS modules &&
120 make INSTALL_MOD_PATH=$DESTDIR modules_install &&
121 make INSTALL_HDR_PATH=$DESTDIR/usr headers_install &&
122 [ -s arch/x86/boot/bzImage ] return 1
123 mkdir -p $DESTDIR/boot 2> /dev/null
124 mv arch/x86/boot/bzImage $DESTDIR/boot/vmlinuz-$VERSION-slitaz
126 # Compress all modules.
127 $stuff/gztazmod.sh $DESTDIR/lib/modules/$VERSION-slitaz
128 ln System.map System.map-modules
129 ln Module.symvers Module.symvers-modules
130 }
132 # Rules to gen a SliTaz package suitable for Tazpkg.
133 genpkg_rules()
134 {
135 case $PACKAGE in
136 linux-libre)
137 local path
138 cp -a $install/boot $fs
139 # Compress all modules.
140 #$stuff/gztazmod.sh $install/lib/modules/$VERSION-slitaz
141 path=$fs/lib/modules/$VERSION-slitaz/kernel
142 mkdir -p $path
143 cp -a $install/lib/modules/$VERSION-slitaz/mo* \
144 $fs/lib/modules/$VERSION-slitaz
145 # Get the base modules
146 export src
147 export _pkg
148 mkdir $WOK/$PACKAGE/tmp
149 $stuff/list_modules.sh \
150 $(cat stuff/modules-$VERSION.list) > $WOK/$PACKAGE/tmp/modules.list
151 while read module; do
152 dir=$(dirname $module)
153 [ -d $path/$dir ] || mkdir -p $path/$dir
154 cp -a $install/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
155 done < $WOK/$PACKAGE/tmp/modules.list
156 # Remove unresolved links
157 rm -f $fs/lib/modules/$VERSION-slitaz/build
158 rm -f $fs/lib/modules/$VERSION-slitaz/source
160 # Pack all packages with a kernel module
161 for i in $(cd $WOK; grep -l '^WANTED="linux-libre"' */receipt); do
162 [ ! -d "$install/lib/modules/$VERSION-slitaz" ] && return 1
163 cook ${i%/receipt}
164 done
166 # Check and echo any module in kernel .config that's not added to
167 # one of linux-* pkgs
168 export PACKAGE
169 $stuff/check_modules.sh
170 PROVIDE="linux"
171 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
172 DEPENDS="depmod"
173 ;;
174 linux-libre-acpi)
175 local path
176 path=lib/modules/$VERSION-slitaz/kernel
177 mkdir -p $fs/$path
178 export src
179 export _pkg
180 $stuff/list_modules.sh drivers/acpi drivers/platform/x86/thinkpad_acpi.ko.gz \
181 drivers/platform/x86/asus-laptop.ko.gz drivers/platform/x86/eeepc-wmi.ko.gz \
182 drivers/platform/x86/msi-laptop.ko.gz drivers/platform/x86/panasonic-laptop.ko.gz \
183 drivers/platform/x86/sony-laptop.ko.gz drivers/platform/x86/acer-wmi.ko.gz \
184 drivers/platform/x86/hp-wmi.ko.gz drivers/platform/x86/wmi.ko.gz \
185 drivers/platform/x86/classmate-laptop.ko.gz drivers/platform/x86/topstar-laptop.ko.gz | \
186 while read module; do
187 dir=$path/$(dirname $module)
188 [ -d $fs/$dir ] || mkdir -p $fs/$dir
189 cp -a $install/$path/$module $fs/$dir
190 done
191 for i in $(cat $stuff/modules-$VERSION.list); do
192 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
193 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
194 fi
195 done
196 CAT="base-system|acpi modules"
197 PROVIDE="linux-acpi"
198 ;;
199 linux-libre-agp)
200 local path
201 path=lib/modules/$VERSION-slitaz/kernel
202 mkdir -p $fs/$path
203 export src
204 export _pkg
205 $stuff/list_modules.sh drivers/char/agp | while read module; do
206 dir=$path/$(dirname $module)
207 [ -d $fs/$dir ] || mkdir -p $fs/$dir
208 cp -a $install/$path/$module $fs/$dir
209 done
210 for i in $(cat $stuff/modules-$VERSION.list); do
211 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
212 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
213 fi
214 done
215 CAT="base-system|AGP modules"
216 PROVIDE="linux-agp"
217 ;;
218 linux-libre-aoe)
219 local path
220 path=lib/modules/$VERSION-slitaz/kernel
221 mkdir -p $fs/$path
222 export src
223 export _pkg
224 $stuff/list_modules.sh drivers/block/aoe/aoe.ko.gz | \
225 while read module; do
226 dir=$path/$(dirname $module)
227 [ -d $fs/$dir ] || mkdir -p $fs/$dir
228 cp -a $install/$path/$module $fs/$dir
229 done
230 CAT="base-system|ATA over Ethernet modules"
231 PROVIDE="linux-aoe"
232 ;;
233 linux-libre-appletalk)
234 local path
235 path=lib/modules/$VERSION-slitaz/kernel
236 mkdir -p $fs/$path
237 export src
238 export _pkg
239 $stuff/list_modules.sh drivers/net/appletalk net/appletalk \
240 net/802/p8022.ko.gz | while read module; do
241 dir=$path/$(dirname $module)
242 [ -d $fs/$dir ] || mkdir -p $fs/$dir
243 cp -a $install/$path/$module $fs/$dir
244 done
245 for i in $(cat $stuff/modules-$VERSION.list); do
246 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
247 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
248 fi
249 done
250 CAT="base-system|appletalk modules"
251 PROVIDE="linux-appletalk"
252 ;;
253 linux-libre-autofs)
254 local path
255 path=lib/modules/$VERSION-slitaz/kernel
256 mkdir -p $fs/$path $fs/etc
257 export src
258 export _pkg
259 $stuff/list_modules.sh fs/autofs4 | while read module; do
260 dir=$path/$(dirname $module)
261 [ -d $fs/$dir ] || mkdir -p $fs/$dir
262 cp -a $install/$path/$module $fs/$dir
263 done
264 touch $fs/etc/filesystems
265 CAT="base-system|automounter module"
266 PROVIDE="linux-autofs"
267 CONFIG_FILES="/etc/filesystems"
268 ;;
269 linux-libre-bluetooth)
270 local path
271 path=lib/modules/$VERSION-slitaz/kernel
272 mkdir -p $fs/$path
273 export src
274 export _pkg
275 $stuff/list_modules.sh drivers/bluetooth net/bluetooth | while read module; do
276 dir=$path/$(dirname $module)
277 [ -d $fs/$dir ] || mkdir -p $fs/$dir
278 cp -a $install/$path/$module $fs/$dir
279 done
280 for i in $(cat $stuff/modules-$VERSION.list); do
281 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
282 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
283 fi
284 done
285 CAT="base-system|bluetooth modules"
286 PROVIDE="linux-bluetooth"
287 ;;
288 linux-libre-bridge)
289 local path
290 path=lib/modules/$VERSION-slitaz/kernel
291 mkdir -p $fs/$path
292 export src
293 export _pkg
294 $stuff/list_modules.sh net/bridge | while read module; do
295 dir=$path/$(dirname $module)
296 [ -d $fs/$dir ] || mkdir -p $fs/$dir
297 cp -a $install/$path/$module $fs/$dir
298 done
299 for i in $(cat $stuff/modules-$VERSION.list); do
300 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
301 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
302 fi
303 done
304 CAT="base-system|bridge modules"
305 PROVIDE="linux-bridge"
306 ;;
307 linux-libre-btrfs)
308 local path
309 path=lib/modules/$VERSION-slitaz/kernel
310 mkdir -p $fs/$path $fs/etc
311 export src
312 export _pkg
313 $stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do
314 dir=$path/$(dirname $module)
315 [ -d $fs/$dir ] || mkdir -p $fs/$dir
316 cp -a $install/$path/$module $fs/$dir
317 done
318 touch $fs/etc/filesystems
319 for i in $(cat $stuff/modules-$VERSION.list); do
320 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
321 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
322 fi
323 done
324 CAT="base-system|btrfs module"
325 PROVIDE="linux-btrfs"
326 CONFIG_FILES="/etc/filesystems"
327 ;;
328 linux-libre-cifs)
329 local path
330 path=lib/modules/$VERSION-slitaz/kernel
331 mkdir -p $fs/$path $fs/etc
332 export src
333 export _pkg
334 $stuff/list_modules.sh fs/cifs | while read module; do
335 dir=$path/$(dirname $module)
336 [ -d $fs/$dir ] || mkdir -p $fs/$dir
337 cp -a $install/$path/$module $fs/$dir
338 done
339 touch $fs/etc/filesystems
340 CAT="base-system|cifs module"
341 PROVIDE="linux-cifs"
342 CONFIG_FILES="/etc/filesystems"
343 ;;
344 linux-libre-coda)
345 local path
346 path=lib/modules/$VERSION-slitaz/kernel
347 mkdir -p $fs/$path $fs/etc
348 export src
349 export _pkg
350 $stuff/list_modules.sh fs/coda | while read module; do
351 dir=$path/$(dirname $module)
352 [ -d $fs/$dir ] || mkdir -p $fs/$dir
353 cp -a $install/$path/$module $fs/$dir
354 done
355 touch $fs/etc/filesystems
356 CAT="base-system|coda module"
357 PROVIDE="linux-coda"
358 CONFIG_FILES="/etc/filesystems"
359 ;;
360 linux-libre-configfs)
361 local path
362 path=lib/modules/$VERSION-slitaz/kernel
363 mkdir -p $fs/$path $fs/etc
364 export src
365 export _pkg
366 $stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do
367 dir=$path/$(dirname $module)
368 [ -d $fs/$dir ] || mkdir -p $fs/$dir
369 cp -a $install/$path/$module $fs/$dir
370 done
371 touch $fs/etc/filesystems
372 CAT="base-system|configfs module"
373 PROVIDE="linux-configfs"
374 CONFIG_FILES="/etc/filesystems"
375 ;;
376 linux-libre-cpufreq)
377 local path
378 path=lib/modules/$VERSION-slitaz/kernel
379 mkdir -p $fs/$path
380 export src
381 export _pkg
382 $stuff/list_modules.sh arch/x86/kernel/cpu/cpufreq drivers/cpufreq | \
383 while read module; do
384 dir=$path/$(dirname $module)
385 [ -d $fs/$dir ] || mkdir -p $fs/$dir
386 cp -a $install/$path/$module $fs/$dir
387 done
388 CAT="base-system|cpufreq modules"
389 PROVIDE="linux-cpufreq"
390 ;;
391 linux-libre-cramfs)
392 local path
393 path=lib/modules/$VERSION-slitaz/kernel
394 mkdir -p $fs/$path $fs/etc
395 export src
396 export _pkg
397 $stuff/list_modules.sh fs/cramfs | while read module; do
398 dir=$path/$(dirname $module)
399 [ -d $fs/$dir ] || mkdir -p $fs/$dir
400 cp -a $install/$path/$module $fs/$dir
401 done
402 touch $fs/etc/filesystems
403 CAT="base-system|cramfs module"
404 PROVIDE="linux-cramfs"
405 CONFIG_FILES="/etc/filesystems"
406 ;;
407 linux-libre-crypto)
408 local path
409 path=lib/modules/$VERSION-slitaz/kernel
410 mkdir -p $fs/$path
411 export src
412 export _pkg
413 $stuff/list_modules.sh arch/x86/crypto crypto drivers/crypto | \
414 while read module; do
415 dir=$path/$(dirname $module)
416 [ -d $fs/$dir ] || mkdir -p $fs/$dir
417 cp -a $install/$path/$module $fs/$dir
418 done
419 for i in $(cat $stuff/modules-$VERSION.list); do
420 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
421 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
422 fi
423 done
424 CAT="base-system|crypto modules"
425 PROVIDE="linux-crypto"
426 ;;
427 linux-libre-cryptoloop)
428 local path
429 path=lib/modules/$VERSION-slitaz/kernel
430 mkdir -p $fs/$path
431 export src
432 export _pkg
433 $stuff/list_modules.sh drivers/block/cryptoloop.ko.gz | \
434 while read module; do
435 dir=$path/$(dirname $module)
436 [ -d $fs/$dir ] || mkdir -p $fs/$dir
437 cp -a $install/$path/$module $fs/$dir
438 done
439 CAT="base-system|cryptoloop modules"
440 PROVIDE="linux-cryptoloop"
441 DEPENDS="linux-libre-crypto"
442 ;;
443 linux-libre-dialup)
444 local path
445 path=lib/modules/$VERSION-slitaz/kernel
446 mkdir -p $fs/$path
447 export src
448 export _pkg
449 $stuff/list_modules.sh drivers/serial/serial_cs.ko.gz drivers/char/nozomi.ko.gz \
450 drivers/usb/serial/option.ko.gz drivers/net/usb/hso.ko.gz | \
451 while read module; do
452 dir=$path/$(dirname $module)
453 [ -d $fs/$dir ] || mkdir -p $fs/$dir
454 cp -a $install/$path/$module $fs/$dir
455 done
456 for i in $(cat $stuff/modules-$VERSION.list); do
457 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
458 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
459 fi
460 done
461 CAT="base-system|dial-up modules"
462 PROVIDE="linux-dialup"
463 ;;
464 linux-libre-dlm)
465 # Modules paths and list
466 MOD_PATH="lib/modules/$VERSION-slitaz/kernel"
467 MODULES="fs/dlm/dlm.ko.gz"
468 mkdir -p ${fs}${MOD_PATH} $fs/etc
469 for module in $MODULES; do
470 dir=$MOD_PATH/$(dirname $module)
471 [ -d $fs/$dir ] || mkdir -p $fs/$dir
472 cp -a $install/$MOD_PATH/$module $fs/$dir
473 done
474 touch $fs/etc/filesystems
475 CAT="base-system|dlmfs module"
476 PROVIDE="linux-dlm"
477 CONFIG_FILES="/etc/filesystems"
478 ;;
479 linux-libre-drm)
480 local path
481 path=lib/modules/$VERSION-slitaz/kernel
482 mkdir -p $fs/$path
483 export src
484 export _pkg
485 $stuff/list_modules.sh drivers/gpu/drm | while read module; do
486 dir=$path/$(dirname $module)
487 [ -d $fs/$dir ] || mkdir -p $fs/$dir
488 cp -a $install/$path/$module $fs/$dir
489 done
490 for i in $(cat $stuff/modules-$VERSION.list); do
491 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
492 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
493 fi
494 done
495 # remove drivers/char/agp kernel modules cause there in linux-agp package
496 if [ -d $fs/lib/modules/$VERSION-slitaz/kernel/drivers/char/agp ]; then
497 rm -rf $fs/lib/modules/$VERSION-slitaz/kernel/drivers/char/agp
498 fi
499 CAT="base-system|drm module"
500 PROVIDE="linux-drm"
501 DEPENDS="linux-libre-agp"
502 ;;
503 linux-libre-firewire)
504 local path
505 path=lib/modules/$VERSION-slitaz/kernel
506 mkdir -p $fs/$path
507 export src
508 export _pkg
509 $stuff/list_modules.sh drivers/firewire | while read module; do
510 dir=$path/$(dirname $module)
511 [ -d $fs/$dir ] || mkdir -p $fs/$dir
512 cp -a $install/$path/$module $fs/$dir
513 done
514 CAT="base-system|firewire modules"
515 PROVIDE="linux-firewire"
516 ;;
517 linux-libre-gfs2)
518 local path
519 path=lib/modules/$VERSION-slitaz/kernel
520 mkdir -p $fs/$path $fs/etc
521 export src
522 export _pkg
523 $stuff/list_modules.sh fs/gfs2 | while read module; do
524 dir=$path/$(dirname $module)
525 [ -d $fs/$dir ] || mkdir -p $fs/$dir
526 cp -a $install/$path/$module $fs/$dir
527 done
528 touch $fs/etc/filesystems
529 CAT="base-system|gfs2 module"
530 PROVIDE="linux-gfs2"
531 CONFIG_FILES="/etc/filesystems"
532 ;;
533 linux-libre-hfs)
534 local path
535 path=lib/modules/$VERSION-slitaz/kernel
536 mkdir -p $fs/$path $fs/etc
537 export src
538 export _pkg
539 $stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do
540 dir=$path/$(dirname $module)
541 [ -d $fs/$dir ] || mkdir -p $fs/$dir
542 cp -a $install/$path/$module $fs/$dir
543 done
544 touch $fs/etc/filesystems
545 CAT="base-system|hfs module"
546 PROVIDE="linux-hfs"
547 CONFIG_FILES="/etc/filesystems"
548 ;;
549 linux-libre-hfsplus)
550 local path
551 path=lib/modules/$VERSION-slitaz/kernel
552 mkdir -p $fs/$path $fs/etc
553 export src
554 export _pkg
555 $stuff/list_modules.sh fs/hfsplus | while read module; do
556 dir=$path/$(dirname $module)
557 [ -d $fs/$dir ] || mkdir -p $fs/$dir
558 cp -a $install/$path/$module $fs/$dir
559 done
560 touch $fs/etc/filesystems
561 CAT="base-system|hfsplus module"
562 PROVIDE="linux-hfsplus"
563 CONFIG_FILES="/etc/filesystems"
564 ;;
565 linux-libre-hwmon)
566 local path
567 path=lib/modules/$VERSION-slitaz/kernel
568 mkdir -p $fs/$path
569 export src
570 export _pkg
571 $stuff/list_modules.sh drivers/hwmon | while read module; do
572 dir=$path/$(dirname $module)
573 [ -d $fs/$dir ] || mkdir -p $fs/$dir
574 cp -a $install/$path/$module $fs/$dir
575 done
576 for i in $(cat $stuff/modules-$VERSION.list); do
577 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
578 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
579 fi
580 done
581 CAT="base-system|hwmon modules"
582 PROVIDE="linux-hwmon"
583 ;;
584 linux-libre-input-misc)
585 local path
586 path=lib/modules/$VERSION-slitaz/kernel
587 mkdir -p $fs/$path
588 export src
589 export _pkg
590 $stuff/list_modules.sh drivers/input/misc | while read module; do
591 dir=$path/$(dirname $module)
592 [ -d $fs/$dir ] || mkdir -p $fs/$dir
593 cp -a $install/$path/$module $fs/$dir
594 done
595 for i in $(cat $stuff/modules-$VERSION.list); do
596 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
597 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
598 fi
599 done
600 CAT="base-system|misc. input drivers, including the ATI RemoteWonders"
601 PROVIDE="linux-input-misc"
602 ;;
603 linux-libre-input-tablet)
604 local path
605 path=lib/modules/$VERSION-slitaz/kernel
606 mkdir -p $fs/$path
607 export src
608 export _pkg
609 $stuff/list_modules.sh drivers/input/tablet | while read module; do
610 dir=$path/$(dirname $module)
611 [ -d $fs/$dir ] || mkdir -p $fs/$dir
612 cp -a $install/$path/$module $fs/$dir
613 done
614 CAT="base-system|tablet input drivers"
615 PROVIDE="linux-input-tablet"
616 ;;
617 linux-libre-input-touchscreen)
618 local path
619 path=lib/modules/$VERSION-slitaz/kernel
620 mkdir -p $fs/$path
621 export src
622 export _pkg
623 $stuff/list_modules.sh drivers/input/touchscreen | \
624 while read module; do
625 dir=$path/$(dirname $module)
626 [ -d $fs/$dir ] || mkdir -p $fs/$dir
627 cp -a $install/$path/$module $fs/$dir
628 done
629 for i in $(cat $stuff/modules-$VERSION.list); do
630 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
631 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
632 fi
633 done
634 CAT="base-system|touchscreen input drivers"
635 PROVIDE="linux-input-touchscreen"
636 ;;
637 linux-libre-ipv6)
638 local path
639 path=lib/modules/$VERSION-slitaz/kernel
640 mkdir -p $fs/$path
641 export src
642 export _pkg
643 $stuff/list_modules.sh net/ipv6 | while read module; do
644 dir=$path/$(dirname $module)
645 [ -d $fs/$dir ] || mkdir -p $fs/$dir
646 cp -a $install/$path/$module $fs/$dir
647 done
648 for i in $(cat $stuff/modules-$VERSION.list); do
649 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
650 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
651 fi
652 done
653 CAT="base-system|ipv6 modules"
654 PROVIDE="linux-ipv6"
655 ;;
656 linux-libre-irda)
657 local path
658 path=lib/modules/$VERSION-slitaz/kernel
659 mkdir -p $fs/$path
660 export src
661 export _pkg
662 $stuff/list_modules.sh drivers/net/irda net/irda | while read module; do
663 dir=$path/$(dirname $module)
664 [ -d $fs/$dir ] || mkdir -p $fs/$dir
665 cp -a $install/$path/$module $fs/$dir
666 done
667 CAT="base-system|irda modules"
668 PROVIDE="linux-irda"
669 ;;
670 linux-libre-isdn)
671 local path
672 path=lib/modules/$VERSION-slitaz/kernel
673 mkdir -p $fs/$path
674 export src
675 export _pkg
676 $stuff/list_modules.sh drivers/isdn | while read module; do
677 dir=$path/$(dirname $module)
678 [ -d $fs/$dir ] || mkdir -p $fs/$dir
679 cp -a $install/$path/$module $fs/$dir
680 done
681 for i in $(cat $stuff/modules-$VERSION.list); do
682 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
683 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
684 fi
685 done
686 CAT="base-system|isdn modules"
687 PROVIDE="linux-isdn"
688 ;;
689 linux-libre-jfs)
690 local path
691 path=lib/modules/$VERSION-slitaz/kernel
692 mkdir -p $fs/$path $fs/etc
693 export src
694 export _pkg
695 $stuff/list_modules.sh fs/jfs | while read module; do
696 dir=$path/$(dirname $module)
697 [ -d $fs/$dir ] || mkdir -p $fs/$dir
698 cp -a $install/$path/$module $fs/$dir
699 done
700 touch $fs/etc/filesystems
701 CAT="base-system|jfs module"
702 PROVIDE="linux-jfs"
703 CONFIG_FILES="/etc/filesystems"
704 ;;
705 linux-libre-joystick)
706 local path
707 path=lib/modules/$VERSION-slitaz/kernel
708 mkdir -p $fs/$path
709 export src
710 export _pkg
711 $stuff/list_modules.sh drivers/input/joystick drivers/input/gameport \
712 drivers/input/input-polldev.ko.gz | \
713 while read module; do
714 dir=$path/$(dirname $module)
715 [ -d $fs/$dir ] || mkdir -p $fs/$dir
716 cp -a $install/$path/$module $fs/$dir
717 done
718 for i in $(cat $stuff/modules-$VERSION.list); do
719 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
720 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
721 fi
722 done
723 CAT="base-system|joystick modules"
724 PROVIDE="linux-joystick"
725 ;;
726 linux-libre-kvm)
727 local path
728 path=lib/modules/$VERSION-slitaz/kernel
729 mkdir -p $fs/$path
730 export src
731 export _pkg
732 $stuff/list_modules.sh arch/x86/kvm drivers/virtio drivers/lguest \
733 drivers/char/hw_random/virtio-rng.ko.gz \
734 drivers/net/virtio_net.ko.gz drivers/block/virtio_blk.ko.gz | \
735 while read module; do
736 dir=$path/$(dirname $module)
737 [ -d $fs/$dir ] || mkdir -p $fs/$dir
738 cp -a $install/$path/$module $fs/$dir
739 done
740 CAT="base-system|kvm and virtio modules"
741 PROVIDE="linux-kvm"
742 ;;
743 linux-libre-logfs)
744 local path
745 path=lib/modules/$VERSION-slitaz/kernel
746 mkdir -p $fs/$path $fs/etc
747 export src
748 export _pkg
749 $stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do
750 dir=$path/$(dirname $module)
751 [ -d $fs/$dir ] || mkdir -p $fs/$dir
752 cp -a $install/$path/$module $fs/$dir
753 done
754 touch $fs/etc/filesystems
755 CAT="base-system|logfs module"
756 PROVIDE="linux-logfs"
757 CONFIG_FILES="/etc/filesystems"
758 ;;
759 linux-libre-md)
760 local path
761 path=lib/modules/$VERSION-slitaz/kernel
762 mkdir -p $fs/$path
763 export src
764 export _pkg
765 $stuff/list_modules.sh drivers/md | while read module; do
766 case "$module" in
767 crypto/*) continue;;
768 esac
769 dir=$path/$(dirname $module)
770 [ -d $fs/$dir ] || mkdir -p $fs/$dir
771 cp -a $install/$path/$module $fs/$dir
772 done
773 for i in $(cat $stuff/modules-$VERSION.list); do
774 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
775 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
776 fi
777 done
778 CAT="base-system|md modules"
779 PROVIDE="linux-md"
780 DEPENDS="linux-libre-crypto"
781 ;;
782 linux-libre-memstick)
783 local path
784 path=lib/modules/$VERSION-slitaz/kernel
785 mkdir -p $fs/$path
786 export src
787 export _pkg
788 $stuff/list_modules.sh drivers/memstick | while read module; do
789 dir=$path/$(dirname $module)
790 [ -d $fs/$dir ] || mkdir -p $fs/$dir
791 cp -a $install/$path/$module $fs/$dir
792 done
793 for i in $(cat $stuff/modules-$VERSION.list); do
794 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
795 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
796 fi
797 done
798 CAT="base-system|sony memory stick modules"
799 PROVIDE="linux-memstick"
800 ;;
801 linux-libre-minix)
802 local path
803 path=lib/modules/$VERSION-slitaz/kernel
804 mkdir -p $fs/$path $fs/etc
805 export src
806 export _pkg
807 $stuff/list_modules.sh fs/${PACKAGE##*-} | while read module; do
808 dir=$path/$(dirname $module)
809 [ -d $fs/$dir ] || mkdir -p $fs/$dir
810 cp -a $install/$path/$module $fs/$dir
811 done
812 touch $fs/etc/filesystems
813 CAT="base-system|minix module"
814 PROVIDE="linux-minix"
815 CONFIG_FILES="/etc/filesystems"
816 ;;
817 linux-libre-mmc)
818 local path
819 path=lib/modules/$VERSION-slitaz/kernel
820 mkdir -p $fs/$path
821 export src
822 export _pkg
823 $stuff/list_modules.sh drivers/mmc drivers/misc/tifm_7xx1.ko.gz drivers/misc/iwmc3200top/iwmc3200top.ko.gz| \
824 while read module; do
825 dir=$path/$(dirname $module)
826 [ -d $fs/$dir ] || mkdir -p $fs/$dir
827 cp -a $install/$path/$module $fs/$dir
828 done
829 for i in $(cat $stuff/modules-$VERSION.list); do
830 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
831 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
832 fi
833 done
834 CAT="base-system|mmc modules - card reader"
835 PROVIDE="linux-mmc"
836 ;;
837 linux-libre-module-headers)
838 CAT="development|header files and scripts for building modules for Linux Libre kernel"
839 PROVIDE="linux-module-headers"
840 DEPENDS="slitaz-toolchain"
841 KVERSION=$VERSION-slitaz
843 local path
844 _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
845 AUFSDIR="$WOK/$WANTED/aufs-${_AUFSVER}"
846 path=usr/src/linux-$KVERSION
847 mkdir -p $fs/lib/modules/$KVERSION
848 ln -sf /$path $fs/lib/modules/$KVERSION/build
849 install -D -m644 $src/Makefile \
850 $fs/$path/Makefile
851 install -D -m644 $src/kernel/Makefile \
852 $fs/$path/kernel/Makefile
853 install -D -m644 $src/.config \
854 $fs/$path/.config
855 mkdir -p $fs/$path/include
857 for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
858 cp -a $src/include/$i $fs/$path/include/
859 done
861 # copy arch includes for external modules
862 mkdir -p $fs/$path/arch/x86
863 cp -a $src/arch/x86/include $fs/$path/arch/x86/
865 # copy files necessary for later builds, like nvidia and vmware
866 cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
867 cp -a $src/scripts $fs/$path
868 # fix permissions on scripts dir
869 chmod og-w -R $fs/$path/scripts
870 mkdir -p $fs/$path/.tmp_versions
872 mkdir -p $fs/$path/arch/x86/kernel
873 cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
874 cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
875 cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
877 # add headers for lirc package
878 mkdir -p $fs/$path/drivers/media/video
879 cp -a $src/drivers/media/video/*.h $fs/$path/drivers/media/video/
881 for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo ; do
882 mkdir -p $fs/$path/drivers/media/video/$i
883 cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
884 done
886 # add docbook makefile
887 install -D -m644 $src/Documentation/DocBook/Makefile \
888 $fs/$path/Documentation/DocBook/Makefile
890 # add dm headers
891 mkdir -p $fs/$path/drivers/md
892 cp -a $src/drivers/md/*.h $fs/$path/drivers/md
894 # add inotify.h
895 mkdir -p $fs/$path/include/linux
896 cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
898 # add wireless headers
899 mkdir -p $fs/$path/net/mac80211/
900 cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
902 # add dvb headers for external modules
903 # in reference to:
904 # http://bugs.archlinux.org/task/9912
905 mkdir -p $fs/$path/drivers/media/dvb/dvb-core
906 cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
908 # add dvb headers for external modules
909 # in reference to:
910 # http://bugs.archlinux.org/task/11194
911 if [ -d $src/include/config/dvb/ ]; then
912 mkdir -p $fs/$path/include/config/dvb/
913 cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
914 fi
916 # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
917 # in reference to:
918 # http://bugs.archlinux.org/task/13146
919 mkdir -p $fs/$path/drivers/media/dvb/frontends/
920 cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
921 cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
923 # add dvb headers
924 # in reference to:
925 # http://bugs.archlinux.org/task/20402
926 mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
927 cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
928 mkdir -p $fs/$path/drivers/media/dvb/frontends
929 cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
930 mkdir -p $fs/$path/drivers/media/common/tuners
931 cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
933 # add xfs and shmem for aufs building
934 mkdir -p $fs/$path/fs/xfs
935 mkdir -p $fs/$path/mm
936 cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
938 # add headers vor virtualbox
939 # in reference to:
940 # http://bugs.archlinux.org/task/14568
941 cp -a $src/include/drm $fs/$path/include/
943 # add headers for broadcom wl
944 # in reference to:
945 # http://bugs.archlinux.org/task/14568
946 cp -a $src/include/trace $fs/$path/include/
947 # add headers for crypto modules
948 # in reference to:
949 # http://bugs.archlinux.org/task/22081
950 cp -a $src/include/crypto $fs/$path/include/
951 # copy in Kconfig files
952 for i in $(find . -name "Kconfig*"); do
953 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
954 cp -a $src/$i $fs/$path/$i
955 done
957 chown -R root.root $fs/$path
958 find $fs/$path -type d -exec chmod 755 {} \;
959 # remove unneeded architectures
960 rm -rf $fs/$path/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
961 ;;
962 linux-libre-mwave)
963 local path
964 path=lib/modules/$VERSION-slitaz/kernel
965 mkdir -p $fs/$path
966 export src
967 export _pkg
968 $stuff/list_modules.sh drivers/char/mwave | while read module; do
969 dir=$path/$(dirname $module)
970 [ -d $fs/$dir ] || mkdir -p $fs/$dir
971 cp -a $install/$path/$module $fs/$dir
972 done
973 CAT="base-system|ACP Modem driver module - for IBM Thinkpad"
974 PROVIDE="linux-mwave"
975 ;;
976 linux-libre-nbd)
977 local path
978 path=lib/modules/$VERSION-slitaz/kernel
979 mkdir -p $fs/$path
980 export src
981 export _pkg
982 $stuff/list_modules.sh drivers/block/nbd.ko.gz | \
983 while read module; do
984 dir=$path/$(dirname $module)
985 [ -d $fs/$dir ] || mkdir -p $fs/$dir
986 cp -a $install/$path/$module $fs/$dir
987 done
988 CAT="base-system|network block device modules"
989 PROVIDE="linux-nbd"
990 ;;
991 linux-libre-ncpfs)
992 local path
993 path=lib/modules/$VERSION-slitaz/kernel
994 mkdir -p $fs/$path $fs/etc
995 export src
996 export _pkg
997 $stuff/list_modules.sh fs/ncpfs | while read module; do
998 dir=$path/$(dirname $module)
999 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1000 cp -a $install/$path/$module $fs/$dir
1001 done
1002 touch $fs/etc/filesystems
1003 CAT="base-system|ncpfs module"
1004 PROVIDE="linux-ncpfs"
1005 CONFIG_FILES="/etc/filesystems"
1006 ;;
1007 linux-libre-netfilter)
1008 local path
1009 path=lib/modules/$VERSION-slitaz/kernel
1010 mkdir -p $fs/$path
1011 export src
1012 export _pkg
1013 $stuff/list_modules.sh net/netfilter net/ipv4/netfilter net/8021q | \
1014 while read module; do
1015 dir=$path/$(dirname $module)
1016 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1017 cp -a $install/$path/$module $fs/$dir
1018 done
1019 rm -r $fs/$path/net/ipv6
1020 for i in $(cat $stuff/modules-$VERSION.list); do
1021 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
1022 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
1023 fi
1024 done
1025 CAT="base-system|netfilter modules"
1026 PROVIDE="linux-netfilter"
1027 ;;
1028 linux-libre-nfsd)
1029 local path
1030 path=lib/modules/$VERSION-slitaz/kernel
1031 mkdir -p $fs/$path $fs/etc
1032 export src
1033 export _pkg
1034 $stuff/list_modules.sh fs/nfsd | while read module; do
1035 dir=$path/$(dirname $module)
1036 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1037 cp -a $install/$path/$module $fs/$dir
1038 done
1039 touch $fs/etc/filesystems
1040 CAT="base-system|NFS server module"
1041 PROVIDE="linux-nfsd"
1042 CONFIG_FILES="/etc/filesystems"
1043 ;;
1044 linux-libre-reiserfs)
1045 local path
1046 path=lib/modules/$VERSION-slitaz/kernel
1047 mkdir -p $fs/$path $fs/etc
1048 export src
1049 export _pkg
1050 $stuff/list_modules.sh fs/reiserfs | while read module; do
1051 dir=$path/$(dirname $module)
1052 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1053 cp -a $install/$path/$module $fs/$dir
1054 done
1055 touch $fs/etc/filesystems
1056 CAT="base-system|reiserfs module"
1057 PROVIDE="linux-reiserfs"
1058 CONFIG_FILES="/etc/filesystems"
1059 ;;
1060 linux-libre-sched)
1061 local path
1062 path=lib/modules/$VERSION-slitaz/kernel
1063 mkdir -p $fs/$path
1064 export src
1065 export _pkg
1066 $stuff/list_modules.sh net/sched | while read module; do
1067 dir=$path/$(dirname $module)
1068 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1069 cp -a $install/$path/$module $fs/$dir
1070 done
1071 CAT="base-system|sched modules"
1072 PROVIDE="linux-sched"
1073 ;;
1074 linux-libre-scsi)
1075 local path
1076 path=lib/modules/$VERSION-slitaz/kernel
1077 mkdir -p $fs/$path
1078 export src
1079 export _pkg
1080 $stuff/list_modules.sh drivers/scsi | while read module; do
1081 dir=$path/$(dirname $module)
1082 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1083 cp -a $install/$path/$module $fs/$dir
1084 done
1085 CAT="base-system|scsi modules"
1086 PROVIDE="linux-scsi"
1087 ;;
1088 linux-libre-sound)
1089 local path
1090 path=lib/modules/$VERSION-slitaz/kernel
1091 mkdir -p $fs/$path
1092 export src
1093 export _pkg
1094 $stuff/list_modules.sh sound | while read module; do
1095 dir=$path/$(dirname $module)
1096 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1097 cp -a $install/$path/$module $fs/$dir
1098 done
1099 mkdir $fs/lib/firmware
1100 # non-free firmware ?
1101 #for i in ess korg sun yamaha; do
1102 # cp -a $install/lib/firmware/$i $fs/lib/firmware
1103 #done
1104 for i in $(cat $stuff/modules-$VERSION.list); do
1105 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
1106 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
1107 fi
1108 done
1109 CAT="base-system|sound modules"
1110 PROVIDE="linux-sound"
1111 ;;
1112 linux-libre-source)
1113 local _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
1114 local AUFSDIR="aufs-${_AUFSVER}"
1115 mkdir -p $fs/usr/src/kernel-patches \
1116 $fs/lib/modules/$VERSION-slitaz \
1117 $fs/usr/bin
1118 cp -a $WOK/$WANTED/slitaz $fs/usr/src/kernel-patches
1119 cp -a $stuff/source/buildtaz $fs/usr/src/kernel-patches/slitaz
1120 cp -a $stuff/source/make-tazpkg.u $fs/usr/src/kernel-patches/slitaz
1121 cp -a $stuff/source/get-linux-source $fs/usr/bin
1122 sed -i "s|=XXX|=$VERSION|g" $fs/usr/bin/get-linux-source
1123 # Copy Aufs2 source files
1124 if [ -d $WOK/$WANTED/$AUFSDIR ]; then
1125 mkdir $fs/usr/src/kernel-patches/slitaz/aufs2
1126 cp -a $WOK/$WANTED/$AUFSDIR/Documentation \
1127 $WOK/$WANTED/$AUFSDIR/fs $WOK/$WANTED/$AUFSDIR/include \
1128 $fs/usr/src/kernel-patches/slitaz/aufs2
1129 fi
1130 ln -s /usr/src/linux-$VERSION \
1131 $fs/lib/modules/$VERSION-slitaz/source
1132 CAT="development|source files"
1133 PROVIDE="linux-source"
1134 DEPENDS="linux-libre slitaz-toolchain ncurses-dev perl"
1135 ;;
1136 linux-libre-speakup)
1137 local path
1138 path=lib/modules/$VERSION-slitaz/kernel
1139 mkdir -p $fs/$path
1140 export src
1141 export _pkg
1142 $stuff/list_modules.sh drivers/staging/speakup | while read module; do
1143 dir=$path/$(dirname $module)
1144 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1145 cp -a $install/$path/$module $fs/$dir
1146 done
1147 for i in $(cat $stuff/modules-$VERSION.list); do
1148 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
1149 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
1150 fi
1151 done
1152 CAT="base-system|Speakup modules"
1153 PROVIDE="linux-speakup"
1154 ;;
1155 linux-libre-squashfs)
1156 local path
1157 path=lib/modules/$VERSION-slitaz/kernel
1158 mkdir -p $fs/$path $fs/etc
1159 export src
1160 export _pkg
1161 $stuff/list_modules.sh fs/squashfs | while read module; do
1162 dir=$path/$(dirname $module)
1163 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1164 cp -a $install/$path/$module $fs/$dir
1165 done
1166 touch $fs/etc/filesystems
1167 CAT="base-system|squashfs module"
1168 PROVIDE="linux-squashfs squashfs-module"
1169 CONFIG_FILES="/etc/filesystems"
1170 ;;
1171 linux-libre-toshiba)
1172 # Modules paths and list
1173 MOD_PATH="lib/modules/$VERSION-slitaz/kernel"
1174 MODULES="drivers/char/toshiba.ko.gz"
1175 mkdir -p ${fs}${MOD_PATH}
1176 for module in $MODULES; do
1177 dir=$MOD_PATH/$(dirname $module)
1178 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1179 cp -a $install/$MOD_PATH/$module $fs/$dir
1180 done
1181 CAT="base-system|toshiba module"
1182 PROVIDE="linux-toshiba"
1183 ;;
1184 linux-libre-udf)
1185 local path
1186 path=lib/modules/$VERSION-slitaz/kernel
1187 mkdir -p $fs/$path $fs/etc
1188 export src
1189 export _pkg
1190 $stuff/list_modules.sh fs/udf | while read module; do
1191 dir=$path/$(dirname $module)
1192 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1193 cp -a $install/$path/$module $fs/$dir
1194 done
1195 touch $fs/etc/filesystems
1196 for i in $(cat $stuff/modules-$VERSION.list); do
1197 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
1198 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
1199 fi
1200 done
1201 CAT="base-system|udf module"
1202 PROVIDE="linux-udf"
1203 CONFIG_FILES="/etc/filesystems"
1204 ;;
1205 linux-libre-usbdsl)
1206 local path
1207 path=lib/modules/$VERSION-slitaz/kernel
1208 mkdir -p $fs/$path
1209 export src
1210 export _pkg
1211 $stuff/list_modules.sh drivers/usb/atm net/atm | \
1212 while read module; do
1213 dir=$path/$(dirname $module)
1214 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1215 cp -a $install/$path/$module $fs/$dir
1216 done
1217 CAT="base-system|usb dsl modem modules"
1218 PROVIDE="linux-usbdsl"
1219 ;;
1220 linux-libre-usbip)
1221 local path
1222 path=lib/modules/$VERSION-slitaz/kernel
1223 mkdir -p $fs/$path
1224 export src
1225 export _pkg
1226 $stuff/list_modules.sh drivers/staging/usbip | while read module; do
1227 dir=$path/$(dirname $module)
1228 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1229 cp -a $install/$path/$module $fs/$dir
1230 done
1231 CAT="base-system|usbip module"
1232 PROVIDE="linux-usbip usbip-module"
1233 ;;
1234 linux-libre-usb-misc)
1235 local path
1236 path=lib/modules/$VERSION-slitaz/kernel
1237 mkdir -p $fs/$path
1238 export src
1239 export _pkg
1240 $stuff/list_modules.sh drivers/usb/misc | while read module; do
1241 dir=$path/$(dirname $module)
1242 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1243 cp -a $install/$path/$module $fs/$dir
1244 done
1245 CAT="base-system|misc. USB drivers, including the Lego USB tower"
1246 PROVIDE="linux-usb-misc"
1247 ;;
1248 linux-libre-uwb)
1249 local path
1250 path=lib/modules/$VERSION-slitaz/kernel
1251 mkdir -p $fs/$path
1252 export src
1253 export _pkg
1254 $stuff/list_modules.sh drivers/uwb drivers/usb/wusbcore \
1255 drivers/usb/host/whci | while read module; do
1256 dir=$path/$(dirname $module)
1257 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1258 cp -a $install/$path/$module $fs/$dir
1259 done
1260 CAT="base-system|uwb modules"
1261 PROVIDE="linux-uwb"
1262 ;;
1263 linux-libre-video)
1264 # Modules paths and list
1265 MOD_PATH="lib/modules/$VERSION-slitaz/kernel"
1266 MODULES="drivers/video/backlight/lcd.ko.gz
1267 drivers/video/backlight/generic_bl.ko.gz
1268 drivers/gpio/bt8xxgpio.ko.gz"
1269 mkdir -p ${fs}${MOD_PATH}
1270 for module in $MODULES; do
1271 dir=$MOD_PATH/$(dirname $module)
1272 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1273 cp -a $install/$MOD_PATH/$module $fs/$dir
1274 done
1275 CAT="base-system|video modules"
1276 PROVIDE="linux-video"
1277 ;;
1278 linux-libre-wimax)
1279 local path
1280 path=lib/modules/$VERSION-slitaz/kernel
1281 mkdir -p $fs/$path
1282 export src
1283 export _pkg
1284 $stuff/list_modules.sh drivers/net/wimax net/wimax | while read module; do
1285 dir=$path/$(dirname $module)
1286 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1287 cp -a $install/$path/$module $fs/$dir
1288 done
1289 for i in $(cat $stuff/modules-$VERSION.list); do
1290 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
1291 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
1292 fi
1293 done
1294 CAT="base-system|wimax modules"
1295 PROVIDE="linux-wimax"
1296 ;;
1297 linux-libre-wireless)
1298 local path
1299 path=lib/modules/$VERSION-slitaz/kernel
1300 mkdir -p $fs/$path
1301 export src
1302 export _pkg
1303 $stuff/list_modules.sh drivers/net/wireless drivers/staging/wlan-ng \
1304 drivers/staging/rt2860 drivers/staging/rt2870 drivers/staging/echo \
1305 drivers/leds net/wireless net/mac80211 drivers/staging/rtl8192e/r8192e_pci.ko.gz \
1306 drivers/staging/rtl8187se/r8187se.ko.gz \
1307 drivers/staging/rtl8192u/r8192u_usb.ko.gz drivers/staging/crystalhd/crystalhd.ko.gz \
1308 drivers/staging/sm7xx/sm7xx.ko.gz | while read module; do
1309 dir=$path/$(dirname $module)
1310 [ -d $fs/$dir ] || mkdir -p $fs/$dir
1311 cp -a $install/$path/$module $fs/$dir
1312 done
1313 for i in $(cat $stuff/modules-$VERSION.list); do
1314 if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
1315 rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
1316 fi
1317 done
1318 CAT="base-system|wireless modules"
1319 PROVIDE="linux-wireless"
1320 DEPENDS="linux-libre-crypto wireless_tools"
1321 ;;
1322 linux-libre-without-modules)
1323 mkdir -p $fs/boot
1324 cp -a $install/bzImage $fs/boot/vmlinuz-$VERSION-slitaz-without-modules
1325 CAT="base-system|without module support"
1326 PROVIDE="linux-without-modules"
1327 ;;
1328 lguest-libre)
1329 mkdir -p $fs/usr/sbin
1330 cp $src/Documentation/lguest/lguest $fs/usr/sbin
1331 CAT="base-system|paravirtualization tool"
1332 PROVIDE="lguest"
1333 ;;
1334 esac
1335 }
1337 # Pre and post install commands for Tazpkg.
1338 post_install_linux_libre()
1339 {
1340 chroot "$1/" depmod -a $VERSION-slitaz
1341 # GRUB stuff.
1342 if [ -f "$1/boot/grub/menu.lst" ]; then
1343 root_dev=$(cat "$1/boot/grub/menu.lst" | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1)
1344 grub_dev=$(cat "$1/boot/grub/menu.lst" | grep "root (" | head -n 1)
1345 # Add new kernel entry in case of upgrade for installed system.
1346 if ! grep -q $PACKAGE-$VERSION-slitaz "$1/boot/grub/menu.lst"; then
1347 cat >> "$1/boot/grub/menu.lst" <<EOT
1349 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
1350 $grub_dev
1351 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
1352 EOT
1353 fi
1354 # Display information message.
1355 cat <<EOT
1356 ----
1357 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
1359 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
1360 $grub_dev
1361 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
1362 ----
1363 EOT
1364 fi
1365 true
1366 }
1368 post_install_linux_libre_acpi() {
1369 chroot "$1/" depmod -a $VERSION-slitaz
1370 }
1371 post_remove_linux_libre_acpi() {
1372 chroot "$1/" depmod -a $VERSION-slitaz
1373 }
1374 post_install_linux_libre_agp() {
1375 chroot "$1/" depmod -a $VERSION-slitaz
1376 }
1377 post_remove_linux_libre_agp() {
1378 chroot "$1/" depmod -a $VERSION-slitaz
1379 }
1380 post_install_linux_libre_aoe() {
1381 chroot "$1/" depmod -a $VERSION-slitaz
1382 }
1383 post_remove_linux_libre_aoe() {
1384 chroot "$1/" depmod -a $VERSION-slitaz
1385 }
1386 post_install_linux_libre_appletalk() {
1387 chroot "$1/" depmod -a $VERSION-slitaz
1388 }
1389 post_remove_linux_libre_appletalk() {
1390 chroot "$1/" depmod -a $VERSION-slitaz
1391 }
1392 post_install_linux_libre_autofs() {
1393 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1394 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1395 chroot "$1/" depmod -a $VERSION-slitaz
1396 }
1397 post_remove_linux_libre_autofs() {
1398 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1399 chroot "$1/" depmod -a $VERSION-slitaz
1400 }
1401 post_install_linux_libre_bluetooth() {
1402 chroot "$1/" depmod -a $VERSION-slitaz
1403 }
1404 post_remove_linux_libre_bluetooth() {
1405 chroot "$1/" depmod -a $VERSION-slitaz
1406 }
1407 post_install_linux_libre_bridge() {
1408 chroot "$1/" depmod -a $VERSION-slitaz
1409 }
1410 post_remove_linux_libre_bridge() {
1411 chroot "$1/" depmod -a $VERSION-slitaz
1412 }
1413 post_install_linux_libre_btrfs() {
1414 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1415 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1416 chroot "$1/" depmod -a $VERSION-slitaz
1417 }
1418 post_remove_linux_libre_btrfs() {
1419 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1420 chroot "$1/" depmod -a $VERSION-slitaz
1421 }
1422 post_install_linux_libre_cifs() {
1423 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1424 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1425 chroot "$1/" depmod -a $VERSION-slitaz
1426 }
1427 post_remove_linux_libre_cifs() {
1428 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1429 chroot "$1/" depmod -a $VERSION-slitaz
1430 }
1431 post_install_linux_libre_coda() {
1432 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1433 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1434 chroot "$1/" depmod -a $VERSION-slitaz
1435 }
1436 post_remove_linux_libre_coda() {
1437 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1438 chroot "$1/" depmod -a $VERSION-slitaz
1439 }
1440 post_install_linux_libre_configfs() {
1441 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1442 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1443 chroot "$1/" depmod -a $VERSION-slitaz
1444 }
1445 post_remove_linux_libre_configfs() {
1446 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1447 chroot "$1/" depmod -a $VERSION-slitaz
1448 }
1449 post_install_linux_libre_cpufreq() {
1450 chroot "$1/" depmod -a $VERSION-slitaz
1451 }
1452 post_remove_linux_libre_cpufreq() {
1453 chroot "$1/" depmod -a $VERSION-slitaz
1454 }
1455 post_install_linux_libre_cramfs() {
1456 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1457 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1458 chroot "$1/" depmod -a $VERSION-slitaz
1459 }
1460 post_remove_linux_libre_cramfs() {
1461 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1462 chroot "$1/" depmod -a $VERSION-slitaz
1463 }
1464 post_install_linux_libre_crypto() {
1465 chroot "$1/" depmod -a $VERSION-slitaz
1466 }
1467 post_remove_linux_libre_crypto() {
1468 chroot "$1/" depmod -a $VERSION-slitaz
1469 }
1470 post_install_linux_libre_cryptoloop() {
1471 chroot "$1/" depmod -a $VERSION-slitaz
1472 }
1473 post_remove_linux_libre_cryptoloop() {
1474 chroot "$1/" depmod -a $VERSION-slitaz
1475 }
1476 post_install_linux_libre_dialup() {
1477 chroot "$1/" depmod -a $VERSION-slitaz
1478 }
1479 post_remove_linux_libre_dialup() {
1480 chroot "$1/" depmod -a $VERSION-slitaz
1481 }
1482 post_install_linux_libre_dlm() {
1483 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1484 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1485 chroot "$1/" depmod -a $VERSION-slitaz
1486 }
1487 post_remove_linux_libre_dlm() {
1488 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1489 chroot "$1/" depmod -a $VERSION-slitaz
1490 }
1491 post_install_linux_libre_drm() {
1492 chroot "$1/" depmod -a $VERSION-slitaz
1493 }
1494 post_remove_linux_libre_drm() {
1495 chroot "$1/" depmod -a $VERSION-slitaz
1496 }
1497 post_install_linux_libre_firewire() {
1498 chroot "$1/" depmod -a $VERSION-slitaz
1499 }
1500 post_remove_linux_libre_firewire() {
1501 chroot "$1/" depmod -a $VERSION-slitaz
1502 }
1503 post_install_linux_libre_gfs2() {
1504 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1505 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1506 chroot "$1/" depmod -a $VERSION-slitaz
1507 }
1508 post_remove_linux_libre_gfs2() {
1509 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1510 chroot "$1/" depmod -a $VERSION-slitaz
1511 }
1512 post_install_linux_libre_hfs() {
1513 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1514 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1515 chroot "$1/" depmod -a $VERSION-slitaz
1516 }
1517 post_remove_linux_libre_hfs() {
1518 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1519 chroot "$1/" depmod -a $VERSION-slitaz
1520 }
1521 post_install_linux_libre_hfsplus() {
1522 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1523 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1524 chroot "$1/" depmod -a $VERSION-slitaz
1525 }
1526 post_remove_linux_libre_hfsplus() {
1527 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1528 chroot "$1/" depmod -a $VERSION-slitaz
1529 }
1530 post_install_linux_libre_hwmon() {
1531 chroot "$1/" depmod -a $VERSION-slitaz
1532 }
1533 post_remove_linux_libre_hwmon() {
1534 chroot "$1/" depmod -a $VERSION-slitaz
1535 }
1536 post_install_linux_libre_input_misc() {
1537 chroot "$1/" depmod -a $VERSION-slitaz
1538 }
1539 post_remove_linux_libre_input_misc() {
1540 chroot "$1/" depmod -a $VERSION-slitaz
1541 }
1542 post_install_linux_libre_input_tablet() {
1543 chroot "$1/" depmod -a $VERSION-slitaz
1544 }
1545 post_remove_linux_libre_input_tablet() {
1546 chroot "$1/" depmod -a $VERSION-slitaz
1547 }
1548 post_install_linux_libre_input_touchscreen() {
1549 chroot "$1/" depmod -a $VERSION-slitaz
1550 }
1551 post_remove_linux_libre_input_touchscreen() {
1552 chroot "$1/" depmod -a $VERSION-slitaz
1553 }
1554 post_install_linux_libre_ipv6() {
1555 chroot "$1/" depmod -a $VERSION-slitaz
1556 }
1557 post_remove_linux_libre_ipv6() {
1558 chroot "$1/" depmod -a $VERSION-slitaz
1559 }
1560 post_install_linux_libre_irda() {
1561 chroot "$1/" depmod -a $VERSION-slitaz
1562 }
1563 post_remove_linux_libre_irda() {
1564 chroot "$1/" depmod -a $VERSION-slitaz
1565 }
1566 post_install_linux_libre_isdn() {
1567 chroot "$1/" depmod -a $VERSION-slitaz
1568 }
1569 post_remove_linux_libre_isdn() {
1570 chroot "$1/" depmod -a $VERSION-slitaz
1571 }
1572 post_install_linux_libre_jfs() {
1573 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1574 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1575 chroot "$1/" depmod -a $VERSION-slitaz
1576 }
1577 post_remove_linux_libre_jfs() {
1578 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1579 chroot "$1/" depmod -a $VERSION-slitaz
1580 }
1581 post_install_linux_libre_joystick() {
1582 chroot "$1/" depmod -a $VERSION-slitaz
1583 }
1584 post_remove_linux_libre_joystick() {
1585 chroot "$1/" depmod -a $VERSION-slitaz
1586 }
1587 post_install_linux_libre_kvm() {
1588 chroot "$1/" depmod -a $VERSION-slitaz
1589 }
1590 post_remove_linux_libre_kvm() {
1591 chroot "$1/" depmod -a $VERSION-slitaz
1592 }
1593 post_install_linux_libre_logfs() {
1594 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1595 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1596 chroot "$1/" depmod -a $VERSION-slitaz
1597 }
1598 post_remove_linux_libre_logfs() {
1599 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1600 chroot "$1/" depmod -a $VERSION-slitaz
1601 }
1602 post_install_linux_libre_md() {
1603 chroot "$1/" depmod -a $VERSION-slitaz
1604 }
1605 post_remove_linux_libre_md() {
1606 chroot "$1/" depmod -a $VERSION-slitaz
1607 }
1608 post_install_linux_libre_memstick() {
1609 chroot "$1/" depmod -a $VERSION-slitaz
1610 }
1611 post_remove_linux_libre_memstick() {
1612 chroot "$1/" depmod -a $VERSION-slitaz
1613 }
1614 post_install_linux_libre_minix() {
1615 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1616 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1617 chroot "$1/" depmod -a $VERSION-slitaz
1618 }
1619 post_remove_linux_libre_minix() {
1620 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1621 chroot "$1/" depmod -a $VERSION-slitaz
1622 }
1623 post_install_linux_libre_mmc() {
1624 chroot "$1/" depmod -a $VERSION-slitaz
1625 }
1626 post_remove_linux_libre_mmc() {
1627 chroot "$1/" depmod -a $VERSION-slitaz
1628 }
1629 pre_remove_linux_libre_module_headers() {
1630 if [ -e "$1/usr/src/linux" ]; then
1631 rm -rf "$1/usr/src/linux"
1632 fi
1633 }
1634 post_install_linux_libre_module_headers() {
1635 KVERSION=$VERSION-slitaz
1636 # Added soft link to make it easier to point to kernel folder
1637 [ -L "$1/usr/src/linux" ] && rm -f "$1/usr/src/linux"
1638 ln -sf /usr/src/linux-$KVERSION "$1/usr/src/linux"
1639 }
1640 post_install_linux_libre_mwave() {
1641 chroot "$1/" depmod -a $VERSION-slitaz
1642 }
1643 post_remove_linux_libre_mwave() {
1644 chroot "$1/" depmod -a $VERSION-slitaz
1645 }
1646 post_install_linux_libre_nbd() {
1647 chroot "$1/" depmod -a $VERSION-slitaz
1648 }
1649 post_remove_linux_libre_nbd() {
1650 chroot "$1/" depmod -a $VERSION-slitaz
1651 }
1652 post_install_linux_libre_ncpfs() {
1653 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1654 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1655 chroot "$1/" depmod -a $VERSION-slitaz
1656 }
1657 post_remove_linux_libre_ncpfs() {
1658 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1659 chroot "$1/" depmod -a $VERSION-slitaz
1660 }
1661 post_install_linux_libre_netfilter() {
1662 chroot "$1/" depmod -a $VERSION-slitaz
1663 }
1664 post_remove_linux_libre_netfilter() {
1665 chroot "$1/" depmod -a $VERSION-slitaz
1666 }
1667 post_install_linux_libre_nfsd() {
1668 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1669 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1670 chroot "$1/" depmod -a $VERSION-slitaz
1671 }
1672 post_remove_linux_libre_nfsd() {
1673 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1674 chroot "$1/" depmod -a $VERSION-slitaz
1675 }
1676 post_install_linux_libre_reiserfs() {
1677 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1678 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1679 chroot "$1/" depmod -a $VERSION-slitaz
1680 }
1681 post_remove_linux_libre_reiserfs() {
1682 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1683 chroot "$1/" depmod -a $VERSION-slitaz
1684 }
1685 post_install_linux_libre_sched() {
1686 chroot "$1/" depmod -a $VERSION-slitaz
1687 }
1688 post_remove_linux_libre_sched() {
1689 chroot "$1/" depmod -a $VERSION-slitaz
1690 }
1691 post_install_linux_libre_scsi() {
1692 chroot "$1/" depmod -a $VERSION-slitaz
1693 }
1694 post_remove_linux_libre_scsi() {
1695 chroot "$1/" depmod -a $VERSION-slitaz
1696 }
1697 post_install_linux_libre_sound() {
1698 chroot "$1/" depmod -a $VERSION-slitaz
1699 }
1700 post_remove_linux_libre_sound() {
1701 chroot "$1/" depmod -a $VERSION-slitaz
1702 }
1703 post_install_linux_libre_speakup() {
1704 chroot "$1/" depmod -a $VERSION-slitaz
1705 }
1706 post_remove_linux_libre_speakup() {
1707 chroot "$1/" depmod -a $VERSION-slitaz
1708 }
1709 post_install_linux_libre_squashfs() {
1710 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1711 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1712 chroot "$1/" depmod -a $VERSION-slitaz
1713 }
1714 post_remove_linux_libre_squashfs() {
1715 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1716 chroot "$1/" depmod -a $VERSION-slitaz
1717 }
1718 post_install_linux_libre_toshiba() {
1719 chroot "$1/" depmod -a $VERSION-slitaz
1720 }
1721 post_remove_linux_libre_toshiba() {
1722 chroot "$1/" depmod -a $VERSION-slitaz
1723 }
1724 post_install_linux_libre_udf() {
1725 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1726 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1727 chroot "$1/" depmod -a $VERSION-slitaz
1728 }
1729 post_remove_linux_libre_udf() {
1730 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1731 chroot "$1/" depmod -a $VERSION-slitaz
1732 }
1733 post_install_linux_libre_usbdsl() {
1734 chroot "$1/" depmod -a $VERSION-slitaz
1735 }
1736 post_remove_linux_libre_usbdsl() {
1737 chroot "$1/" depmod -a $VERSION-slitaz
1738 }
1739 post_install_linux_libre_usbip() {
1740 grep -qs ^${PACKAGE##*-}$ "$1/etc/filesystems" || \
1741 echo "${PACKAGE##*-}" >> "$1/etc/filesystems"
1742 chroot "$1/" depmod -a $VERSION-slitaz
1743 }
1744 post_remove_linux_libre_usbip() {
1745 sed -i "/^${PACKAGE##*-}\$/d" "$1/etc/filesystems"
1746 chroot "$1/" depmod -a $VERSION-slitaz
1747 }
1748 post_install_linux_libre_usb_misc() {
1749 chroot "$1/" depmod -a $VERSION-slitaz
1750 }
1751 post_remove_linux_libre_usb_misc() {
1752 chroot "$1/" depmod -a $VERSION-slitaz
1753 }
1754 post_install_linux_libre_uwb() {
1755 chroot "$1/" depmod -a $VERSION-slitaz
1756 }
1757 post_remove_linux_libre_uwb() {
1758 chroot "$1/" depmod -a $VERSION-slitaz
1759 }
1760 post_install_linux_libre_video() {
1761 chroot "$1/" depmod -a $VERSION-slitaz
1762 }
1763 post_remove_linux_libre_video() {
1764 chroot "$1/" depmod -a $VERSION-slitaz
1765 }
1766 post_install_linux_libre_wimax() {
1767 chroot "$1/" depmod -a $VERSION-slitaz
1768 }
1769 post_remove_linux_libre_wimax() {
1770 chroot "$1/" depmod -a $VERSION-slitaz
1771 }
1772 post_install_linux_libre_wireless() {
1773 chroot "$1/" depmod -a $VERSION-slitaz
1774 }
1775 post_remove_linux_libre_wireless() {
1776 chroot "$1/" depmod -a $VERSION-slitaz
1777 }