kbd-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. %global convert_xkb 0
  2. Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
  3. Summary(ja): コンソール(キーボードや仮想ターミナル等)を設定するツール群
  4. Name: kbd
  5. Version: 2.0.4
  6. Release: 1%{?_dist_release}
  7. License: GPL
  8. Group: System Environment/Base
  9. Source0: https://www.kernel.org/pub/linux/utils/kbd/kbd-%{version}.tar.xz
  10. Source1: kbd-latsun-fonts.tar.bz2
  11. Source2: kbd-latarcyrheb-32.tar.bz2
  12. Source3: xml2lst.pl
  13. Source4: vlock.pamd
  14. Source5: kbdinfo.1
  15. Source6: cz-map.patch
  16. Requires: pam >= 0.66-4, /etc/pam.d/system-auth, usermode
  17. BuildRequires: bison, flex, gettext, pam-devel
  18. %if 0%{convert_xkb}
  19. BuildRequires: console-setup
  20. %endif
  21. BuildRoot: %{_tmppath}/%{name}-root
  22. # Patch0: puts additional information into man pages
  23. Patch0: kbd-1.15-keycodes-man.patch
  24. # Patch1: sparc modifications
  25. Patch1: kbd-1.15-sparc.patch
  26. # Patch2: adds default unicode font to unicode_start script
  27. Patch2: kbd-1.15-unicode_start.patch
  28. # Patch3: add missing dumpkeys option to man page
  29. Patch3: kbd-1.15.3-dumpkeys-man.patch
  30. # Patch4: fixes decimal separator in Swiss German keyboard layout, bz 882529
  31. Patch4: kbd-1.15.5-sg-decimal-separator.patch
  32. # Patch5: adds xkb and legacy keymaps subdirs to loadkyes search path, bz 1028207
  33. Patch5: kbd-1.15.5-loadkeys-search-path.patch
  34. # Patch6: don't hardcode font used in unicode_start, take it from vconsole.conf,
  35. # bz 1101007
  36. Patch6: kbd-2.0.2-unicode-start-font.patch
  37. Obsoletes: console-tools open
  38. Provides: console-tools open
  39. Conflicts: util-linux < 2.11r-9
  40. Requires(pre): initscripts >= 5.86-1
  41. ExcludeArch: s390 s390x
  42. Vendor: Project Vine
  43. Distribution: Vine Linux
  44. %description
  45. The %{name} package contains tools for managing a Linux
  46. system's console's behavior, including the keyboard, the screen
  47. fonts, the virtual terminals and font files.
  48. %prep
  49. %setup -q -a 1 -a 2
  50. cp -fp %{SOURCE3} .
  51. cp -fp %{SOURCE6} .
  52. %patch0 -p1 -b .keycodes-man
  53. %patch1 -p1 -b .sparc
  54. %patch2 -p1 -b .unicode_start
  55. %patch3 -p1 -b .dumpkeys-man
  56. %patch4 -p1 -b .sg-decimal-separator
  57. %if 0%{convert_xkb}
  58. %patch5 -p1 -b .loadkeys-search-path
  59. %endif
  60. %patch6 -p1 -b .unicode-start-font
  61. # 7-bit maps are obsolete; so are non-euro maps
  62. pushd data/keymaps/i386
  63. cp qwerty/pt-latin9.map qwerty/pt.map
  64. cp qwerty/sv-latin1.map qwerty/se-latin1.map
  65. mv azerty/fr.map azerty/fr-old.map
  66. cp azerty/fr-latin9.map azerty/fr.map
  67. cp azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias
  68. # Rename conflicting keymaps
  69. mv dvorak/no.map dvorak/no-dvorak.map
  70. mv fgGIod/trf.map fgGIod/trf-fgGIod.map
  71. mv olpc/es.map olpc/es-olpc.map
  72. mv olpc/pt.map olpc/pt-olpc.map
  73. mv qwerty/cz.map qwerty/cz-qwerty.map
  74. popd
  75. # remove obsolete "gr" translation
  76. pushd po
  77. rm -f gr.po gr.gmo
  78. popd
  79. # Convert to utf-8
  80. iconv -f iso-8859-1 -t utf-8 < "ChangeLog" > "ChangeLog_"
  81. mv "ChangeLog_" "ChangeLog"
  82. %build
  83. export OLD_PO_FILE_INPUT=yes
  84. # We don't use % {configure} because the ./configure included here does not
  85. # understand most of the options.
  86. CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
  87. #./configure --prefix=%{_prefix} --datadir=/lib/kbd --mandir=%{_mandir}
  88. %configure --prefix=%{_prefix} --datadir=/lib/kbd --mandir=%{_mandir} --localedir=%{_datadir}/locale --enable-nls
  89. make %{?_smp_mflags}
  90. %install
  91. rm -rf $RPM_BUILD_ROOT
  92. # Basic install.
  93. make install DESTDIR=$RPM_BUILD_ROOT
  94. # Create additional name for Serbian latin keyboard
  95. ln -s sr-cy.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/sr-latin.map.gz
  96. # The rhpl keyboard layout table is indexed by kbd layout names, so we need a
  97. # Korean keyboard
  98. ln -s us.map.gz $RPM_BUILD_ROOT/lib/kbd/keymaps/i386/qwerty/ko.map.gz
  99. # Move binaries which we use before /usr is mounted from %{_bindir} to /bin.
  100. mkdir -p $RPM_BUILD_ROOT/bin
  101. for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop loadkeys ; do
  102. mv $RPM_BUILD_ROOT%{_bindir}/$binary $RPM_BUILD_ROOT/bin/
  103. done
  104. # Some microoptimization
  105. sed -i -e 's,\<kbd_mode\>,/bin/kbd_mode,g;s,\<setfont\>,/bin/setfont,g' \
  106. $RPM_BUILD_ROOT/bin/unicode_start
  107. # Link open to openvt
  108. ln -s openvt $RPM_BUILD_ROOT%{_bindir}/open
  109. ln -s openvt.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/open.1.gz
  110. # install kbdinfo manpage
  111. gzip -c %SOURCE5 > $RPM_BUILD_ROOT/%{_mandir}/man1/kbdinfo.1.gz
  112. # Move locale files to correct place
  113. cp -r $RPM_BUILD_ROOT/lib/kbd/locale/ $RPM_BUILD_ROOT%{_datadir}/locale
  114. rm -rf $RPM_BUILD_ROOT/lib/kbd/locale
  115. # Install PAM configuration for vlock
  116. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
  117. install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/vlock
  118. %if 0%{convert_xkb}
  119. # Move original keymaps to legacy directory
  120. mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/legacy
  121. mv $RPM_BUILD_ROOT/lib/kbd/keymaps/{amiga,atari,i386,include,mac,ppc,sun} $RPM_B
  122. UILD_ROOT/lib/kbd/keymaps/legacy
  123. # Convert X keyboard layouts to console keymaps
  124. mkdir -p $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb
  125. perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst
  126. while read line; do
  127. XKBLAYOUT=`echo "$line" | cut -d " " -f 1`
  128. echo "$XKBLAYOUT" >> layouts-list.lst
  129. XKBVARIANT=`echo "$line" | cut -d " " -f 2`
  130. ckbcomp "$XKBLAYOUT" "$XKBVARIANT" | gzip > $RPM_BUILD_ROOT/lib/kbd/keymaps/xk
  131. b/"$XKBLAYOUT"-"$XKBVARIANT".map.gz
  132. done < layouts-variants.lst
  133. # Convert X keyboard layouts (plain, no variant)
  134. cat layouts-list.lst | sort -u >> layouts-list-uniq.lst
  135. while read line; do
  136. ckbcomp "$line" | gzip > $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/"$line".map.gz
  137. done < layouts-list-uniq.lst
  138. # wipe converted layouts which cannot input ASCII (#1031848)
  139. zgrep -L "U+0041" $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/* | xargs rm -f
  140. # Rename the converted default fi (kotoistus) layout (#1117891)
  141. gunzip $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/fi.map.gz
  142. mv $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/fi.map $RPM_BUILD_ROOT/lib/kbd/keymaps/xk
  143. b/fi-kotoistus.map
  144. gzip $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/fi-kotoistus.map
  145. # Fix converted cz layout - add compose rules
  146. gunzip $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/cz.map.gz
  147. patch $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/cz.map < %{SOURCE6}
  148. gzip $RPM_BUILD_ROOT/lib/kbd/keymaps/xkb/cz.map
  149. %endif
  150. %find_lang %{name}
  151. %clean
  152. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  153. %triggerun -- kbd < 1.08-10.2
  154. /sbin/chkconfig --del keytable || :
  155. %files -f %{name}.lang
  156. %defattr(-,root,root)
  157. %doc ChangeLog AUTHORS README COPYING docs/doc/kbd.FAQ*.html docs/doc/font-formats/*.html docs/doc/utf/utf* docs/doc/dvorak/*
  158. /bin/*
  159. %{_bindir}/*
  160. %{_mandir}/*/*
  161. /lib/kbd
  162. %config(noreplace) %{_sysconfdir}/pam.d/vlock
  163. %changelog
  164. * Sun Sep 24 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.4-1
  165. - new upstream release.
  166. * Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12-22
  167. - rebuild with VineSeed environment
  168. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.12-21vl5
  169. - applied new versioning policy, spec in utf-8
  170. * Sun May 20 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12-21vl1
  171. - initial build for Vine Linux based on Fedora package.
  172. * Tue Jan 9 2007 Miloslav Trmac <mitr@redhat.com> - 1.12-21
  173. - Add a "ko" (Korean) keyboard layout, equivalent to the "us" layout
  174. Resolves: #220151
  175. * Thu Dec 7 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-20
  176. - Document that setkeycodes doesn't affect USB keyboards and that the kernel
  177. doesn't provide the raw scan codes by default
  178. Resolves: #211803
  179. * Tue Oct 31 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-19
  180. - Ship "el" translation instead of the obsolete "gr" translation
  181. Resolves: #210749
  182. - Fix %% quoting in %%changelog
  183. * Fri Sep 29 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-18
  184. - Add a missing tilde to U+00E3 in latarcyrheb-sun16.psfu (#204470)
  185. * Fri Jul 14 2006 Jesse Keating <jkeating@redhat.com> - 1.12-17
  186. - Obsoletes/Provides open
  187. - Create a symlink from open to openvt
  188. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.12-16.1
  189. - rebuild
  190. * Sun Jul 9 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-16
  191. - Don't include <asm/kbdio.h> on SPARC (#198040, patch by Dennis Gilmore
  192. <dennis@ausil.us>)
  193. * Mon May 29 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-15
  194. - Fix missing BuildRequires (#193406)
  195. * Mon Mar 27 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-14
  196. - Don't install resizecons.8 on non-x86 (#186877, patch by Keiichi Mori
  197. <kmori@redhat.com>)
  198. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.12-13.2
  199. - bump again for double-long bug on ppc(64)
  200. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.12-13.1
  201. - rebuilt for new gcc4.1 snapshot and glibc changes
  202. * Fri Jan 20 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-13
  203. - Fix build with new coreutils
  204. - Hardcode paths in unicode_start to avoid a few file lookups (#178329)
  205. - Drop unnecessary Prereq: sed mktemp
  206. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  207. - rebuilt
  208. * Thu Dec 1 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-12
  209. - Don't reload the keymap in unicode_start (#172425)
  210. * Fri Nov 11 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-11
  211. - Don't ship character set lists (they are already in glibc-common) and an
  212. obsolete copy of kbd.FAQ
  213. * Fri May 20 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-10
  214. - Don't attempt to open directories as source files (#141634, original patch by
  215. Paul Nasrat)
  216. * Tue May 17 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-9
  217. - Fix another violation of C aliasing rules (#157720, patch by Jan Kratochvil)
  218. * Sat Mar 12 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-8
  219. - Fix violation of C aliasing rules (#150440)
  220. * Sun Mar 6 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-7
  221. - Don't run ldconfig
  222. - Don't strip executables
  223. * Fri Mar 4 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-6
  224. - Rebuild with gcc4
  225. * Sun Feb 20 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-5
  226. - Put "Meta_acute" back in German keymaps, just ignore it in (loadkeys -u)
  227. (patch by Jochen Schmitt)
  228. - Don't ship patch backup files, simpler way
  229. * Sat Feb 19 2005 Miloslav Trmac <mitr@redhat.com> - 1.12-4
  230. - Don't ship a patch backup file
  231. - Mention in setfont.8 that 512-glyph fonts reduce the number of available
  232. colors (#140935, patch by Dmitry Butskoj)
  233. - Remove "Meta_acute" from German keymaps (#143124)
  234. - Make the %%triggerun script condition more precise, ignore failure of the
  235. script
  236. * Mon Feb 14 2005 Adrian Havill <havill@redhat.com>
  237. - rebuilt
  238. * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
  239. - rebuilt
  240. * Thu Feb 26 2004 Adrian Havill <havill@redhat.com>
  241. - update to 1.12
  242. * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
  243. - rebuilt
  244. * Wed Jan 14 2004 Bill Nottingham <notting@redhat.com> 1.08-12
  245. - remove speakup patch at request of author
  246. * Fri Oct 10 2003 Bill Nottingham <notting@redhat.com> 1.08-11
  247. - remove keytable init script (#106783)
  248. * Tue Aug 12 2003 Adrian Havill <havill@rtedhat.com> 1.08-10.1
  249. - bump for RHEL
  250. * Tue Aug 12 2003 Adrian Havill <havill@rtedhat.com> 1.08-10
  251. - apply the rukbd patch (#78218)
  252. * Thu Jul 31 2003 Adrian Havill <havill@redhat.com> 1.08-9
  253. - don't print "plus before..." warnings about non-supported capslock
  254. in unimode <Andries.Brouwer@cwi.nl> (#81855)
  255. * Wed Jul 30 2003 Adrian Havill <havill@redhat.com> 1.08-8
  256. - replaced Russian keyboard map with working UTF-8 equivalent (#79338)
  257. * Thu Jul 24 2003 Adrian Havill <havill@redhat.com> 1.08-7
  258. - make euro/latin-9 the default instead of latin-1 and 7-bit (#97013)
  259. - fix swedish keymap; se, not sv (#88791)
  260. - add fr-latin0 legacy alias of fr-latin-9 (#88324)
  261. - add ".map" ext to filename param of init script (#90562)
  262. * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
  263. - rebuilt
  264. * Thu Mar 06 2003 Florian La Roche <Florian.LaRoche@redhat.de>
  265. - build new rpm
  266. * Fri Feb 21 2003 Florian La Roche <Florian.LaRoche@redhat.de>
  267. - ExcludeArch mainframe
  268. * Thu Jan 30 2003 Bill Nottingham <notting@redhat.com> 1.08-4
  269. - remove condrestart from initscript
  270. * Wed Jan 22 2003 Tim Powers <timp@redhat.com>
  271. - rebuilt
  272. * Fri Dec 6 2002 Nalin Dahyabhai <nalin@redhat.com> 1.08-2
  273. - only output terminal unicode init sequence if both stdout and stderr are
  274. connected to terminals, so that it doesn't show up when script outputs
  275. get piped to files
  276. * Fri Nov 22 2002 Nalin Dahyabhai <nalin@redhat.com> 1.08-1
  277. - update to 1.08
  278. - drop updates which went mainline
  279. * Mon Nov 11 2002 Nalin Dahyabhai <nalin@redhat.com> 1.06-27
  280. - add detached signature
  281. - remove directory names from PAM configuration so that the same config file
  282. can be used for any arch on multilib systems
  283. * Wed Sep 4 2002 Bill Nottingham <notting@redhat.com> 1.06-26
  284. - don't munge /etc/sysconfig/i18n
  285. * Tue Sep 3 2002 Bill Nottingham <notting@redhat.com> 1.06-25
  286. - don't run setsysfont in upgrade trigger on console-tools
  287. * Thu Aug 29 2002 Jakub Jelinek <jakub@redhat.com> 1.06-24
  288. - use cyr-sun16 cyrillic chars in latarcyrheb-sun16 font
  289. instead of old LatArCyrHeb-16 chars
  290. - add Euro character to latarcyrheb-sun16
  291. - use latarcyrheb-sun16 by default in unicode_start script
  292. * Tue Aug 27 2002 Jakub Jelinek <jakub@redhat.com> 1.06-23
  293. - add back lat[02]-sun16 fonts plus latarcyrheb-sun16 font
  294. * Thu Aug 22 2002 Karsten Hopp <karsten@redhat.de>
  295. - needs to conflict with older util-linux packages
  296. (kbdrate moved between packages)
  297. * Tue Aug 13 2002 Bill Nottingham <notting@redhat.com> 1.06-21
  298. - remove Evil Hack in favor of slightly-less-evil-hack in initscripts
  299. * Tue Jul 9 2002 Bill Nottingham <notting@redhat.com> 1.06-20
  300. - fix speakup keymap names
  301. * Tue Jul 09 2002 Phil Knirsch <pknirsch@redhat.com> 1.06-19
  302. - Evil hack to make setfont work correctly on all consoles (#68018)
  303. * Thu Jun 27 2002 Bill Nottingham <notting@redhat.com> 1.06-18
  304. - move unicode_stop to /bin too
  305. - fix path to loadkeys in keytable.init
  306. - add in speakup keymaps
  307. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  308. - automated rebuild
  309. * Tue Jun 11 2002 Nalin Dahyabhai <nalin@redhat.com> 1.06-16
  310. - fix incorrect path in console.apps configuration file
  311. * Thu May 30 2002 Bill Nottingham <notting@redhat.com> 1.06-14
  312. - move some more stuff to /bin (unicode_start and dependencies)
  313. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  314. - automated rebuild
  315. * Mon Feb 25 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-12
  316. - Rebuild in new environment
  317. * Wed Jan 30 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-11
  318. - Oops, actually list the pam files in %%files
  319. * Tue Jan 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-10
  320. - Add and consolehelper'ify kbdrate
  321. * Tue Jan 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-9
  322. - Re-remove kbdrate
  323. * Thu Jan 24 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-7
  324. - Fix build in current environment
  325. - Get rid of kbdrate, it's in util-linux these days
  326. * Wed Jul 18 2001 Matt Wilson <msw@redhat.com>
  327. - added a patch (Patch4) that allows --tty= in setfont
  328. - modified patch not to break translations
  329. * Tue Jul 3 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-4
  330. - Add cyrillic patches from leon@geon.donetsk.ua (#47144)
  331. * Tue Jun 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-3
  332. - Fix "Alt+AltGr=Compose" in qwertz-keyboards
  333. * Mon Jun 25 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.06-2
  334. - Fix "make install" and init script (#45327)
  335. * Sat Jun 16 2001 Than Ngo <than@redhat.com>
  336. - update to 1.0.6
  337. - use %%{_tmppath}
  338. - use find_lang
  339. - support new gettext
  340. - remove some patch files, which are included in 1.0.6
  341. - fix to use RPM_OPT_FLAGS
  342. * Thu May 3 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.05-3
  343. - Fix up resizecons
  344. * Wed May 2 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.05-2
  345. - Build everything, obsoletes console-tools
  346. - s/Copyright:/License:/
  347. - License is GPL, not just distributable
  348. - Add our compose mappings from old console-tools
  349. - Add triggerpostun -- console-tools magic to get sane fonts and mappings
  350. * Tue Apr 17 2001 Erik Troan <ewt@redhat.com>
  351. - initial packaging for kbdrate