wok-6.x rev 18754

syslinux: do not store unused kbdmaps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 27 17:25:20 2015 +0100 (2015-12-27)
parents ac1a50fb89ae
children ce8561c19cb9
files syslinux/receipt
line diff
     1.1 --- a/syslinux/receipt	Sat Dec 26 20:35:21 2015 +0100
     1.2 +++ b/syslinux/receipt	Sun Dec 27 17:25:20 2015 +0100
     1.3 @@ -36,11 +36,11 @@
     1.4  	make -C com32
     1.5  	./isohybrid.sh --build
     1.6  	sed -i 's/loadkeys -m/loadkeys -u -m/' utils/keytab-lilo	# for ru.kbd
     1.7 +	mkdir kbd
     1.8  	for i in /usr/share/kbd/keymaps/i386/*/*.map.gz; do
     1.9  		[ "$(basename $(dirname $i))" == 'include' ] && continue
    1.10 -		j=$(basename $i)
    1.11 -		j=${j%.map.gz}.kbd
    1.12 -		utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz $i > $j
    1.13 +		utils/keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz \
    1.14 +			$i > kbd/$(basename $i .map.gz)
    1.15  	done
    1.16  	cp -a $stuff/iso2exe .
    1.17  	make -C iso2exe
    1.18 @@ -57,17 +57,15 @@
    1.19  	cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux
    1.20  	rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg
    1.21  	rm -f $fs/boot/isolinux/display.txt
    1.22 -	( cd $src ; ls *.kbd | cpio -o -H newc ) > $fs/boot/isolinux/cpio.kbd
    1.23  	while read label kbd loc menu; do
    1.24  		for i in ${kbd/,/ }; do
    1.25 -			[ -e $src/$i.kbd ] || continue
    1.26 +			[ -e $src/kbd/$i ] || continue
    1.27  			cat >> $fs/boot/isolinux/i18n.cfg <<EOT
    1.28 -
    1.29 -# ${kbd/,/.kbd or }.kbd keyboard
    1.30  LABEL $label
    1.31  	MENU LABEL $menu
    1.32  	com32 c32box.c32
    1.33 -	append kbdmap cpio.kbd $i.kbd lang=$loc kmap=${kbd#*,}
    1.34 +	append kbdmap kbd $i lang=$loc kmap=${kbd#*,}
    1.35 +
    1.36  EOT
    1.37  			break
    1.38  		done
    1.39 @@ -107,18 +105,23 @@
    1.40  EOT
    1.41  
    1.42  	cat >> $fs/boot/isolinux/i18n.cfg <<EOT
    1.43 -
    1.44  LABEL exit
    1.45  	MENU LABEL Back to main menu
    1.46 +
    1.47  MENU EXIT
    1.48  MENU END
    1.49  EOT
    1.50  	sed -i 's/^LABEL us$/&\n	MENU DEFAULT/' $fs/boot/isolinux/i18n.cfg
    1.51 -	for kbd in $(cd $src ; ls *.kbd); do
    1.52 -		[ -s $src/$kbd ] || echo "Invalid file $kbd"
    1.53 +	chown root.root $src/kbd/*
    1.54 +	touch -r $src $src/kbd/*
    1.55 +	for kbd in $(cd $src/kbd; ls | tee ../kbd.l); do
    1.56 +		msg="Invalid file kbd/$kbd"
    1.57 +		[ -s $src/kbd/$kbd ] && msg="Unused: file kbd/$kbd" &&
    1.58  		grep -q " $kbd " $fs/boot/isolinux/i18n.cfg && continue
    1.59 -		echo "Missing: file $kbd"
    1.60 +		sed -i "/^$kbd\$/d" $src/kbd.l
    1.61 +		echo "$msg"
    1.62  	done
    1.63 +	( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$fs/boot/isolinux/kbd
    1.64  	chown root.root $fs/boot/isolinux/*
    1.65  }
    1.66