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

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

Name: console-data
Version: 1999.08.29
Release: alt2.M24.1

Group: Terminals
Summary: Linux console data files
License: GPL
Url: http://lct.sf.net

Packager: Ivan Zakharyaschev <imz at altlinux.org>

%define MDK_KBD_VER 20030918
%define CDCYRVER 0.0.7

# FIXME: data really should really go to /usr/share/*

%define kbddatadir %_libdir/kbd

ExclusiveOS: Linux

# The pkg was split after 0.2.3-alt23mdk:

Conflicts: console-tools < 0.2.3-alt24mdk

# transition script uses locale

Requires(triggerpostun): glibc-locales-virtual

Source: ftp://metalab.unc.edu/pub/Linux/system/keyboards/console-data-%version.tar.bz2
Source4: console-tools-ucwfonts.tar.bz2
Source5: kbd-0.96-turkish.tar.bz2
Source6: kbd-mdk-keymaps-%MDK_KBD_VER.tar.bz2
Source8: console-data-cyrillic-%CDCYRVER.tar.bz2

# on PPC we need to see whether mac or Linux keycodes are being used - stew

Source10:       mac-keymaps.tar.bz2

# Originally this file was called http://www.inp.nsk.su/~bolkhov/files/fonts/univga/uni-vga.tgz:

Source20: http://www.inp.nsk.su/~bolkhov/files/fonts/univga/uni-vga-20010608.tar.bz2
#The homepage of Unicode VGA: (originally it is http://www.inp.nsk.su/~bolkhov/files/fonts/univga/index.html)
Source21: http://www.inp.nsk.su/~bolkhov/files/fonts/univga-20010608.html
Patch25: console-data-univga-embed.patch
Patch26: univga-buildargs.patch
Source101: console-data-univga-embed-fonts.cat
Source102: console-data-univga-embed-trans.cat

# There is a windowkeys keymap supplement in console-data. This one replaces the Compose

# function that is not useful for Russian by another function (console
# switching)
# (look at Patch31 as well)
Source22: console-data-windowkeys-console_switch.inc

# Esperanto keymap from Andrey V. Lukyanov:

Source23: http://stgazeta.chat.ru/download/eurorus.tar.gz/eurorus-20021208/keymaps/console-data-eo-l3.kmap

# some keyboards cannot have the euro in AltGr-e -- pablo

Patch9: console-data-1999.08.29-mdk-noteuro.patch

Patch10: console-data-1999.08.29-mandrake.patch.bz2
Patch11: console-data-1999.08.29-mdk-tilde-with-twosuperior-in-french-keyboard.patch

# some modifications to cover PPC using Linux keycodes

Patch13: console-data-1999.08.29-mdk-ppc-using-linux-keycodes.patch

# Thai kbds, keysysm and fonts -- pablo

Patch14: http://www.links.nectec.or.th/~thep/th-console/console-data/console-data-thai_deb-1999.08.29-21.8.patch

# Patches 25, 26 are for UniVGA (defined above)


# wrong paths in include statements in Makefiles (automake info says

# the same)
Patch27: console-data-1999.08.29-Makefile-include.patch
Patch28: console-data-cyrillic-embed.patch

# Avoid /usr/bin/cpp indirect dependence.

Patch29: console-data-1999.08.29-alt-convkeys-cpp.patch
Patch31: console-data-1999.08.29-alt-special-keys-in-all-grps.patch
Patch32: console-tools-cpp-fix.patch
Patch33: kbd-mdk-keymaps-20030918-alt-correct.patch

# Automatically added by buildreq on Mon Apr 05 2004

BuildRequires: console-tools

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

%prep
%setup -q

######## Thai data from Mdk: ############

%patch14 -p1 -b .thai1

%patch27 -p1
tar xjf %SOURCE4
tar xjf %SOURCE5
%patch10 -p1

############### UniVGA: ##########

tar xjf %SOURCE20
%patch25 -p1
%patch26
%__cat %SOURCE101 >> consolefonts/Makefile.am
%__cat %SOURCE102 >> consoletrans/Makefile.am
# end UniVGA

tar xjf %SOURCE8
ln -sf console-data-cyrillic-%CDCYRVER cyrillic
%patch28 -p1
pushd console-data-cyrillic-%CDCYRVER
%patch29 -p2
popd #console-data-cyrillic-%CDCYRVER
%patch31 -p1 -b .all-grps

# Patches that affect the build procedure for the tools


%patch9 -p1
%patch11 -p2

%ifarch ppc
%patch13 -p2
%endif

%patch32 -p2

#

%build

#define __nprocs 1


# To build with our tools as much as possible -- clean all pre-built sources


autoconf # create Makefiles and ./configure
%configure # errors due to ./missing
rm -f ./missing # too old
aclocal # update something needed for automake
automake --add-missing # update various things (scripts and *.in) - uses Make.rules generated by autoconf
%make clean
# Only one of this can be executed at once (they rm Makefile):
#make distclean
%make maintainer-clean
autoconf # just in case
# All these auto* iterations look quite silly! Anyway, they make it work with fresh autotools.

# Configuring once more: this time for real build

pushd uni_vga
# SMP-incompatible build.
PATH="$RPM_BUILD_DIR/%name-%ver/fontfiletools:$PATH" make allfonts
univga_dir="$(pwd)"
univga_FILES="$(echo *.{psf,sfm})"
export univga_dir univga_FILES
popd

%configure --datadir=%kbddatadir --enable-localdatadir=%_sysconfdir/sysconfig/console
%make_build

#

%install
install -d -m 0755 $RPM_BUILD_ROOT%prefix

%makeinstall datadir=$RPM_BUILD_ROOT%kbddatadir

# other data


# Mdk keymaps.

for f in "%SOURCE6"; do
 tar jxvf "$f" -C $RPM_BUILD_ROOT%kbddatadir
done
pushd $RPM_BUILD_ROOT%kbddatadir
 gunzip keymaps/i386/include/rwin_switch.inc
 patch -p0 < "%PATCH33"
popd

# A lot of not quite useful stuff.

pushd cyrillic
%__install -p -m755 -D local-scripts/convkeys $RPM_BUILD_ROOT%_bindir/convkeys
%__mkdir_p $RPM_BUILD_ROOT%kbddatadir/keyencs
%__install -p -m644 keyencs/*enc $RPM_BUILD_ROOT%kbddatadir/keyencs
cat > $RPM_BUILD_ROOT%kbddatadir/keyencs/README <<-EOF
This are Cyril Slobin's enc-files taken from console-tools-cyrillic
package.

They can be used by %_bindir/convkeys script.
More info in documentation on cyrillic part of console-data
in %_docdir.
EOF
%__mkdir_p ../doc/cyrillic/
%__install -pD -m644 doc/* ../doc/cyrillic/
%__install -p -m644 %SOURCE21 ../doc/univga.html
cat > ../doc/cyrillic/README.keyencs <<-EOF
The script and additional data (Cyril Slobin's enc-files
taken from console-tools-cyrillic package) that were
used to produce keymaps in multiple encodings were installed
to %_bindir/convkeys and %kbddatadir/keyencs.

You can use all this to generate keymaps in other encodings
than those of the shipped keymaps. There's a small help message in
the script.

Use with care!
EOF
popd

# more bindings for extra Win keys.

pushd "$RPM_BUILD_ROOT%kbddatadir/keymaps/i386/include/"
 for f in "%SOURCE22"; do
   targetf="${f##*console-data-}"
   %__install -m 0644 "$f" "$targetf"
   %__gzip -9 "$targetf"
 done
 %__mv windowkeys{,-compose}.inc.gz
 %__ln_s windowkeys{-compose,}.inc.gz
popd

# Esperanto kmap

pushd "$RPM_BUILD_ROOT%kbddatadir/keymaps/i386/qwerty/"
 for f in "%SOURCE23"; do
   targetf="${f##*console-data-}"
   %__install -m 0644 "$f" "$targetf"
   %__gzip -9 "$targetf"
 done
popd

# More mac keymaps on ppc

pushd "$RPM_BUILD_ROOT%kbddatadir/keymaps/"
%ifarch ppc
tar jxf "%SOURCE10"
%endif
 
# remove unneeded files
rm -rf amiga atari sun
%ifnarch ppc
rm -rf mac
%endif
popd

# it is the same file; a symlink will save some space

# XXX This doesn't work, IMHO
#ln -sf UnicodeData-2.1.8.txt $RPM_BUILD_ROOT%kbddatadir/unidata/UnicodeData-2.txt

#compatibility symlinks

(cd $RPM_BUILD_ROOT/%kbddatadir/keymaps/i386/qwerty
   ln -s ua.kmap.gz  ua-KOI8-U.kmap.gz
   ln -s ua.kmap.gz  ua-KOI8-R.kmap.gz # it has also a Russian KOI8-R layout
   ln -s ua-cp1251.kmap.gz  ua-CP1251.kmap.gz
   ln -s by-cp1251.kmap.gz  by-CP1251.kmap.gz
   ln -s ru_alt-KOI8-R.kmap.gz ru_alt.kmap.gz
   ln -s ru_cplk-KOI8-R.kmap.gz ru_cplk.kmap.gz
   ln -s ru_ct_sh-KOI8-R.kmap.gz ru_ct_sh.kmap.gz
   ln -s ru_ctrl-KOI8-R.kmap.gz ru_ctrl.kmap.gz
   ln -s ruwin_alt-KOI8-R.kmap.gz ruwin_alt.kmap.gz
   ln -s ruwin_cplk-KOI8-R.kmap.gz ruwin_cplk.kmap.gz
   ln -s ruwin_ct_sh-KOI8-R.kmap.gz ruwin_ct_sh.kmap.gz
   ln -s ruwin_ctrl-KOI8-R.kmap.gz ruwin_ctrl.kmap.gz
)

%find_lang %name

#

# This was a part of a %%post script.
#
# Probably this was needed for some old configuration tools. Commenting
#it out.
#if [ -s %_sysconfdir/sysconfig/keyboard ] ; then
#    . %_sysconfdir/sysconfig/keyboard
#    if [ -n "$KEYTABLE" ] ; then
#        KT=`echo $KEYTABLE | sed -e "s/.*\///g" | sed -e "s/\..*//g"`
#    fi
#fi

# This could be included in keytable stop:

#   if [ -d %_sysconfdir/sysconfig/console ] ; then
#      if [ -n "$SYSFONT" ]; then
#         cp -fp %kbddatadir/consolefonts/$SYSFONT* %_sysconfdir/sysconfig/console
#      fi
#      if [ -n "$UNIMAP" ]; then
#         cp -fp %kbddatadir/consoletrans/$UNIMAP* %_sysconfdir/sysconfig/console
#      fi
#      if [ -n "$SYSFONTACM" ]; then
#         cp -fp %kbddatadir/consoletrans/$SYSFONTACM* %_sysconfdir/sysconfig/console
#      fi
#   fi

#

%post
service keytable condreload ||:


%triggerpostun -- console-tools < 0:0.2.3-ipl2mdk
# Translating the keytable to the new naming scheme (with -CHARSET
# appended)
echo "Adjusting the keyboard profile in the system"
if [ -s %_sysconfdir/sysconfig/i18n ]; then
  . %_sysconfdir/sysconfig/i18n
  export LANGUAGE LANG LC_CTYPE LC_ALL
  lKT="$KT-`locale charmap`"
  if %_bindir/loadkeys -m "$lKT" &>/dev/null; then
  KT="$lKT"
  fi
fi
if [ -n "$KT" ]; then
echo "KEYTABLE=$KT" >> %_sysconfdir/sysconfig/keyboard
if ! %_bindir/loadkeys -m "$KT" &>/dev/null; then
  echo "Your %_sysconfdir/sysconfig/keyboard sets a keyboard map that can't be loaded,"
echo "probably, you should correct the map's name!"
fi
fi

#

%files -f %name.lang
%doc doc/*

%dir %kbddatadir
%kbddatadir/consolefonts
%kbddatadir/consoletrans
%dir %kbddatadir/keymaps
%kbddatadir/unidata
%kbddatadir/keymaps/include
# Warning: keyboards are not cpu-dependent but machine-dependent.
# How to distinguish Linux/PPC on Amiga/PPC (amiga kbd) and Linux/PPC
# on Apple/ppc (mac kbd) ?
#
# for now an ugly hack: ppc -> mac, sparc -> sun, i386/alpha -> i386
#%_libdir/kbd/keymaps/amiga
#%_libdir/kbd/keymaps/atari
#
# (fg) 20010411 Also ia64 has PC-like keyboards, added it here
#
# (sb) move to Linux keycodes PPC
#
%ifarch %ix86 alpha ia64 ppc x86_64
%kbddatadir/keymaps/i386
%endif
# (sb) leave in the event user really wants mac keymaps
%ifarch ppc
%kbddatadir/keymaps/mac
%endif

%kbddatadir/keyencs
%_bindir/convkeys

# no man pages


%changelog

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

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