Original keymaps moved to legacy dir, created symlinks to xkb keymaps

This commit is contained in:
Vitezslav Crhonek 2013-05-21 11:14:57 +02:00
parent 6791cb8298
commit fb41a90cc1

View File

@ -1,6 +1,6 @@
Name: kbd Name: kbd
Version: 1.15.5 Version: 1.15.5
Release: 5%{?dist} Release: 6%{?dist}
Summary: Tools for configuring the console (keyboard, virtual terminals, etc.) Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
Group: System Environment/Base Group: System Environment/Base
@ -29,6 +29,8 @@ BuildRequires: bison, flex, gettext, pam-devel
BuildRequires: console-setup, xkeyboard-config BuildRequires: console-setup, xkeyboard-config
Requires: initscripts >= 5.86-1 Requires: initscripts >= 5.86-1
Requires: %{name}-misc = %{version}-%{release} Requires: %{name}-misc = %{version}-%{release}
# Temporarily require -legacy
Requires: %{name}-legacy = %{version}-%{release}
Provides: vlock = %{version} Provides: vlock = %{version}
Conflicts: vlock <= 1.3 Conflicts: vlock <= 1.3
@ -45,6 +47,14 @@ BuildArch: noarch
The %{name}-misc package contains data for kbd package - console fonts, The %{name}-misc package contains data for kbd package - console fonts,
keymaps etc. Please note that %{name}-misc is not helpful without kbd. keymaps etc. Please note that %{name}-misc is not helpful without kbd.
%package legacy
Summary: Legacy data for kbd package
BuildArch: noarch
%description legacy
The %{name}-legacy package contains original keymaps for kbd package.
Please note that %{name}-legacy is not helpful without kbd.
%prep %prep
%setup -q -a 2 -a 3 -a 4 -a 5 %setup -q -a 2 -a 3 -a 4 -a 5
cp -fp %{SOURCE6} . cp -fp %{SOURCE6} .
@ -118,6 +128,10 @@ ln -s openvt $RPM_BUILD_ROOT%{_bindir}/open
cp -r $RPM_BUILD_ROOT/lib/kbd/locale/ $RPM_BUILD_ROOT%{_datadir}/locale cp -r $RPM_BUILD_ROOT/lib/kbd/locale/ $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT/lib/kbd/locale rm -rf $RPM_BUILD_ROOT/lib/kbd/locale
# Move original keymaps to legacy directory
mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/legacy
mv $RPM_BUILD_ROOT/lib/kbd/keymaps/{amiga,atari,i386,include,mac,ppc,sun} $RPM_BUILD_ROOT/lib/kbd/keymaps/legacy
# Convert X keyboard layouts to console keymaps # Convert X keyboard layouts to console keymaps
mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb
perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst
@ -127,6 +141,71 @@ while read line; do
ckbcomp "$XKBLAYOUT" "$XKBVARIANT" | gzip > $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz ckbcomp "$XKBLAYOUT" "$XKBVARIANT" | gzip > $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz
done < layouts-variants.lst done < layouts-variants.lst
# Create symbolic links from the old keymap names to the matching(?) entries of the X11 keymaps
mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz
mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty
mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/azerty
mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/dvorak
ln -s /lib/kbd/keymaps/xkb/ch-de_nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/sg.map.gz
ln -s /lib/kbd/keymaps/xkb/nl-std.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/nl.map.gz
ln -s /lib/kbd/keymaps/xkb/mk-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/mk-utf.map.gz
ln -s /lib/kbd/keymaps/xkb/tr-intl.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/trq.map.gz
ln -s /lib/kbd/keymaps/xkb/gb-intl.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/uk.map.gz
ln -s /lib/kbd/keymaps/xkb/is-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/is-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/de-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/de.map.gz
ln -s /lib/kbd/keymaps/xkb/latam-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/la-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/us-intl.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/us.map.gz
ln -s /lib/kbd/keymaps/xkb/kr-kr104.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/ko.map.gz
ln -s /lib/kbd/keymaps/xkb/de-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/de-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/si-us.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/slovene.map.gz
ln -s /lib/kbd/keymaps/xkb/hu-qwerty.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/hu101.map.gz
ln -s /lib/kbd/keymaps/xkb/jp-kana.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/jp106.map.gz
ln -s /lib/kbd/keymaps/xkb/hr-us.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/croat.map.gz
ln -s /lib/kbd/keymaps/xkb/fi-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/fi-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/it-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/it2.map.gz
ln -s /lib/kbd/keymaps/xkb/hu-standard.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/hu.map.gz
ln -s /lib/kbd/keymaps/xkb/rs-latin.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/sr-latin.map.gz
ln -s /lib/kbd/keymaps/xkb/fi-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/fi.map.gz
ln -s /lib/kbd/keymaps/xkb/ch-fr.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/fr_CH.map.gz
ln -s /lib/kbd/keymaps/xkb/dk-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/dk-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/fr-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/azerty/fr.map.gz
ln -s /lib/kbd/keymaps/xkb/it-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/it.map.gz
ln -s /lib/kbd/keymaps/xkb/ua-legacy.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/ua-utf.map.gz
ln -s /lib/kbd/keymaps/xkb/fr-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/azerty/fr-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/ch-de_nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/sg-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/be-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/azerty/be-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/dk-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/dk.map.gz
ln -s /lib/kbd/keymaps/xkb/fr-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/azerty/fr-pc.map.gz
ln -s /lib/kbd/keymaps/xkb/bg-phonetic.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/bg_pho-utf8.map.gz
ln -s /lib/kbd/keymaps/xkb/it-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/it-ibm.map.gz
ln -s /lib/kbd/keymaps/xkb/cz-ucw.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/cz-us-qwertz.map.gz
ln -s /lib/kbd/keymaps/xkb/br-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/br-abnt2.map.gz
ln -s /lib/kbd/keymaps/xkb/ro-std.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/ro.map.gz
ln -s /lib/kbd/keymaps/xkb/us-intl.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/us-acentos.map.gz
ln -s /lib/kbd/keymaps/xkb/pt-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/pt-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/de-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz
ln -s /lib/kbd/keymaps/xkb/no-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/no.map.gz
ln -s /lib/kbd/keymaps/xkb/bg-bas_phonetic.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/bg_bds-utf8.map.gz
ln -s /lib/kbd/keymaps/xkb/us-dvorak.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/dvorak/dvorak.map.gz
ln -s /lib/kbd/keymaps/xkb/ru-legacy.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/ru.map.gz
ln -s /lib/kbd/keymaps/xkb/cz-qwerty.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/cz-lat2.map.gz
ln -s /lib/kbd/keymaps/xkb/pl-csb.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/pl2.map.gz
ln -s /lib/kbd/keymaps/xkb/es-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/es.map.gz
ln -s /lib/kbd/keymaps/xkb/ee-us.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/et.map.gz
ln -s /lib/kbd/keymaps/xkb/sk-qwerty.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/sk-qwerty.map.gz
ln -s /lib/kbd/keymaps/xkb/fr-latin9.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/azerty/fr-latin9.map.gz
ln -s /lib/kbd/keymaps/xkb/ch-fr.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwertz/fr_CH-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/ca-fr-legacy.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/cf.map.gz
ln -s /lib/kbd/keymaps/xkb/se-nodeadkeys.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/sv-latin1.map.gz
ln -s /lib/kbd/keymaps/xkb/rs-latin.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/sr-cy.map.gz
ln -s /lib/kbd/keymaps/xkb/gr-simple.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/gr.map.gz
ln -s /lib/kbd/keymaps/xkb/by-latin.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/by.map.gz
ln -s /lib/kbd/keymaps/xkb/il-phonetic.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/il.map.gz
ln -s /lib/kbd/keymaps/xkb/kz-kazrus.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/kazakh.map.gz
ln -s /lib/kbd/keymaps/xkb/lt-std.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/lt.map.gz
# defkeymap
ln -s /lib/kbd/keymaps/xkb/us-intl.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/defkeymap.map.gz
%find_lang %{name} %find_lang %{name}
%files -f %{name}.lang %files -f %{name}.lang
@ -137,8 +216,15 @@ done < layouts-variants.lst
%files misc %files misc
/lib/kbd /lib/kbd
%exclude /lib/kbd/keymaps/legacy
%files legacy
/lib/kbd/keymaps/legacy
%changelog %changelog
* Tue May 21 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.15.5-6
- Original keymaps moved to legacy dir, created symlinks to xkb keymaps
* Thu Feb 21 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.15.5-5 * Thu Feb 21 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.15.5-5
- Fix decimal separator in Swiss German keyboard layout - Fix decimal separator in Swiss German keyboard layout
Resolves: #882529 Resolves: #882529