Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 7ddf7a8e84790aad63b171a70be23bc8 > files > 14

kbd-1.15.3-4.mga3.src.rpm

%define kbddir /usr/lib/kbd
%define mdv_keymaps_ver 20081113

Name:   	kbd
Version:	1.15.3
Release:	%mkrel 4
Summary:	Keyboard and console utilities for Linux
License:	GPL
Group:  	Terminals
URL:    	ftp://ftp.kernel.org/pub/linux/utils/kbd/
Source0:	ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%{version}.tar.bz2
Source2:	ucwfonts.tar.bz2
Source3:	ftp://ftp.linux-france.org/pub/macintosh/kbd-mac-fr-4.1.tar.gz
Source5:	kbd-mdv-keymaps-%{mdv_keymaps_ver}.tar.bz2
Source6:	configure_keyboard.sh
Source7:	setsysfont
%define bepo_version 1.0rc2
# downloaded from http://bepo.fr/wiki/Console_GNU/Linux
Source8:        fr-dvorak-bepo-keymaps-%{bepo_version}.tgz
# mageia keyboard updates
Patch0: 	kbd-1.15-mageia.patch
# tilde with twosuperior in french keyboard
Patch1: 	kbd-1.15-tilde_twosuperior_french_kbd.patch
# some modifications to cover PPC using Linux keycodes
Patch2: 	kbd-1.12-ppc_using_linux_keycodes.patch
# thai support, I tried to convert it from console-tools package
# (support added by Pablo), see these patches as reference:
# http://linux.thai.net/~thep/th-console/console-tools/console-tools-thai_ksym.patch
# http://linux.thai.net/~thep/th-console/console-data/console-data-thai_orig-1999.08.29.patch
# (note: thai_ksym patch not needed anymore, it's merged in kbd)
Patch4: 	kbd-1.12-data_thai.patch
# avoid kbd scheme for loadkeys, we use unicode_start in configure_keyboard.sh
Patch5: 	kbd-1.14.1-unicode_start_no_loadkeys.patch
# (fc) remove unneeded calls in unicode_stop
Patch6:		kbd-1.15-remove-unneeded-calls.patch
# (fc) allow to wait for VT switch in userland (Novell bug #540482) (Gentoo)
Patch7:		kbd-1.12-chvt-userwait.patch
Patch8:		kbd-1.15.3-fix-es-translation.patch
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	gcc
BuildRequires:	gettext-devel
BuildRequires:	glibc-devel
BuildRequires:	make
Requires(pre):	filesystem >= 2.1.9-18
Conflicts:	initscripts <= 8.54-2
Conflicts:	util-linux < 2.13
Obsoletes:	console-tools <= 0.2.3-64
Obsoletes:	libconsole0 <= 0.2.3-64
Obsoletes:	libconsole0-devel <= 0.2.3-64
Obsoletes:	libconsole0-static-devel <= 0.2.3-64
Obsoletes:	lib64console0 <= 0.2.3-64
Obsoletes:	lib64console0-devel <= 0.2.3-64
Obsoletes:	lib64console0-static-devel <= 0.2.3-64
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
This package contains utilities to load console fonts and keyboard maps.
It also includes a number of different fonts and keyboard maps.

%prep
%setup -q -a 2
%patch0 -p1
%patch1 -p1
%ifarch ppc ppc64
%patch2 -p1
%endif
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1

mkdir mac_frnew; cd mac_frnew
tar -zxf %{_sourcedir}/kbd-mac-fr-4.1.tar.gz
gunzip mac-fr-ext_new.kmap.gz
mv mac-fr-ext_new.kmap ../data/keymaps/mac/all/mac-fr-ext_new.map
cd ..; rm -rf mac_frnew

tar xzf %{SOURCE8}
mv fr-dvorak-bepo-keymaps-%{bepo_version}/fr-dvorak-bepo-utf8.map \
   fr-dvorak-bepo-keymaps-%{bepo_version}/fr-dvorak-bepo.map \
   data/keymaps/i386/dvorak
gzip data/keymaps/i386/dvorak/fr-dvorak-bepo-utf8.map
gzip data/keymaps/i386/dvorak/fr-dvorak-bepo.map

pushd data
tar -jxf %{_sourcedir}/kbd-mdv-keymaps-%{mdv_keymaps_ver}.tar.bz2
cp keymaps/i386/include/delete.inc keymaps/i386/include/delete.map
popd

%build
autoreconf -fi
%configure2_5x --datadir=%{kbddir} \
               --mandir=%{_mandir} \
               --enable-nls \
               --localedir=%{_datadir}/locale \
		--disable-rpath
%make

%install
rm -rf %{buildroot}
%makeinstall_std \
	localedir=%{_datadir}/locale

# keep some keymap/consolefonts compatibility with console-tools
ln -s fr-latin9.map.gz \
	%{buildroot}%{kbddir}/keymaps/i386/azerty/fr-latin0.map.gz
ln -s us-acentos.map.gz \
	%{buildroot}%{kbddir}/keymaps/i386/qwerty/us-intl.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-br-abnt2.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-gr.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-no-latin1.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-cz-us-qwertz.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-hu.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-Pl02.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-ru1.map.gz
ln -s mac-us.map.gz \
	%{buildroot}%{kbddir}/keymaps/mac/all/mac-jp106.map.gz
ln -s iso07u-16.psfu.gz \
	%{buildroot}%{kbddir}/consolefonts/iso07.f16.psfu.gz
ln -s lat2-16.psfu.gz \
	%{buildroot}%{kbddir}/consolefonts/lat2-sun16.psfu.gz
ln -s lat5-16.psfu.gz \
	%{buildroot}%{kbddir}/consolefonts/lat5u-16.psfu.gz

# Our initscripts/drakx-kbd-mouse-x11 may want to load these directly as
# they were like this when using console-tools (GRP_TOGGLE), so we do
# this to keep compatibility (#32284)
for toggle_file in alt_shift_toggle caps_toggle ctrl_alt_toggle \
                   ctrl_shift_toggle lwin_toggle menu_toggle \
                   rwin_toggle toggle
do
	cp %{buildroot}%{kbddir}/keymaps/i386/include/$toggle_file.inc \
	   %{buildroot}%{kbddir}/keymaps/i386/include/$toggle_file.map
	gzip %{buildroot}%{kbddir}/keymaps/i386/include/$toggle_file.map
done

mkdir -p %{buildroot}/%{_sysconfdir}/profile.d
install -m 644 %{_sourcedir}/configure_keyboard.sh \
	%{buildroot}/%{_sysconfdir}/profile.d/40configure_keyboard.sh

mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/init.d

mkdir %{buildroot}%{_sbindir}
install -m 0755 %{_sourcedir}/setsysfont %{buildroot}%{_sbindir}

%find_lang %{name}

%clean
rm -rf %{buildroot}

%triggerun -- kbd < 1.15-5mdv
  /sbin/chkconfig --del keytable
exit 0


%files -f %{name}.lang
%defattr(0755,root,root,0755)
%{_bindir}/chvt
%{_bindir}/deallocvt
%{_bindir}/dumpkeys
%{_bindir}/fgconsole
%{_bindir}/getkeycodes
%{_bindir}/kbd_mode
%{_bindir}/kbdinfo
%{_bindir}/kbdrate
%{_bindir}/loadkeys
%{_bindir}/loadunimap
%{_bindir}/mapscrn
%{_bindir}/openvt
%{_bindir}/psfaddtable
%{_bindir}/psfgettable
%{_bindir}/psfstriptable
%{_bindir}/psfxtable
%ifarch %{ix86}
%{_bindir}/resizecons
%endif
%{_bindir}/setfont
%{_bindir}/setkeycodes
%{_bindir}/setleds
%{_bindir}/setmetamode
%{_bindir}/showconsolefont
%{_bindir}/setvtrgb
%{_bindir}/showkey
%{_bindir}/unicode_start
%{_bindir}/unicode_stop
%{_sbindir}/setsysfont
%config(noreplace) %{_sysconfdir}/profile.d/40configure_keyboard.sh
%defattr(0644,root,root,0755)
%{_mandir}/man1/chvt.1*
%{_mandir}/man1/deallocvt.1*
%{_mandir}/man1/dumpkeys.1*
%{_mandir}/man1/fgconsole.1*
%{_mandir}/man1/kbd_mode.1*
%{_mandir}/man1/loadkeys.1*
%{_mandir}/man1/openvt.1*
%{_mandir}/man1/psfaddtable.1*
%{_mandir}/man1/psfgettable.1*
%{_mandir}/man1/psfstriptable.1*
%{_mandir}/man1/psfxtable.1*
%{_mandir}/man1/setleds.1*
%{_mandir}/man1/setmetamode.1*
%{_mandir}/man1/showkey.1*
%{_mandir}/man1/unicode_start.1*
%{_mandir}/man1/unicode_stop.1*
%{_mandir}/man5/keymaps.5*
%{_mandir}/man8/getkeycodes.8*
%{_mandir}/man8/kbdrate.8*
%{_mandir}/man8/loadunimap.8*
%{_mandir}/man8/mapscrn.8*
%{_mandir}/man8/resizecons.8*
%{_mandir}/man8/setfont.8*
%{_mandir}/man8/setkeycodes.8*
%{_mandir}/man8/setvtrgb.8*
%{_mandir}/man8/showconsolefont.8*
%{kbddir}



%changelog

* Thu Feb 28 2013 boklm <boklm> 1.15.3-4.mga3
+ Revision: 400675
- add bepo keymaps from http://bepo.fr/

* Sat Jan 12 2013 umeabot <umeabot> 1.15.3-3.mga3
+ Revision: 355827
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Jul 21 2012 colin <colin> 1.15.3-2.mga3
+ Revision: 273158
- Update for usrmove
- Restore missing sources

  + fwang <fwang>
    - new version 1.15.3

  + dmorgan <dmorgan>
    - Remove mdv occurency

  + tmb <tmb>
    - imported package kbd
    - imported package kbd
    - imported package kbd
    - imported package kbd
    - imported package kbd
    - imported package kbd
    - imported package kbd
    - imported package kbd