1 # NOTE: kbd's vlock is a fork of vlock v1.x
2 # comparing with vlock v2.x it has NLS, but no plugins support
5 # - probably it doesn't make sense to package ppc keymaps on x86 and vice versa
8 %bcond_without vlock # don't build vlock
10 Summary: Linux console utilities
11 Summary(ko.UTF-8): 콘솔을 설정하는 도구 (글쇠판, 가상 터미널, 그 밖에)
12 Summary(pl.UTF-8): Narzędzia do obsługi konsoli
17 Group: Applications/Console
18 Source0: ftp://ftp.altlinux.org/pub/people/legion/kbd/%{name}-%{version}.tar.gz
19 # Source0-md5: 34c71feead8ab9c01ec638acea8cd877
21 Source2: %{name}.sysconfig
22 Source3: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
23 # Source3-md5: 93c72a27e4fdeba23cb62d62343e9483
24 Source4: lat2u-16.psf.gz
25 # Source4-md5: dc90a9bcff858175beea32a9b3bebb33
27 # Source5-md5: 8ac4abc169fa1236fc3e64163c043113
28 Source51: http://pkgs.fedoraproject.org/repo/pkgs/kbd/%{name}-latsun-fonts.tar.bz2/050e1e454e9c01e22f198303d649efb8/kbd-latsun-fonts.tar.bz2
29 # Source51-md5: 050e1e454e9c01e22f198303d649efb8
30 Source52: http://pkgs.fedoraproject.org/repo/pkgs/kbd/%{name}-latarcyrheb-16-fixed.tar.bz2/cb1e2d5ba5d4cb8b0a27367029d36a56/kbd-latarcyrheb-16-fixed.tar.bz2
31 # Source52-md5: cb1e2d5ba5d4cb8b0a27367029d36a56
34 Source8: %{name}-pl1.kmap
35 Source9: %{name}-mac-pl.kmap
36 Source10: %{name}-pl3.map
37 Source11: %{name}-pl4.map
38 Source12: console.upstart
39 Patch0: %{name}-unicode_start.patch
40 Patch1: %{name}-ngettext.patch
41 Patch2: %{name}-tty-detect.patch
42 URL: http://www.win.tue.nl/~aeb/linux/
43 BuildRequires: autoconf >= 2.60
44 BuildRequires: automake >= 1:1.9
47 BuildRequires: gettext-devel >= 0.14.1
48 %{?with_vlock:BuildRequires: pam-devel}
49 Requires(post,preun): /sbin/chkconfig
51 Requires: rc-scripts >= 0.4.3.0
54 Obsoletes: console-data
55 Obsoletes: console-tools
56 Obsoletes: console-tools-devel
57 Obsoletes: console-tools-static
58 Conflicts: man-pages < 1.43-5
59 Conflicts: util-linux < 2.11
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 %define _ldatadir /lib/%{name}
65 This package contains utilities to load console fonts and keyboard
66 maps. It also includes a number of different fonts and keyboard maps.
68 %description -l pl.UTF-8
69 Pakiet zawiera narzędzia do ładowania fontów konsolowych oraz map
70 klawiatury. Dodatkowo dołączono znaczną liczbę różnych fontów i map.
73 Summary: Utility to lock one or more virtual consoles
74 Summary(pl.UTF-8): Narzędzie do blokowania jednej lub wielu konsol wirtualnych
75 Group: Applications/Console
76 Requires: %{name} = %{version}-%{release}
80 Utility to lock one or more virtual consoles.
82 %description vlock -l pl.UTF-8
83 Narzędzie do blokowania jednej lub wielu konsol wirtualnych.
98 --datadir=%{_ldatadir} \
99 --localedir=%{_datadir}/locale \
101 --disable-silent-rules \
102 %{!?with_vlock:--disable-vlock}
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT{/bin,/etc/{profile.d,rc.d/init.d,sysconfig,init}}
110 DESTDIR=$RPM_BUILD_ROOT \
111 gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
113 # some binaries are needed in /bin but rest is not
114 for f in setfont dumpkeys kbd_mode unicode_start unicode_stop; do
115 mv $RPM_BUILD_ROOT%{_bindir}/$f $RPM_BUILD_ROOT/bin
118 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/console
119 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/console
120 cp -p %{SOURCE12} $RPM_BUILD_ROOT/etc/init/console.conf
121 %ifarch sparc sparc64
122 %{__sed} -i -e 's/KEYTABLE=pl2/KEYTABLE=sunkeymap/' $RPM_BUILD_ROOT/etc/sysconfig/console
125 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_ldatadir}/consolefonts/lat2u-16.psfu.gz
126 gunzip -c %{SOURCE5} > $RPM_BUILD_ROOT%{_ldatadir}/unimaps/lat2u.uni
128 gzip -c %{SOURCE8} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl1.map.gz
129 gzip -c %{SOURCE9} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/mac/all/mac-pl.map.gz
130 gzip -c %{SOURCE10} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl3.map.gz
131 gzip -c %{SOURCE11} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl4.map.gz
133 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/profile.d
134 cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/profile.d
136 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
138 # Greek is el, not gr
139 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/gr
140 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{README.kbd-non-english-man-pages,kbd-keypaps_instead_keytables.patch}*
145 rm -rf $RPM_BUILD_ROOT
148 /sbin/chkconfig --add console
151 if [ "$1" = "0" ]; then
152 /sbin/chkconfig --del console
155 %files -f %{name}.lang
156 %defattr(644,root,root,755)
157 # COPYING contains copyright summary, not GPL text
158 %doc AUTHORS COPYING ChangeLog README doc/*.txt
159 %attr(754,root,root) /etc/rc.d/init.d/console
160 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/console
161 %config(noreplace) %verify(not md5 mtime size) /etc/init/console.conf
162 %attr(755,root,root) /etc/profile.d/console.csh
163 %attr(755,root,root) /etc/profile.d/console.sh
165 %attr(755,root,root) /bin/dumpkeys
166 %attr(755,root,root) /bin/kbd_mode
167 %attr(755,root,root) /bin/setfont
168 %attr(755,root,root) /bin/unicode_start
169 %attr(755,root,root) /bin/unicode_stop
170 %attr(755,root,root) %{_bindir}/chvt
171 %attr(755,root,root) %{_bindir}/deallocvt
172 %attr(755,root,root) %{_bindir}/fgconsole
173 %attr(755,root,root) %{_bindir}/getkeycodes
174 %attr(755,root,root) %{_bindir}/kbdinfo
175 %attr(755,root,root) %{_bindir}/kbdrate
176 %attr(755,root,root) %{_bindir}/loadkeys
177 %attr(755,root,root) %{_bindir}/loadunimap
178 %attr(755,root,root) %{_bindir}/mapscrn
179 %attr(755,root,root) %{_bindir}/openvt
180 %attr(755,root,root) %{_bindir}/psfaddtable
181 %attr(755,root,root) %{_bindir}/psfgettable
182 %attr(755,root,root) %{_bindir}/psfstriptable
183 %attr(755,root,root) %{_bindir}/psfxtable
184 %ifarch %{ix86} %{x8664}
185 %attr(755,root,root) %{_bindir}/resizecons
187 %attr(755,root,root) %{_bindir}/setkeycodes
188 %attr(755,root,root) %{_bindir}/setleds
189 %attr(755,root,root) %{_bindir}/setmetamode
190 %attr(755,root,root) %{_bindir}/setvtrgb
191 %attr(755,root,root) %{_bindir}/showconsolefont
192 %attr(755,root,root) %{_bindir}/showkey
194 %{_ldatadir}/consolefonts
195 %{_ldatadir}/consoletrans
199 %{_mandir}/man1/chvt.1*
200 %{_mandir}/man1/deallocvt.1*
201 %{_mandir}/man1/dumpkeys.1*
202 %{_mandir}/man1/fgconsole.1*
203 %{_mandir}/man1/kbd_mode.1*
204 %{_mandir}/man1/loadkeys.1*
205 %{_mandir}/man1/openvt.1*
206 %{_mandir}/man1/psfaddtable.1*
207 %{_mandir}/man1/psfgettable.1*
208 %{_mandir}/man1/psfstriptable.1*
209 %{_mandir}/man1/psfxtable.1*
210 %{_mandir}/man1/setleds.1*
211 %{_mandir}/man1/setmetamode.1*
212 %{_mandir}/man1/showkey.1*
213 %{_mandir}/man1/unicode_start.1*
214 %{_mandir}/man1/unicode_stop.1*
215 %{_mandir}/man5/keymaps.5*
216 %{_mandir}/man8/getkeycodes.8*
217 %{_mandir}/man8/kbdrate.8*
218 %{_mandir}/man8/loadunimap.8*
219 %{_mandir}/man8/mapscrn.8*
220 %ifarch %{ix86} %{x8664}
221 %{_mandir}/man8/resizecons.8*
223 %{_mandir}/man8/setfont.8*
224 %{_mandir}/man8/setkeycodes.8*
225 %{_mandir}/man8/setvtrgb.8*
226 %{_mandir}/man8/showconsolefont.8*
227 %lang(es) %{_mandir}/es/man[158]/*
228 %lang(fi) %{_mandir}/fi/man[158]/*
229 %lang(fr) %{_mandir}/fr/man[158]/*
230 %lang(hu) %{_mandir}/hu/man[158]/*
231 %lang(ko) %{_mandir}/ko/man[158]/*
232 %lang(pl) %{_mandir}/pl/man[158]/*
236 %defattr(644,root,root,755)
237 %doc src/vlock/README.vlock
238 %attr(755,root,root) %{_bindir}/vlock
239 %{_mandir}/man1/vlock.1*