]> git.pld-linux.org Git - packages/kbd.git/blob - kbd.spec
- updated gettext BR
[packages/kbd.git] / kbd.spec
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
3 # TODO:
4 # - pam file for vlock
5 # - probably it doesn't make sense to package ppc keymaps on x86 and vice versa
6 #
7 # Conditional build:
8 %bcond_without  vlock   # don't build vlock
9 #
10 Summary:        Linux console utilities
11 Summary(ko.UTF-8):      콘솔을 설정하는 도구 (글쇠판, 가상 터미널, 그 밖에)
12 Summary(pl.UTF-8):      Narzędzia do obsługi konsoli
13 Name:           kbd
14 Version:        2.0.2
15 Release:        1
16 License:        GPL v2+
17 Group:          Applications/Console
18 Source0:        ftp://ftp.altlinux.org/pub/people/legion/kbd/%{name}-%{version}.tar.gz
19 # Source0-md5:  f1f75f0dd5f7dde89ce47585274366f8
20 Source1:        %{name}.init
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
26 Source5:        lat2u.sfm.gz
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
32 Source6:        console.sh
33 Source7:        console.csh
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}-tty-detect.patch
41 URL:            http://www.kbd-project.org/
42 BuildRequires:  autoconf >= 2.60
43 BuildRequires:  automake >= 1:1.9
44 BuildRequires:  bison
45 #BuildRequires: check >= 0.9.4
46 BuildRequires:  doxygen
47 BuildRequires:  flex
48 BuildRequires:  gettext-tools >= 0.14.1
49 BuildRequires:  libtool >= 2:2
50 %{?with_vlock:BuildRequires:    pam-devel}
51 BuildRequires:  pkgconfig
52 Requires(post,preun):   /sbin/chkconfig
53 Requires:       %{name}-libs = %{version}-%{release}
54 Requires:       open
55 Requires:       rc-scripts >= 0.4.3.0
56 Requires:       sed
57 Requires:       util-linux
58 Obsoletes:      console-data
59 Obsoletes:      console-tools
60 Obsoletes:      console-tools-devel
61 Obsoletes:      console-tools-static
62 Conflicts:      man-pages < 1.43-5
63 Conflicts:      util-linux < 2.11
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %define         _ldatadir       /lib/%{name}
67
68 %description
69 This package contains utilities to load console fonts and keyboard
70 maps. It also includes a number of different fonts and keyboard maps.
71
72 %description -l pl.UTF-8
73 Pakiet zawiera narzędzia do ładowania fontów konsolowych oraz map
74 klawiatury. Dodatkowo dołączono znaczną liczbę różnych fontów i map.
75
76 %package vlock
77 Summary:        Utility to lock one or more virtual consoles
78 Summary(pl.UTF-8):      Narzędzie do blokowania jednej lub wielu konsol wirtualnych
79 Group:          Applications/Console
80 Requires:       %{name} = %{version}-%{release}
81
82 %description vlock
83 Utility to lock one or more virtual consoles.
84
85 %description vlock -l pl.UTF-8
86 Narzędzie do blokowania jednej lub wielu konsol wirtualnych.
87
88 %package libs
89 Summary:        libkeymap - library to manage the Linux keymaps
90 Summary(pl.UTF-8):      libkeymap - biblioteka do zarządzania linuksowymi przypisaniami klawiszy
91 Group:          Libraries
92
93 %description libs
94 libkeymap - library to manage the Linux keymaps.
95
96 %description libs -l pl.UTF-8
97 libkeymap - biblioteka do zarządzania linuksowymi przypisaniami
98 klawiszy.
99
100 %package devel
101 Summary:        Header files for libkeymap library
102 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libkeymap
103 Group:          Development/Libraries
104 Requires:       %{name}-libs = %{version}-%{release}
105
106 %description devel
107 Header files for libkeymap library.
108
109 %description devel -l pl.UTF-8
110 Pliki nagłówkowe biblioteki libkeymap.
111
112 %package static
113 Summary:        Static libkeymap library
114 Summary(pl.UTF-8):      Statyczna biblioteka libkeymap
115 Group:          Development/Libraries
116 Requires:       %{name}-devel = %{version}-%{release}
117
118 %description static
119 Static libkeymap library.
120
121 %description static -l pl.UTF-8
122 Statyczna biblioteka libkeymap.
123
124 %prep
125 %setup -q -a51 -a52
126 %patch0 -p1
127 %patch1 -p1
128
129 # force rebuild
130 %{__rm} docs/reference/libkeymap/Doxyfile
131
132 %build
133 %{__gettextize}
134 %{__libtoolize}
135 %{__aclocal} -I m4
136 %{__autoconf}
137 %{__autoheader}
138 %{__automake}
139 %configure \
140         --datadir=%{_ldatadir} \
141         --localedir=%{_datadir}/locale \
142         --enable-libkeymap \
143         --enable-nls \
144         --disable-silent-rules \
145         %{!?with_vlock:--disable-vlock}
146 %{__make}
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT{/bin,/etc/{profile.d,rc.d/init.d,sysconfig,init}}
151
152 %{__make} install \
153         DESTDIR=$RPM_BUILD_ROOT \
154         gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
155
156 # some binaries are needed in /bin but the rest is not
157 for f in setfont dumpkeys kbd_mode unicode_start unicode_stop; do
158         mv $RPM_BUILD_ROOT%{_bindir}/$f $RPM_BUILD_ROOT/bin
159 done
160
161 # move library to /lib* for utils in /bin
162 install -d $RPM_BUILD_ROOT/%{_lib}
163 mv $RPM_BUILD_ROOT%{_libdir}/libkeymap.so.* $RPM_BUILD_ROOT/%{_lib}
164 ln -sf $(basename $RPM_BUILD_ROOT/%{_lib}/libkeymap.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libkeymap.so
165 # no external dependencies; also .pc file exists
166 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkeymap.la
167
168 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/console
169 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/console
170 cp -p %{SOURCE12} $RPM_BUILD_ROOT/etc/init/console.conf
171 %ifarch sparc sparc64
172 %{__sed} -i -e 's/KEYTABLE=pl2/KEYTABLE=sunkeymap/' $RPM_BUILD_ROOT/etc/sysconfig/console
173 %endif
174
175 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_ldatadir}/consolefonts/lat2u-16.psfu.gz
176 gunzip -c %{SOURCE5} > $RPM_BUILD_ROOT%{_ldatadir}/unimaps/lat2u.uni
177
178 gzip -c %{SOURCE8} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl1.map.gz
179 gzip -c %{SOURCE9} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/mac/all/mac-pl.map.gz
180 gzip -c %{SOURCE10} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl3.map.gz
181 gzip -c %{SOURCE11} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl4.map.gz
182
183 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/profile.d
184 cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/profile.d
185
186 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
187
188 # Greek is el, not gr
189 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/gr
190 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{README.kbd-non-english-man-pages,kbd-keypaps_instead_keytables.patch}*
191
192 # doxygen docs
193 %{__rm} -rf docs-doxy
194 %{__mv} $RPM_BUILD_ROOT%{_docdir}/kbd/html docs-doxy
195
196 %find_lang %{name}
197
198 %clean
199 rm -rf $RPM_BUILD_ROOT
200
201 %post
202 /sbin/chkconfig --add console
203
204 %preun
205 if [ "$1" = "0" ]; then
206         /sbin/chkconfig --del console
207 fi
208
209 %post   libs -p /sbin/ldconfig
210 %postun libs -p /sbin/ldconfig
211
212 %files -f %{name}.lang
213 %defattr(644,root,root,755)
214 # COPYING contains copyright summary, not GPL text
215 %doc AUTHORS COPYING CREDITS ChangeLog README docs/doc/kbd.FAQ.txt
216 %attr(754,root,root) /etc/rc.d/init.d/console
217 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/console
218 %config(noreplace) %verify(not md5 mtime size) /etc/init/console.conf
219 %attr(755,root,root) /etc/profile.d/console.csh
220 %attr(755,root,root) /etc/profile.d/console.sh
221
222 %attr(755,root,root) /bin/dumpkeys
223 %attr(755,root,root) /bin/kbd_mode
224 %attr(755,root,root) /bin/setfont
225 %attr(755,root,root) /bin/unicode_start
226 %attr(755,root,root) /bin/unicode_stop
227 %attr(755,root,root) %{_bindir}/chvt
228 %attr(755,root,root) %{_bindir}/deallocvt
229 %attr(755,root,root) %{_bindir}/fgconsole
230 %attr(755,root,root) %{_bindir}/getkeycodes
231 %attr(755,root,root) %{_bindir}/kbdinfo
232 %attr(755,root,root) %{_bindir}/kbdrate
233 %attr(755,root,root) %{_bindir}/loadkeys
234 %attr(755,root,root) %{_bindir}/loadunimap
235 %attr(755,root,root) %{_bindir}/mapscrn
236 %attr(755,root,root) %{_bindir}/openvt
237 %attr(755,root,root) %{_bindir}/psfaddtable
238 %attr(755,root,root) %{_bindir}/psfgettable
239 %attr(755,root,root) %{_bindir}/psfstriptable
240 %attr(755,root,root) %{_bindir}/psfxtable
241 %ifarch %{ix86} %{x8664}
242 %attr(755,root,root) %{_bindir}/resizecons
243 %endif
244 %attr(755,root,root) %{_bindir}/setkeycodes
245 %attr(755,root,root) %{_bindir}/setleds
246 %attr(755,root,root) %{_bindir}/setmetamode
247 %attr(755,root,root) %{_bindir}/setvtrgb
248 %attr(755,root,root) %{_bindir}/showconsolefont
249 %attr(755,root,root) %{_bindir}/showkey
250 %dir %{_ldatadir}
251 %{_ldatadir}/consolefonts
252 %{_ldatadir}/consoletrans
253 %{_ldatadir}/keymaps
254 %{_ldatadir}/unimaps
255
256 %{_mandir}/man1/chvt.1*
257 %{_mandir}/man1/deallocvt.1*
258 %{_mandir}/man1/dumpkeys.1*
259 %{_mandir}/man1/fgconsole.1*
260 %{_mandir}/man1/kbd_mode.1*
261 %{_mandir}/man1/loadkeys.1*
262 %{_mandir}/man1/openvt.1*
263 %{_mandir}/man1/psfaddtable.1*
264 %{_mandir}/man1/psfgettable.1*
265 %{_mandir}/man1/psfstriptable.1*
266 %{_mandir}/man1/psfxtable.1*
267 %{_mandir}/man1/setleds.1*
268 %{_mandir}/man1/setmetamode.1*
269 %{_mandir}/man1/showkey.1*
270 %{_mandir}/man1/unicode_start.1*
271 %{_mandir}/man1/unicode_stop.1*
272 %{_mandir}/man5/keymaps.5*
273 %{_mandir}/man8/getkeycodes.8*
274 %{_mandir}/man8/kbdrate.8*
275 %{_mandir}/man8/loadunimap.8*
276 %{_mandir}/man8/mapscrn.8*
277 %ifarch %{ix86} %{x8664}
278 %{_mandir}/man8/resizecons.8*
279 %endif
280 %{_mandir}/man8/setfont.8*
281 %{_mandir}/man8/setkeycodes.8*
282 %{_mandir}/man8/setvtrgb.8*
283 %{_mandir}/man8/showconsolefont.8*
284 %lang(es) %{_mandir}/es/man[158]/*
285 %lang(fi) %{_mandir}/fi/man[158]/*
286 %lang(fr) %{_mandir}/fr/man[158]/*
287 %lang(hu) %{_mandir}/hu/man[158]/*
288 %lang(ko) %{_mandir}/ko/man[158]/*
289 %lang(pl) %{_mandir}/pl/man[158]/*
290
291 %if %{with vlock}
292 %files vlock
293 %defattr(644,root,root,755)
294 %doc src/vlock/README.vlock
295 %attr(755,root,root) %{_bindir}/vlock
296 %{_mandir}/man1/vlock.1*
297 %endif
298
299 %files libs
300 %defattr(644,root,root,755)
301 %attr(755,root,root) /%{_lib}/libkeymap.so.*.*.*
302 %attr(755,root,root) %ghost /%{_lib}/libkeymap.so.0
303
304 %files devel
305 %defattr(644,root,root,755)
306 %doc docs-doxy/*
307 %attr(755,root,root) %{_libdir}/libkeymap.so
308 %{_includedir}/keymap
309 %{_includedir}/keymap.h
310 %{_pkgconfigdir}/libkeymap.pc
311
312 %files static
313 %defattr(644,root,root,755)
314 %{_libdir}/libkeymap.a
This page took 0.102856 seconds and 3 git commands to generate.