Sisyphus repositório
Última atualização: 18 agosto 2022 | SRPMs: 17584 | Visitas: 24803989
en ru br
ALT Linux repositórios
4.1: 1.13.99-alt5.M41.1
4.0: 1.12.1-alt2
3.0: 1.12-alt2.1

Group :: Terminais
RPM: kbd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%def_with doc

Name: kbd
Epoch: 0
Version: 2.4.0
Release: alt2

Group: Terminals
Summary: Tools for managing the Linux console
License: GPL-2.0

Packager: Alexey Gladkov <legion at>

ExclusiveOS: Linux
ExcludeArch: s390 s390x

Requires: libkeymap = %version-%release

Provides: console-tools_or_kbd = %name%epoch:%version-%release
Conflicts: console-tools_or_kbd < %name%epoch:%version-%release
Conflicts: console-tools_or_kbd > %name%epoch:%version-%release

# for compatibility:

Requires: console-vt-tools
Obsoletes: console-tools
Provides: console-tools = %version

# due to file extarctions from this pkg to other

# (console-data, console-common-scripts)
Conflicts: interactivesystem < 1:sisyphus-alt12
Conflicts: console-common-scripts <= 0.2.2-alt1.4

Source0: kbd-%version.tar

#NMU Patches:

Patch100: kbd-1.12-alt-unicode_start_vs_setfont.patch

# Automatically added by buildreq on Mon Jan 07 2008 (-bi)

BuildRequires: flex libpam-devel

%{?_with_doc:BuildRequires: doxygen}

This package contains tools for managing the Linux console
(Linux console, virtual terminals on it, keyboard, etc.)--mainly,
what they do is loading console fonts and keyboard maps.

Basic tools for controlling the vitual terminals are in console-vt-tools package.

A set of various fonts and keyboard maps is provided by console-data package.

%description -l ru_RU.UTF-8
Этот пакет содержит инструменты для управления консолью Linux
(консолью, виртуальными терминалами на ней, клавиатурой и т.п.), в основном, они
занимаются загрузкой консольных шрифтов и раскладок клавиатуры.

Простые инструменты для управления виртуальными терминалами находятся
в пакете console-vt-tools.

Набор разнообразных шрифтов и описаний раскладок предоставляется
пакетом console-data.

%package -n %name-data
Group: Terminals
Summary: Linux console data files

Obsoletes: console-data
Provides: console-data = %version

%description -n %name-data
This package contains various console fonts and keyboard maps.

%package -n %name-docs
Group: Documentation
Summary: Documentation for kbd

%description -n %name-docs
Documentation for kbd

%package -n console-vt-tools
Group: Terminals
Summary: Tools to control VTs (virtual terminals) on the Linux console
Epoch: 0

# due to the same files before pkg split:

Conflicts: kbd < 0:1.12-alt1
Conflicts: console-tools < 0:0.2.3-ipl30mdk

%description -n console-vt-tools
console-vt-tools perform simple control operations on the VTs on Linux console
(like switching between them).

Usually, several VTs are used ontop of the Linux console.
These scripts are useful for writing scripts that need to control them.

%package -n console-scripts
Group: System/Configuration/Other
Summary: Console configuration activation and management
BuildArch: noarch

Requires: %name %name-data
Obsoletes: console-common-scripts
Provides: console-common-scripts = %version

Conflicts: startup < 0.9.7-alt1
Conflicts: console-tools < 0.2.3-ipl29mdk

%description -n console-scripts
This package is required if you have an interactive system with console.
The package is dedicated to both system-wide and per-user Linux console/other VT

It is responsible for the ways the console configuration is managed,
stored and used (activated), either at system-boot time
or user session startup.

%package -n kbdrate
Group: System/Configuration/Hardware
Summary: Reset the keyboard repeat rate and delay time

# due to the parent package change (util-linux --> kbd)

%define kbdrate_serial 1
Epoch: %kbdrate_serial

# due to kbdrate

Conflicts: util-linux < 2.11h-alt2
# FIX: kbdrate l10n messages are in the common kbd catalogue

%description -n kbdrate
This package is used to change the keyboard repeat rate and delay time.
The delay is the amount of time that a key must be depressed before it
will start to repeat.

%package -n kbdrate-usermode
Group: System/Configuration/Hardware
Summary: Usermode bindings for kbdrate
BuildArch: noarch

# due to the parent package change (util-linux --> kbd)

Epoch: %kbdrate_serial

Requires: kbdrate = %kbdrate_serial:%version-%release
Requires: consolehelper

%description -n kbdrate-usermode
Kbdrate package is used to change the keyboard repeat rate and delay time.
The delay is the amount of time that a key must be depressed before it
will start to repeat.

This package contains usermode bindings for kbdrate.

%package -n vlock
Summary: A program which locks one or more virtual consoles
Group: Terminals

Requires(pre): /etc/tcb

%description -n vlock
The vlock program locks one or more sessions on the console.  Vlock can
lock the current terminal (local or remote) or the entire virtual console
system, which completely disables all console access.  The vlock program
unlocks when the password of the user who started vlock is typed.

%package -n libkeymap
Summary: The library to manage the Linux keymaps
Group: System/Libraries

%description -n libkeymap
The library to manage the Linux keymaps.

%package -n libkeymap-devel
Summary: Files needed to develop programs which use the libkeymap library
Group: Development/C
Requires: libkeymap = %version-%release

%description -n libkeymap-devel
This package contains the files needed to develop programs which use
the libkeymap library.

%setup -q
%patch100 -p1 -b .unicode_start_vs_setfont

%autoreconf -I m4
%configure \
--bindir=/bin \
--libdir=/%_lib \
--datadir=/lib/%name \
--localedir=%_datadir/locale \
--docdir=%_docdir/%name-%version/libkeymap \
--enable-nls \
--enable-optional-progs \
--enable-libkeymap \



# Backward compatibility link

mkdir -p -- %buildroot/%_bindir %buildroot/%_libdir
ln -s -- /lib/%name %buildroot/%_libdir/%name
for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop chvt openvt deallocvt fgconsole; do
t=$(relative /bin/$binary %_bindir/$binary)
ln -s $t %buildroot/%_bindir/$binary

# Set up kbdrate to be userhelpered.

mkdir -p \
%buildroot/sbin \
%buildroot/%_bindir \
%buildroot/%_sysconfdir/security/console.apps \
%buildroot/%_sysconfdir/pam.d \

install -p -m640 rpm/kbdrate.pamd %buildroot/%_sysconfdir/pam.d/kbdrate
install -p -m640 rpm/kbdrate.apps %buildroot/%_sysconfdir/security/console.apps/kbdrate
install -p -m644 rpm/consolesaver.service %buildroot/%_unitdir/consolesaver.service

mv %buildroot/bin/kbdrate %buildroot/sbin/
ln -s -- %_usr/lib/consolehelper/helper %buildroot/bin/kbdrate

install -p -m640 rpm/vlock.pamd %buildroot/%_sysconfdir/pam.d/vlock

mv -f -- %buildroot/bin/vlock %buildroot/%_bindir/
mv -f -- %buildroot/%_lib/pkgconfig %buildroot/%_libdir/

for libname in libkeymap libkbdfile; do
t=$(readlink -v %buildroot/%_lib/$
rl=$(relative "/%_lib/$t" %_libdir/$
ln -sf -- "$rl" %buildroot/%_libdir/$

rm -f -- %buildroot/%_lib/*.{la,a,so}

mkdir -p \
%buildroot/%_initdir \
%buildroot/%_datadir/console-scripts \

install -p -m755 rpm/console-scripts/setsys* %buildroot/sbin/
install -p -m755 rpm/console-scripts/{keytable,consolesaver} %buildroot/%_initdir/

for f in configure_keyboard vt_activate_*; do
install -p -m755 rpm/console-scripts/$f %buildroot/%_datadir/console-scripts/

for f in console.*sh configure_keyboard.*sh; do
install -p -m644 rpm/console-scripts/$f  %buildroot/%_sysconfdir/profile.d/

%find_lang %name

# Compatibility forever!

cp -ar -- rpm/kbd-data-extra/* %buildroot/lib/%name/

cd %buildroot/lib/%name/keymaps
rm -rf -- amiga atari sun
%ifnarch ppc
rm -rf -- mac ppc
cd %buildroot/lib/%name/keymaps/i386/include
rm -f*

gzip -9 *.inc
ln -s
for f in *.map.gz; do
ln -s "$f" "$"
cd %buildroot/lib/%name/keymaps/i386/qwerty
gzip -9 *.map

if [ -f by-cp1251.kmap ]; then
mv by-cp1251.kmap
gzip -9

ln -s
ln -s # it has also a Russian KOI8-R layout
ln -s
ln -s
ln -s
ln -s
ln -s
ln -s
       ln -s
ln -s
       ln -s
ln -s
cd "$old_path"

# Config files:

mkdir -p -- %buildroot/%_sysconfdir/sysconfig/console
cd %buildroot/%_sysconfdir/sysconfig
touch consolefont keyboard console/setterm

# Set default font

echo 'SYSFONT=UniCyr_8x16' > consolefont

make check

%triggerpostun -n %name-data -- console-data
[ $2 = 0 ] || exit 0
[ ! -d '%_libdir/%name' ] ||
rm -rf -- '%_libdir/%name'
[ -e '%_libdir/%name' ] ||
ln -s -- '/lib/%name' '%_libdir/%name'

%triggerpostun -n console-scripts -- console-common-scripts <= 0.2.2-alt1.4, console-scripts < 0:1.13.99-alt4
/sbin/chkconfig keytable on
/sbin/chkconfig consolesaver on

%post -n console-scripts
%post_service keytable
%post_service consolesaver
cd %_sysconfdir/sysconfig
for f in consolefont keyboard console/setterm; do
[ ! -s "$f" ] || continue
if [ -f "$f".rpmsave ]; then
cp -pfv "$f".rpmsave "$f"
elif [ -f "$f".rpmnew ]; then
cp -pfv "$f".rpmnew "$f"

%preun -n console-scripts
%preun_service keytable
%preun_service consolesaver

%files -f %name.lang
%exclude /bin/chvt
%exclude /bin/openvt
%exclude /bin/deallocvt
%exclude /bin/fgconsole
%exclude /bin/kbdrate
%exclude /sbin/kbdrate
%exclude /sbin/setsysfont
%exclude /sbin/setsyskeytable
%exclude %_bindir/chvt
%exclude %_bindir/openvt
%exclude %_bindir/deallocvt
%exclude %_bindir/fgconsole
%exclude %_bindir/vlock
%exclude %_man1dir/chvt*
%exclude %_man1dir/openvt*
%exclude %_man1dir/deallocvt*
%exclude %_man1dir/fgconsole*
%exclude %_man1dir/vlock.*
%exclude %_man8dir/kbdrate.*

%files -n libkeymap

%files -n libkeymap-devel

%files -n %name-data
%ghost %_libdir/%name

%if_with doc
%files -n %name-docs
%doc ChangeLog CREDITS README docs/doc/*.txt docs/doc/kbd.FAQ*.html docs/doc/font-formats/*.html docs/doc/utf
%doc %_docdir/%name-%version

%files -n console-vt-tools

%files -n console-scripts
%attr(755,root,root) %config %_initdir/*
%attr(755,root,root) %config %_sysconfdir/profile.d/*.sh
%attr(755,root,root) %config %_sysconfdir/profile.d/*.csh
%dir %_sysconfdir/sysconfig/console
%config(noreplace) %verify(not md5 mtime size) %_sysconfdir/sysconfig/consolefont
%config(noreplace) %verify(not md5 mtime size) %_sysconfdir/sysconfig/keyboard
%config(noreplace) %verify(not md5 mtime size) %_sysconfdir/sysconfig/console/setterm

# as in ALT util-linux:

%files -n kbdrate

%files -n kbdrate-usermode
%config(noreplace) %_sysconfdir/pam.d/kbdrate
%config(noreplace) %_sysconfdir/security/console.apps/kbdrate

%files -n vlock
%attr(640,root,chkpwd) %config(noreplace) %_sysconfdir/pam.d/vlock
%attr(2711,root,chkpwd) %_bindir/vlock


Todas as alterações você pod ver aqui

projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009