diff --git a/cz-map.patch b/cz-map.patch new file mode 100644 index 0000000000000000000000000000000000000000..5e65d0f470a0db90698e45195cb137b196a4b34d --- /dev/null +++ b/cz-map.patch @@ -0,0 +1,61 @@ +--- cz.map.orig 2016-10-11 13:11:15.000000000 +0200 ++++ cz.map 2016-10-11 13:12:03.093565772 +0200 +@@ -39,7 +39,7 @@ + keycode 38 = +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+006c +U+004c +U+0141 +U+0141 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l +U+004c +U+006c +U+0142 +U+0142 Control_l Control_l Control_l Control_l Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l + keycode 39 = +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016f U+0022 U+0024 dead_doubleacute +U+016f U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar +U+016e U+0022 U+0024 dead_doubleacute +U+016e U+0022 U+0024 dead_doubleacute Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar Meta_quotedbl Meta_quotedbl Meta_dollar Meta_dollar + keycode 40 = U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+00df U+00a7 U+0021 U+0027 +U+00df Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+0053 U+00a7 U+0021 U+0027 +U+0053 Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+0053 U+00a7 U+0021 U+0027 +U+0053 Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+0053 U+00a7 U+0021 U+0027 +U+0053 Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe U+00a7 U+0021 U+0027 +U+0053 U+00a7 U+0021 U+0027 +U+0053 Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe Meta_exclam Meta_exclam Meta_apostrophe Meta_apostrophe +-keycode 41 = U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum ++keycode 41 = U+003b dead_grave U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum U+003b U+00b0 U+0060 U+007e nul Control_asciicircum nul Control_asciicircum Meta_semicolon Meta_semicolon Meta_grave Meta_asciitilde Meta_nul Meta_Control_asciicircum Meta_nul Meta_Control_asciicircum + keycode 42 = Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift Shift + keycode 43 = dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash dead_diaeresis U+0027 U+005c U+007c Control_backslash Control_backslash Control_backslash Control_backslash Meta_apostrophe Meta_apostrophe Meta_backslash Meta_bar Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash + keycode 44 = +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0079 +U+0059 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +U+0059 +U+0079 U+00b0 U+003c Control_y Control_y Control_y Control_y Meta_y Meta_Y Meta_less Meta_less Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y +@@ -108,3 +108,49 @@ + keycode 127 = VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol + keycode 121 = KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period KP_Period + strings as usual ++# dead_grave ++compose '`' 'u' to U+016F ++compose '`' 'U' to U+016E ++compose '`' 'z' to U+00B0 ++compose '`' 'Z' to U+00B0 ++# dead_acute ++compose '\'' 'a' to U+00E1 ++compose '\'' 'A' to U+00C1 ++compose '\'' 'e' to U+00E9 ++compose '\'' 'E' to U+00C9 ++compose '\'' 'i' to U+00ED ++compose '\'' 'I' to U+00CD ++compose '\'' 'o' to U+00F3 ++compose '\'' 'O' to U+00D3 ++compose '\'' 'u' to U+00FA ++compose '\'' 'U' to U+00DA ++compose '\'' 'y' to U+00FD ++compose '\'' 'Y' to U+00DD ++# dead_caron ++compose '^' 'u' to U+016F ++compose '^' 'U' to U+016E ++compose '^' 'c' to U+010D ++compose '^' 'C' to U+010C ++compose '^' 'd' to U+010F ++compose '^' 'D' to U+010E ++compose '^' 'e' to U+011B ++compose '^' 'E' to U+011A ++compose '^' 'n' to U+0148 ++compose '^' 'N' to U+0147 ++compose '^' 'r' to U+0159 ++compose '^' 'R' to U+0158 ++compose '^' 's' to U+0161 ++compose '^' 'S' to U+0160 ++compose '^' 't' to U+0165 ++compose '^' 'T' to U+0164 ++compose '^' 'z' to U+017E ++compose '^' 'Z' to U+017D ++# dead_diaeresis ++compose '"' 'a' to U+00E4 ++compose '"' 'A' to U+00C4 ++compose '"' 'e' to U+00EB ++compose '"' 'E' to U+00CB ++compose '"' 'o' to U+00F6 ++compose '"' 'O' to U+00D6 ++compose '"' 'u' to U+00FC ++compose '"' 'U' to U+00DC diff --git a/kbd-latarcyrheb-32.tar.bz2 b/kbd-latarcyrheb-32.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..5edeec45f9b0ada9c353319d4dda7923e02bdbed Binary files /dev/null and b/kbd-latarcyrheb-32.tar.bz2 differ diff --git a/kbd-latsun-fonts.tar.bz2 b/kbd-latsun-fonts.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..de318fa0847992cdeb0499f52be45df485d506e3 Binary files /dev/null and b/kbd-latsun-fonts.tar.bz2 differ diff --git a/kbd.spec b/kbd.spec index 33a623a11578c8eaebf5467b7fc55c434c7c4814..21c83d428b0b80560f0ab6bd95bc7ea561378362 100644 --- a/kbd.spec +++ b/kbd.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 # {_exec_prefix}/lib/kbd is correct even on x86_64. # It is traditionally used for kdb data (console fonts, keymaps, ...). # It is not used for any shared objects/executables. @@ -12,6 +12,10 @@ License: GPLv2+ URL: http://www.kbd-project.org/ Source0: https://mirrors.edge.kernel.org/pub/linux/utils/kbd/kbd-2.4.0.tar.xz +Source1: kbd-latsun-fonts.tar.bz2 +Source2: kbd-latarcyrheb-32.tar.bz2 +Source3: xml2lst.pl +Source4: cz-map.patch Patch1: 0001-adds-xkb-and-legacy-keymaps-subdirs-to-loadkyes-sear.patch Patch2: 0002-unicode_start-init-from-etc-vconsole.conf.patch @@ -45,7 +49,13 @@ The %{name}-legacy package contains original keymaps for kbd package. Please note that %{name}-legacy is not helpful without kbd. %prep -%autosetup -p1 +%setup -q -a 1 -a 2 +cp -fp %{SOURCE3} . +cp -fp %{SOURCE4} . + +%patch1 -p1 +%patch2 -p1 + aclocal autoconf @@ -100,6 +110,16 @@ sed -i -e 's,\,%{_bindir}/kbd_mode,g;s,\,%{_bindir}/setfont mkdir -p $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/legacy mv $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/{amiga,atari,i386,include,mac,ppc,sun} $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/legacy +# Convert X keyboard layouts to console keymaps +mkdir -p $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb +perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst +while read line; do + XKBLAYOUT=`echo "$line" | cut -d " " -f 1` + echo "$XKBLAYOUT" >> layouts-list.lst + XKBVARIANT=`echo "$line" | cut -d " " -f 2` + ckbcomp -rules base "$XKBLAYOUT" "$XKBVARIANT" | gzip > $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz +done < layouts-variants.lst + # Convert X keyboard layouts (plain, no variant) cat layouts-list.lst | sort -u >> layouts-list-uniq.lst while read line; do @@ -109,11 +129,11 @@ done < layouts-list-uniq.lst # wipe converted layouts which cannot input ASCII (#1031848) zgrep -L "U+0041" $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/* | xargs rm -f -# Rename the converted default fi (kotoistus) layout (#1117891), if exists -if [ -f "$RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map.gz" ]; then - gunzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map.gz - mv $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map - gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map +# Fix converted cz layout - add compose rules, if exists +if [ -f "$RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map.gz" ]; then + gunzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map.gz + patch $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map < %{SOURCE4} + gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map fi %find_lang %{name} @@ -139,7 +159,10 @@ make check %{kbd_datadir}/keymaps/legacy %changelog -* Mon Mar 28 2022 Chunmei Xu - 2.4.0-1 +* Mon Mar 28 2022 Chunmei Xu - 2.4.0-3 +- add xkb keymaps + +* Mon Mar 28 2022 Chunmei Xu - 2.4.0-2 - adds xkb and legacy keymaps subdirs to loadkyes search path - unicode_start init from /etc/vconsole.conf diff --git a/xml2lst.pl b/xml2lst.pl new file mode 100644 index 0000000000000000000000000000000000000000..96cf01e9d3da9dafc68a05e7bfc0696022bd2213 --- /dev/null +++ b/xml2lst.pl @@ -0,0 +1,231 @@ +#!/usr/bin/perl + +# converts the .xml file to the old format .lst file +# +# Usage: +# +# perl xml2lst.pl < filename.xml > filename.lst +# +# author Ivan Pascal +# modified by Vitezslav Crhonek + +$doc = new_document( 0, ''); +parse('', $doc); + +($reg) = node_by_name($doc, '/xkbConfigRegistry'); +@models = node_by_name($reg, 'modelList/model/configItem'); +@layouts = node_by_name($reg, 'layoutList/layout/configItem'); +@options = node_by_name($reg, 'optionList/group/configItem'); + +for $i (@layouts) { + ($name) = node_by_name($i, 'name'); + @variants = node_by_name($i, '../variantList/variant/configItem'); + for $v (@variants) { + ($variant) = node_by_name($v, 'name'); + printf("%s %s\n", text_child($name), text_child($variant)); + } +} + +sub with_attribute { + local ($nodelist, $attrexpr) = @_; + local ($attr, $value) = split (/=/, $attrexpr); + local ($node, $attrvalue); + if (defined $value && $value ne '') { + $value =~ s/"//g; + foreach $node (@{$nodelist}) { + $attrvalue = node_attribute($node, $attr); + if (defined $attrvalue && $attrvalue eq $value) { + return $node; + } + } + } else { + foreach $node (@{$nodelist}) { + if (! defined node_attribute($node, $attr)) { + return $node; + } + } + } + undef; +} + +# Subroutines + +sub parse { + local $intag = 0; + my (@node_stack, $parent); + $parent = @_[1]; + local ($tag, $text); + + while (<>) { + chomp; + @str = split /([<>])/; + shift @str if ($str[0] eq '' || $str[0] =~ /^[ \t]*$/); + + while (scalar @str) { + $token = shift @str; + if ($token eq '<') { + $intag = 1; + if (defined $text) { + add_text_node($parent, $text); + undef $text; + } + } elsif ($token eq '>') { + $intag = 0; + if ($tag =~ /^\/(.*)/) { # close tag + $parent = pop @node_stack; + } elsif ($tag =~ /^([^\/]*)\/$/) { + empty_tag($parent, $1); + } else { + if (defined ($node = open_tag($parent, $tag))) { + push @node_stack, $parent; + $parent = $node; + } + } + undef $tag; + } else { + if ($intag == 1) { + if (defined $tag) { + $tag .= ' '. $token; + } else { + $tag = $token; + } + } else { + if (defined $text) { + $text .= "\n" . $token; + } else { + $text = $token; + } + } + } + } + } +} + +sub new_document { + $doc = new_node( 0, '', 'DOCUMENT'); + $doc->{CHILDREN} = []; + return $doc; +} + +sub new_node { + local ($parent_node, $tag, $type) = @_; + + my %node; + $node{PARENT} = $parent_node; + $node{TYPE} = $type; + + if ($type eq 'COMMENT' || $type eq 'TEXT') { + $node{TEXT} = $tag; + $node{NAME} = $type; + return \%node; + } + + local ($tname, $attr) = split(' ', $tag, 2); + $node{NAME} = $tname; + + if (defined $attr && $attr ne '') { + my %attr_table; + local @attr_list = split ( /"/, $attr); + local ($name, $value); + while (scalar @attr_list) { + $name = shift @attr_list; + $name =~ s/[ =]//g; + next if ($name eq ''); + $value = shift @attr_list; + $attr_table{$name} =$value; + } + $node{ATTRIBUTES} = \%attr_table; + } + return \%node; +} + +sub add_node { + local ($parent_node, $node) = @_; + push @{$parent_node->{CHILDREN}}, $node; + + local $tname = $node->{NAME}; + if (defined $parent_node->{$tname}) { + push @{$parent_node->{$tname}}, $node + } else { + $parent_node->{$tname} = [ $node ]; + } +} + +sub empty_tag { + local ($parent_node, $tag) = @_; + local $node = new_node($parent_node, $tag, 'EMPTY'); + add_node($parent_node, $node); +} + +sub open_tag { + local ($parent_node, $tag) = @_; + local $node; + + if ($tag =~ /^\?.*/ || $tag =~ /^\!.*/) { + $node = new_node($parent_node, $tag, 'COMMENT'); + add_node($parent_node, $node); + undef; return; + } else { + $node = new_node($parent_node, $tag, 'NODE'); + $node->{CHILDREN} = []; + add_node($parent_node, $node); + return $node; + } +} + +sub add_text_node { + local ($parent_node, $text) = @_; + local $node = new_node($parent_node, $text, 'TEXT'); + add_node($parent_node, $node); +} + +sub node_by_name { + local ($node, $name) = @_; + local ($tagname, $path) = split(/\//, $name, 2); + + my @nodelist; + + if ($tagname eq '') { + while ($node->{PARENT} != 0) { + $node = $node->{PARENT}; + } + sublist_by_name($node, $path, \@nodelist); + } else { + sublist_by_name($node, $name, \@nodelist); + } + return @nodelist; +} + +sub sublist_by_name { + local ($node, $name, $res) = @_; + local ($tagname, $path) = split(/\//, $name, 2); + + if (! defined $path) { + push @{$res}, (@{$node->{$tagname}}); + return; + } + + if ($tagname eq '..' && $node->{PARENT} != 0) { + $node = $node->{PARENT}; + sublist_by_name($node, $path, $res); + } else { + local $n; + for $n (@{$node->{$tagname}}) { + sublist_by_name($n, $path, $res); + } + } +} + +sub node_attribute { + local $node = @_[0]; + if (defined $node->{ATTRIBUTES}) { + return $node->{ATTRIBUTES}{@_[1]}; + } + undef; +} + +sub text_child { + local ($node) = @_; + local ($child) = node_by_name($node, 'TEXT'); + return $child->{TEXT}; +}