Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1574327
 поиск   регистрация   авторизация 
 
Группа :: Терминалы
Пакет: kbd

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Name: kbd
Serial: 0
Version: 1.12
Release: alt3.M24.1

Group: Terminals
Summary: Tools for managing the Linux console (variant: kbd)
License: GPL
Url: ftp://ftp.win.tue.nl/pub/linux-local/utils/kbd/
# HOWTO at http://www.win.tue.nl/~aeb/linux/kbd/
Packager: Ivan Zakharyaschev <imz at altlinux.org>

ExclusiveOS: Linux
ExcludeArch: s390 s390x

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

# due to file extarctions from this pkg to other

# (console-data, console-common-scripts)
Conflicts: interactivesystem < 1:sisyphus-alt12

# A short list of basic useful vttools:

%define vttools_PROGS chvt deallocvt fgconsole openvt
# + vt-is-UTF8?
# (in console-tools/vttools there are more, but they are not used a lot)
%define package_vttools 1

# for compatibility:

Requires: console-vt-tools

%define package_data 0
# FIXME: data really should really go to /usr/share/*
%define kbddatadir %_libdir/kbd
%define install_data 0
%if !%install_data
%define package_data 0
%endif

#TODO: the feature to build kernels: loadkeys-mktable-macros


Source0: ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%version.tar.bz2
#Source1: ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%version.tar.bz2.sign
# from ALT util-linux:
Source2: util-linux-2.9w-kbdrate.pamd
Source3: util-linux-2.9w-kbdrate.apps
# data:
Source5: kbd-latsun-fonts.tar.bz2

# Mdk's Thai patches for LCT not ported to kbd.


# RH patches:


# (ALT: we do not really care about SPARC)

Patch0: kbd-1.08-sparc.patch
Patch1: kbd-1.08-compose.patch
Patch2: kbd-1.08-terminal.patch
Patch3: kbd-1.08-rukbd.patch
Patch4: kbd-1.12-setfont-man.patch
Patch5: kbd-1.12-Meta_utf8.patch

# ALT patches:

# -- LCT(-alt-compile-warnings)/kbd
Patch6: kbd-1.12-alt-cleanup.patch
# -- LCT/kbd
Patch7: kbd-1.12-alt-plainletter-safer.patch

# Debian kbd-1.12-10 patches (according to debian/patches/series):

#Patch21: resurrect_utf8_filename.diff -- no need, we get the file the normal way
Patch22: po_makefile.diff
Patch23: man_pages.diff
Patch24: kmap_suffix.diff
Patch25: defkeymap.diff
Patch26: uni_suffix.diff
Patch27: canonical_syms.diff
Patch28: main_argc.diff
Patch29: kbdrate_notty.diff
Patch30: kbdrate_sparc.diff
Patch31: charsets0.diff
# needs considieration & adaptions -- not applied yet:
Patch32: read_keymaps_fmt.diff
Patch33: unicode_start_breaks_X.diff

#NMU Patches:

Patch100: kbd-1.12-alt-unicode_start_vs_setfont.patch
Patch101: kbd-1.12-alt-shutup.patch
Patch102: kbd-1.12-alt-stty.patch

# due to grep, sed, xargs

BuildRequires(install): grep, sed, findutils
# due to provided PAM config file:
# libpam-devel is required to compute what pkg provides
BuildRequires(install): libpam-devel

# Automatically added by buildreq on Tue Apr 12 2005

BuildRequires: flex

%description
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.KOI8-R
Этот пакет содержит инструменты для управления консолью Linux
(консолью, виртуальными терминалами на ней, клавиатурой и т.п.), в основном, они
занимаются загрузкой консольных шрифтов и раскладок клавиатуры.

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

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

%package -n console-vt-tools
Group: Terminals
Summary: Tools to control VTs (virtual terminals) on the Linux console
# Separate pkg is made to distinguish dependencies to vt-tools and other
# (for interchangebility with console-tools).

# due to the same files before pkg split:

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

# console-tools also produces a console-vt-tools pkg with its own version.

# So if you want to specify correct "obsoletion" order,
# you should make correct declarations here, incl. a Serial:
Serial: 0

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

It includes: %vttools_PROGS.

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

%package data
Group: Terminals
Summary: Linux console data files (from kbd package)

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

(Utilities to make use of the data files can be found either
in console-tools or kbd packages; they can be used at boot or login time.)

%description -l ru_RU.KOI8-R
Этот пакет содержит набор разнообразных шрифтов и
описаний раскладок клавиатур.

(Инструменты для использования этих файлов с данными находятся в
пакете console-tools или kbd; их можно использовать во время загрузки
системы (boot) или входа в систему отдельного пользователя (login).)

%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
Serial: %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

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

Serial: %kbdrate_serial

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

%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.


%prep
%setup -q -a 5
%patch0 -p1 -b .sparc
%patch1 -p1
%patch2 -p1 -b .terminal
%patch3 -p1
%patch4 -p1 -b .man
%patch5 -p1 -b .Meta_utf8
%patch6 -p1 -b .clean
%patch7 -p1 -b .plainletter

# Debian:

%patch22 -p1 -b .po_make
%patch23 -p1 -b .man
%patch24 -p1 -b .suffix
%patch25 -p1 -b .defmap
%patch26 -p1 -b .uni_suffix
%patch27 -p1 -b .canonical
%patch28 -p1 -b .argc
%patch29 -p1 -b .notty
%patch30 -p1 -b .sparc
%patch31 -p1 -b .charsets0
#patch32 -p1 -b .fmt
%patch33 -p1 -b .breaks_X

%patch100 -p1 -b .unicode_start_vs_setfont
%patch101 -p1 -b .unicode_start_shutup
%patch102 -p1 -b .unicode_start_stty

# 7-bit maps are obsolete; so are non-euro maps

pushd data/keymaps/i386
mv qwerty/fi.map qwerty/fi-old.map
cp qwerty/fi-latin9.map qwerty/fi.map
cp qwerty/pt-latin9.map qwerty/pt.map
cp qwerty/sv-latin1.map qwerty/se-latin1.map

mv azerty/fr.map azerty/fr-old.map
cp azerty/fr-latin9.map azerty/fr.map

cp azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias
popd

# Default to latarcyrheb-sun16 font for unicode

#perl -pi -e 's/LatArCyrHeb-16/latarcyrheb-sun16/' src/unicode_start

%build
export OLD_PO_FILE_INPUT=yes

# We don't use % {configure} because the ./configure included here does not

# understand most of the options.
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
./configure --prefix=/ --datadir=%kbddatadir --mandir=%_mandir
#+LCT: --enable-localdatadir=%_sysconfdir/sysconfig/console

# Override CFLAGS because this configure ignores them anyway, and LDFLAGS

# because it defaults to -s, but that's a build policy decision.
%make_build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=

%install
%if !%install_data
# install: install-progs install-data install-man
%define _makeinstall_target install-progs install-man
%endif

# Basic install.

%makeinstall DESTDIR="$RPM_BUILD_ROOT" \
\
datadir="$RPM_BUILD_ROOT"%kbddatadir \
DATADIR="$RPM_BUILD_ROOT"%kbddatadir \
\
BINDIR="$RPM_BUILD_ROOT"%_bindir \
LOADKEYS_BINDIR="$RPM_BUILD_ROOT"/bin \
MANDIR="$RPM_BUILD_ROOT"%_mandir \
gnulocaledir="$RPM_BUILD_ROOT"%_datadir/locale \
localedir="$RPM_BUILD_ROOT"%_datadir/locale

# Move binaries which we use before /usr is mounted from %_bindir to /bin.

# for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop ; do
#   mv $RPM_BUILD_ROOT%_bindir/$binary $RPM_BUILD_ROOT/bin
# done

pushd "$RPM_BUILD_ROOT"

# Set up kbdrate to be userhelpered.

mkdir -p ./sbin \
.%_sysconfdir/security/console.apps \
.%_sysconfdir/pam.d
mv .%_bindir/kbdrate ./sbin/
%__ln_s %_libdir/helper/consolehelper .%_bindir/kbdrate
install -p -m640 %SOURCE2 .%_sysconfdir/pam.d/kbdrate
install -p -m640 %SOURCE3 .%_sysconfdir/security/console.apps/kbdrate

popd # "$RPM_BUILD_ROOT"

%find_lang %name
echo -n > vttools.files

vttoolsPROGS=(%vttools_PROGS) # array
IFS='|' eval 'vttoolsREGEX="${vttoolsPROGS[*]}"'

#bindir

echo '%_defattr' >>%name.lang
/bin/ls -1 "$RPM_BUILD_ROOT"%_bindir |
egrep -v "^(kbdrate|$vttoolsREGEX)\$" |
sed -e 's|^\(.*\)$|%%_bindir/\1|g' >>%name.lang
for f in "${vttoolsPROGS[ at ]}"; do
echo %_bindir/"$f"
done >> vttools.files

# mandir

/bin/ls -1d "$RPM_BUILD_ROOT"%_mandir/man?/* |
egrep -v "/(kbdrate|$vttoolsREGEX)" |
sed -e "s|^$RPM_BUILD_ROOT\(.*\)$|\1*|g" >>%name.lang
/bin/ls -1d "$RPM_BUILD_ROOT"%_mandir/man?/* |
egrep "/($vttoolsREGEX)" |
sed -e "s|^$RPM_BUILD_ROOT\(.*\)$|\1*|g" >> vttools.files

#/sbin

/bin/ls -1 "$RPM_BUILD_ROOT"/sbin |
egrep -v '^kbdrate$' |
sed -e 's|^\(.*\)$|/sbin/\1|g' >>%name.lang

%if ! %package_vttools
# Remove unpackaged files:
for f in "${vttoolsPROGS[ at ]}"; do
rm "$RPM_BUILD_ROOT%_bindir/$f"
rm "$RPM_BUILD_ROOT"%_mandir/man?/"$f".*
done
%endif

%files -f %name.lang
%doc CHANGES CREDITS README doc/*.txt doc/kbd.FAQ*.html doc/font-formats/*.html doc/utf
/bin/*
#%_bindir/* already included
#/sbin/* already included
#%_mandir/*/* already included

%if %package_vttools
%files -n console-vt-tools -f vttools.files
# FIX: vttools l10n messages are in the common kbd catalogue
%endif

%if %package_data
%files data
%kbddatadir
%endif

# as in ALT util-linux:

%files -n kbdrate
/sbin/kbdrate
%_man8dir/kbdrate.*
# FIX: kbdrate l10n messages are in the common kbd catalogue

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

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005