Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xorgtesting.git;a=commitdiff;h=7991b7c59f8c79a7e4db2bf0a8c1712f9edb5a8a

commit 7991b7c59f8c79a7e4db2bf0a8c1712f9edb5a8a
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Sat Sep 5 23:30:21 2009 +0200

hal-0.5.11-10-i686
*overwite the config of /usr/share/hal with /etc/hal
*backup into .install we should the xkb.layout with the locale

diff --git a/source/apps/hal/FrugalBuild b/source/apps/hal/FrugalBuild
index 98a41fa..47ebba9 100644
--- a/source/apps/hal/FrugalBuild
+++ b/source/apps/hal/FrugalBuild
@@ -4,7 +4,7 @@

pkgname=hal
pkgver=0.5.11
-pkgrel=9
+pkgrel=10
pkgdesc="Hardware Abstraction Layer"
url="http://www.freedesktop.org/wiki/Software/hal";
depends=('dbus-glib>=0.74' 'udev>=132' 'util-linux-ng>=2.15' 'glib2' 'libcap' 
'dbus>=1.2.12-4' \
diff --git a/source/apps/hal/hal.install b/source/apps/hal/hal.install
index 5638c5c..99c70e7 100644
--- a/source/apps/hal/hal.install
+++ b/source/apps/hal/hal.install
@@ -16,9 +16,13 @@ post_install()
/usr/sbin/chkconfig --add rc.hald
fi
#for use the good layout
-       layout=`locale | grep LANG | cut -d '=' -f 2 | cut -d '_' -f 1`
-       line=`grep -n 'xkb.layout' 
/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi | cut -d: -f1`
-       sed "$line s/us/$layout/" -i 
/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi
+       #we can't use backup we should patch 
/etc/hal/policy/10osvendor/10-keymap.fdi with the local
+       if [ ! -f /etc/hal/fdi/policy/10osvendor/10-keymap.fdi ]; then
+               mkdir -p /etc/hal/fdi/policy/10osvendor
+               cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi 
/etc/hal/fdi/policy/10osvendor/10-keymap.fdi
+               echo "Update layout keyboard with ${LANG:0:2}"
+               sed -i "/xkb.layout/s/us/${LANG:0:2}/" 
/etc/hal/fdi/policy/10osvendor/10-keymap.fdi
+       fi
}

post_upgrade()
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to