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