]> git.pld-linux.org Git - packages/kbd.git/blob - kbd.spec
- drop upstart support
[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.3
15 Release:        2
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:  d636ee56f35233b5cd6f855c08372489
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 Source52:       http://pkgs.fedoraproject.org/repo/pkgs/kbd/%{name}-latarcyrheb-16-fixed.tar.bz2/cb1e2d5ba5d4cb8b0a27367029d36a56/kbd-latarcyrheb-16-fixed.tar.bz2
29 # Source52-md5: cb1e2d5ba5d4cb8b0a27367029d36a56
30 Source6:        console.sh
31 Source7:        console.csh
32 Source8:        %{name}-pl1.kmap
33 Source9:        %{name}-mac-pl.kmap
34 Source10:       %{name}-pl3.map
35 Source11:       %{name}-pl4.map
36 Patch0:         %{name}-unicode_start.patch
37 Patch1:         %{name}-tty-detect.patch
38 URL:            http://kbd-project.org/
39 BuildRequires:  autoconf >= 2.60
40 BuildRequires:  automake >= 1:1.9
41 BuildRequires:  bison
42 #BuildRequires: check >= 0.9.4
43 BuildRequires:  doxygen
44 BuildRequires:  flex
45 BuildRequires:  gettext-tools >= 0.14.1
46 BuildRequires:  libtool >= 2:2
47 %{?with_vlock:BuildRequires:    pam-devel}
48 BuildRequires:  pkgconfig
49 Requires(post,preun):   /sbin/chkconfig
50 Requires:       %{name}-libs = %{version}-%{release}
51 Requires:       open
52 Requires:       rc-scripts >= 0.4.3.0
53 Requires:       sed
54 Requires:       util-linux
55 Obsoletes:      console-data
56 Obsoletes:      console-tools
57 Obsoletes:      console-tools-devel
58 Obsoletes:      console-tools-static
59 Conflicts:      man-pages < 1.43-5
60 Conflicts:      util-linux < 2.11
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %define         _ldatadir       /lib/%{name}
64
65 %description
66 This package contains utilities to load console fonts and keyboard
67 maps. It also includes a number of different fonts and keyboard maps.
68
69 %description -l pl.UTF-8
70 Pakiet zawiera narzędzia do ładowania fontów konsolowych oraz map
71 klawiatury. Dodatkowo dołączono znaczną liczbę różnych fontów i map.
72
73 %package vlock
74 Summary:        Utility to lock one or more virtual consoles
75 Summary(pl.UTF-8):      Narzędzie do blokowania jednej lub wielu konsol wirtualnych
76 Group:          Applications/Console
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
126 # force rebuild
127 %{__rm} docs/reference/libkeymap/Doxyfile
128
129 %build
130 %{__gettextize}
131 %{__libtoolize}
132 %{__aclocal} -I m4
133 %{__autoconf}
134 %{__autoheader}
135 %{__automake}
136 %configure \
137         --datadir=%{_ldatadir} \
138         --localedir=%{_datadir}/locale \
139         --enable-libkeymap \
140         --enable-nls \
141         --enable-optional-progs \
142         --disable-silent-rules \
143         %{!?with_vlock:--disable-vlock}
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}}
149
150 %{__make} install \
151         DESTDIR=$RPM_BUILD_ROOT \
152         gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
153
154 # some binaries are needed in /bin but the rest is not
155 for f in setfont dumpkeys kbd_mode unicode_start unicode_stop; do
156         mv $RPM_BUILD_ROOT%{_bindir}/$f $RPM_BUILD_ROOT/bin
157 done
158
159 # move library to /lib* for utils in /bin
160 install -d $RPM_BUILD_ROOT/%{_lib}
161 mv $RPM_BUILD_ROOT%{_libdir}/libkeymap.so.* $RPM_BUILD_ROOT/%{_lib}
162 ln -sf $(basename $RPM_BUILD_ROOT/%{_lib}/libkeymap.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libkeymap.so
163 # no external dependencies; also .pc file exists
164 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkeymap.la
165
166 # optional-progs:
167 # obsoleted by setfont
168 %{__rm} $RPM_BUILD_ROOT{%{_bindir}/getunimap,%{_mandir}/man8/getunimap.8}
169 # optional-progs: man pages for not installed utils from contrib
170 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{codepage,splitfont}.1
171 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/{mk_modmap,vcstime}.8
172
173 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/console
174 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/console
175 %ifarch sparc sparc64
176 %{__sed} -i -e 's/KEYTABLE=pl2/KEYTABLE=sunkeymap/' $RPM_BUILD_ROOT/etc/sysconfig/console
177 %endif
178
179 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_ldatadir}/consolefonts/lat2u-16.psfu.gz
180 gunzip -c %{SOURCE5} > $RPM_BUILD_ROOT%{_ldatadir}/unimaps/lat2u.uni
181
182 gzip -c %{SOURCE8} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl1.map.gz
183 gzip -c %{SOURCE9} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/mac/all/mac-pl.map.gz
184 gzip -c %{SOURCE10} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl3.map.gz
185 gzip -c %{SOURCE11} > $RPM_BUILD_ROOT%{_ldatadir}/keymaps/i386/qwerty/pl4.map.gz
186
187 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/profile.d
188 cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/profile.d
189
190 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
191
192 # Greek is el, not gr
193 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/gr
194 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{README.kbd-non-english-man-pages,kbd-keypaps_instead_keytables.patch}*
195
196 # doxygen docs
197 %{__rm} -rf docs-doxy
198 %{__mv} $RPM_BUILD_ROOT%{_docdir}/kbd/html docs-doxy
199
200 %find_lang %{name}
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %post
206 /sbin/chkconfig --add console
207
208 %preun
209 if [ "$1" = "0" ]; then
210         /sbin/chkconfig --del console
211 fi
212
213 %post   libs -p /sbin/ldconfig
214 %postun libs -p /sbin/ldconfig
215
216 %files -f %{name}.lang
217 %defattr(644,root,root,755)
218 # COPYING contains copyright summary, not GPL text
219 %doc AUTHORS COPYING CREDITS ChangeLog README docs/doc/kbd.FAQ.txt
220 %attr(754,root,root) /etc/rc.d/init.d/console
221 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/console
222 %attr(755,root,root) /etc/profile.d/console.csh
223 %attr(755,root,root) /etc/profile.d/console.sh
224
225 %attr(755,root,root) /bin/dumpkeys
226 %attr(755,root,root) /bin/kbd_mode
227 %attr(755,root,root) /bin/setfont
228 %attr(755,root,root) /bin/unicode_start
229 %attr(755,root,root) /bin/unicode_stop
230 %attr(755,root,root) %{_bindir}/chvt
231 %attr(755,root,root) %{_bindir}/clrunimap
232 %attr(755,root,root) %{_bindir}/deallocvt
233 %attr(755,root,root) %{_bindir}/fgconsole
234 %attr(755,root,root) %{_bindir}/getkeycodes
235 %attr(755,root,root) %{_bindir}/kbdinfo
236 %attr(755,root,root) %{_bindir}/kbdrate
237 %attr(755,root,root) %{_bindir}/loadkeys
238 %attr(755,root,root) %{_bindir}/loadunimap
239 %attr(755,root,root) %{_bindir}/mapscrn
240 %attr(755,root,root) %{_bindir}/openvt
241 %attr(755,root,root) %{_bindir}/outpsfheader
242 %attr(755,root,root) %{_bindir}/psfaddtable
243 %attr(755,root,root) %{_bindir}/psfgettable
244 %attr(755,root,root) %{_bindir}/psfstriptable
245 %attr(755,root,root) %{_bindir}/psfxtable
246 %ifarch %{ix86} %{x8664}
247 %attr(755,root,root) %{_bindir}/resizecons
248 %endif
249 %attr(755,root,root) %{_bindir}/screendump
250 %attr(755,root,root) %{_bindir}/setkeycodes
251 %attr(755,root,root) %{_bindir}/setleds
252 %attr(755,root,root) %{_bindir}/setlogcons
253 %attr(755,root,root) %{_bindir}/setmetamode
254 %attr(755,root,root) %{_bindir}/setpalette
255 %attr(755,root,root) %{_bindir}/setvesablank
256 %attr(755,root,root) %{_bindir}/setvtrgb
257 %attr(755,root,root) %{_bindir}/showconsolefont
258 %attr(755,root,root) %{_bindir}/showkey
259 %attr(755,root,root) %{_bindir}/spawn_console
260 %attr(755,root,root) %{_bindir}/spawn_login
261 %dir %{_ldatadir}
262 %{_ldatadir}/consolefonts
263 %{_ldatadir}/consoletrans
264 %{_ldatadir}/keymaps
265 %{_ldatadir}/unimaps
266
267 %{_mandir}/man1/chvt.1*
268 %{_mandir}/man1/deallocvt.1*
269 %{_mandir}/man1/dumpkeys.1*
270 %{_mandir}/man1/fgconsole.1*
271 %{_mandir}/man1/kbd_mode.1*
272 %{_mandir}/man1/loadkeys.1*
273 %{_mandir}/man1/openvt.1*
274 %{_mandir}/man1/psfaddtable.1*
275 %{_mandir}/man1/psfgettable.1*
276 %{_mandir}/man1/psfstriptable.1*
277 %{_mandir}/man1/psfxtable.1*
278 %{_mandir}/man1/screendump.1*
279 %{_mandir}/man1/setleds.1*
280 %{_mandir}/man1/setmetamode.1*
281 %{_mandir}/man1/showkey.1*
282 %{_mandir}/man1/unicode_start.1*
283 %{_mandir}/man1/unicode_stop.1*
284 %{_mandir}/man5/keymaps.5*
285 %{_mandir}/man8/clrunimap.8*
286 %{_mandir}/man8/getkeycodes.8*
287 %{_mandir}/man8/kbdrate.8*
288 %{_mandir}/man8/loadunimap.8*
289 %{_mandir}/man8/mapscrn.8*
290 %ifarch %{ix86} %{x8664}
291 %{_mandir}/man8/resizecons.8*
292 %endif
293 %{_mandir}/man8/setfont.8*
294 %{_mandir}/man8/setkeycodes.8*
295 %{_mandir}/man8/setlogcons.8*
296 %{_mandir}/man8/setvesablank.8*
297 %{_mandir}/man8/setvtrgb.8*
298 %{_mandir}/man8/showconsolefont.8*
299 %lang(es) %{_mandir}/es/man[158]/*
300 %lang(fi) %{_mandir}/fi/man[158]/*
301 %lang(fr) %{_mandir}/fr/man[158]/*
302 %lang(hu) %{_mandir}/hu/man[158]/*
303 %lang(ko) %{_mandir}/ko/man[158]/*
304 %lang(pl) %{_mandir}/pl/man[158]/*
305
306 %if %{with vlock}
307 %files vlock
308 %defattr(644,root,root,755)
309 %doc src/vlock/README.vlock
310 %attr(755,root,root) %{_bindir}/vlock
311 %{_mandir}/man1/vlock.1*
312 %endif
313
314 %files libs
315 %defattr(644,root,root,755)
316 %attr(755,root,root) /%{_lib}/libkeymap.so.*.*.*
317 %attr(755,root,root) %ghost /%{_lib}/libkeymap.so.0
318
319 %files devel
320 %defattr(644,root,root,755)
321 %doc docs-doxy/*
322 %attr(755,root,root) %{_libdir}/libkeymap.so
323 %{_includedir}/keymap
324 %{_includedir}/keymap.h
325 %{_pkgconfigdir}/libkeymap.pc
326
327 %files static
328 %defattr(644,root,root,755)
329 %{_libdir}/libkeymap.a
This page took 0.050833 seconds and 3 git commands to generate.