wok-6.x rev 12882

Add kbd to ARM
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 25 23:26:50 2012 +0200 (2012-05-25)
parents 4d4b18813d25
children cd46d880e369
files kbd-base/receipt kbd/receipt slitaz-tools/receipt
line diff
     1.1 --- a/kbd-base/receipt	Fri May 25 23:24:13 2012 +0200
     1.2 +++ b/kbd-base/receipt	Fri May 25 23:26:50 2012 +0200
     1.3 @@ -6,30 +6,34 @@
     1.4  SHORT_DESC="Keyboard maping definitions and loadkeys utility."
     1.5  MAINTAINER="pankso@slitaz.org"
     1.6  WANTED="kbd"
     1.7 -WEB_SITE="http://www.kernel.org/pub/linux/utils/kbd/"
     1.8 +WEB_SITE="http://kbd-project.org/"
     1.9 +HOST_ARCH="i486 arm"
    1.10 +
    1.11 +# Make sure it will run on host or no keyboard support...
    1.12 +testsuite()
    1.13 +{
    1.14 +	readelf -h $install/usr/bin/loadkeys
    1.15 +}
    1.16  
    1.17  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.18  genpkg_rules()
    1.19  {
    1.20 -	mkdir -p \
    1.21 -		$fs/usr/share/kbd/keymaps/i386/azerty \
    1.22 -		$fs/usr/share/kbd/keymaps/i386/dvorak \
    1.23 -		$fs/usr/share/kbd/keymaps/i386/qwerty \
    1.24 -		$fs/usr/share/kbd/keymaps/i386/qwertz \
    1.25 -		$fs/bin
    1.26 -		
    1.27 -	cp -a $_pkg/usr/bin/loadkeys $fs/bin
    1.28 -	
    1.29 +	mkdir -p $fs/bin
    1.30 +	cp -a $install/usr/bin/loadkeys $fs/bin
    1.31 +	# Dirs
    1.32 +	for dir in dvorak azerty qwerty qwertz; do
    1.33 +		mkdir -p $fs/usr/share/kbd/keymaps/i386/$dir
    1.34 +	done
    1.35  	# i386 keymaps only.
    1.36 -	for keymap in `cat $stuff/keymaps-path.list`
    1.37 +	for keymap in $(cat $stuff/keymaps-path.list)
    1.38  	do
    1.39 -		cp -a $_pkg/usr/share/kbd/keymaps/i386/$keymap \
    1.40 +		cp -a $install/usr/share/kbd/keymaps/i386/$keymap \
    1.41  			$fs/usr/share/kbd/keymaps/i386/$keymap
    1.42  	done
    1.43  	# Include files
    1.44 -	cp -a $_pkg/usr/share/kbd/keymaps/include \
    1.45 +	cp -a $install/usr/share/kbd/keymaps/include \
    1.46  		$fs/usr/share/kbd/keymaps
    1.47 -	cp -a $_pkg/usr/share/kbd/keymaps/i386/include \
    1.48 +	cp -a $install/usr/share/kbd/keymaps/i386/include \
    1.49  		$fs/usr/share/kbd/keymaps/i386/include
    1.50  }
    1.51  
     2.1 --- a/kbd/receipt	Fri May 25 23:24:13 2012 +0200
     2.2 +++ b/kbd/receipt	Fri May 25 23:26:50 2012 +0200
     2.3 @@ -4,52 +4,55 @@
     2.4  VERSION="1.15.3"
     2.5  CATEGORY="system-tools"
     2.6  SHORT_DESC="Keyboard maping definitions and tools."
     2.7 -BUILD_DEPENDS="flex"
     2.8  MAINTAINER="pankso@slitaz.org"
     2.9  TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.10 -WEB_SITE="http://www.kernel.org/pub/linux/utils/kbd/"
    2.11 -WGET_URL="http://www.kernel.org/pub/linux/utils/kbd/$TARBALL"
    2.12 +WEB_SITE="http://kbd-project.org/"
    2.13 +WGET_URL="http://kbd-project.org/download/$TARBALL"
    2.14  TAGS="keyboard"
    2.15 +HOST_ARCH="i486 arm"
    2.16 +
    2.17 +#BUILD_DEPENDS="flex"
    2.18  
    2.19  # Rules to configure and make the package.
    2.20  compile_rules()
    2.21  {
    2.22  	cd $src
    2.23  	patch -Np1 -i $stuff/fix-es.po.patch
    2.24 -	./configure --datadir=/usr/share/kbd $CONFIGURE_ARGS &&
    2.25 -	make &&
    2.26 -	make install
    2.27 +	./configure \
    2.28 +		--datadir=/usr/share/kbd \
    2.29 +		$CONFIGURE_ARGS &&
    2.30 +	make && make install
    2.31  }
    2.32  
    2.33  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.34  genpkg_rules()
    2.35  {
    2.36  	mkdir -p $fs/usr/share
    2.37 -	
    2.38 -	# Copy all kbd files (should we split fonts ?) and remove the one 
    2.39 +
    2.40 +	# Copy all kbd files (should we split fonts ?) and remove the one
    2.41  	# provided by: kbd-base.
    2.42  	cp -a $_pkg/usr/share/kbd $fs/usr/share
    2.43  	rm -rf $fs/usr/share/kbd/keymaps/i386
    2.44 -	
    2.45 +
    2.46  	# Tools
    2.47 -	cp -a $_pkg/usr/bin $fs/usr
    2.48 +	cp -a $install/usr/bin $fs/usr
    2.49  }
    2.50  
    2.51  # Overlap busybox
    2.52  pre_install()
    2.53  {
    2.54 -	rm -f $1/usr/bin/deallocvt
    2.55 -	rm -f $1/usr/bin/chvt
    2.56 -	rm -f $1/usr/bin/setkeycodes
    2.57 -	rm -f $1/usr/bin/openvt
    2.58 -	rm -f $1/usr/bin/kbd_mode
    2.59 +	rm -f $root/usr/bin/deallocvt
    2.60 +	rm -f $root/usr/bin/chvt
    2.61 +	rm -f $root/usr/bin/setkeycodes
    2.62 +	rm -f $root/usr/bin/openvt
    2.63 +	rm -f $root/usr/bin/kbd_mode
    2.64  }
    2.65  
    2.66  post_remove()
    2.67  {
    2.68 -	ln -s /bin/busybox $1/usr/bin/deallocvt
    2.69 -	ln -s /bin/busybox $1/usr/bin/chvt
    2.70 -	ln -s /bin/busybox $1/usr/bin/setkeycodes
    2.71 -	ln -s /bin/busybox $1/usr/bin/openvt
    2.72 -	ln -s /bin/busybox $1/usr/bin/kbd_mode
    2.73 +	ln -s /bin/busybox $root/usr/bin/deallocvt
    2.74 +	ln -s /bin/busybox $root/usr/bin/chvt
    2.75 +	ln -s /bin/busybox $root/usr/bin/setkeycodes
    2.76 +	ln -s /bin/busybox $root/usr/bin/openvt
    2.77 +	ln -s /bin/busybox $root/usr/bin/kbd_mode
    2.78  }
     3.1 --- a/slitaz-tools/receipt	Fri May 25 23:24:13 2012 +0200
     3.2 +++ b/slitaz-tools/receipt	Fri May 25 23:26:50 2012 +0200
     3.3 @@ -5,12 +5,23 @@
     3.4  CATEGORY="system-tools"
     3.5  SHORT_DESC="SliTaz tools provide installer and utils usable on termnial."
     3.6  MAINTAINER="pankso@slitaz.org"
     3.7 -DEPENDS="slitaz-boot-scripts dialog gettext-base slitaz-configs-base"
     3.8 -BUILD_DEPENDS="gettext"
     3.9  SUGGESTED="slitaz-tools-boxes"
    3.10  TARBALL="$PACKAGE-$VERSION.tar.gz"
    3.11  WEB_SITE="http://www.slitaz.org/"
    3.12  WGET_URL="http://mirror.slitaz.org/sources/tools/$TARBALL"
    3.13 +HOST_ARCH="i486 arm"
    3.14 +
    3.15 +DEPENDS="slitaz-boot-scripts dialog gettext-base slitaz-configs-base"
    3.16 +BUILD_DEPENDS="gettext"
    3.17 +
    3.18 +# Handle multiarch compilation.
    3.19 +case "$ARCH" in
    3.20 +	arm)
    3.21 +		DEPENDS="slitaz-boot-scripts dialog gettext-base"
    3.22 +		BUILD_DEPENDS="" ;;
    3.23 +esac
    3.24 +
    3.25 +# Saved config file by package manager
    3.26  CONFIG_FILES="
    3.27  /etc/TZ
    3.28  /etc/keymap.conf
    3.29 @@ -30,33 +41,29 @@
    3.30  {
    3.31  	mkdir -p $fs
    3.32  	cp -a $install/* $fs
    3.33 -
    3.34  	# Makefile bug in 5.0
    3.35  	cp -a $src/tinyutils/decode $fs/usr/bin
    3.36 -
    3.37  	chmod 0644 $fs/usr/share/locale/*/*/*.mo
    3.38  	chown -R root.root $fs
    3.39  }
    3.40  
    3.41  # Pre install commands.
    3.42 -pre_install()
    3.43 -{
    3.44 - 	local root
    3.45 - 	root=$1
    3.46 +#pre_install()
    3.47 +#{
    3.48  	# Backup file to restore with post install
    3.49 -	echo "Creating backups of configs..."
    3.50 -	cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
    3.51 -	cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
    3.52 -	cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
    3.53 -	cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
    3.54 -}
    3.55 +	#echo "Creating backups of configs..."
    3.56 +	#cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
    3.57 +	#cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
    3.58 +	#cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
    3.59 +	#cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
    3.60 +#}
    3.61  
    3.62  # Post install
    3.63 -post_install()
    3.64 -{
    3.65 -	echo "Restoring configs backups..."
    3.66 -	mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
    3.67 -	mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
    3.68 -	mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
    3.69 -	mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
    3.70 -}
    3.71 +#post_install()
    3.72 +#{
    3.73 +	#echo "Restoring configs backups..."
    3.74 +	#mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
    3.75 +	#mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
    3.76 +	#mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
    3.77 +	#mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
    3.78 +#}