]>
Commit | Line | Data |
---|---|---|
e3d2fa45 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without gtk2 # GTK+ 2.x IM module | |
4 | %bcond_without gtk3 # GTK+ 3.x IM module | |
5 | %bcond_without qt # Qt library and IM module | |
6 | %bcond_without lua # Lua support | |
7 | ||
8 | Summary: Fcitx - input method framework with extension support | |
9 | Summary(pl.UTF-8): Fcitx - szkielet metody wprowadzania znaków z obsługą rozszerzeń | |
10 | Name: fcitx | |
45f1afa7 | 11 | Version: 4.2.9.7 |
e3d2fa45 JB |
12 | Release: 1 |
13 | License: GPL v2+ with plugins exception | |
14 | Group: X11/Applications | |
15 | Source0: https://download.fcitx-im.org/fcitx/%{name}-%{version}.tar.xz | |
45f1afa7 | 16 | # Source0-md5: c58869c4ef9d3f57287a3d1f539c9850 |
e3d2fa45 | 17 | URL: https://fcitx-im.org/ |
e3d2fa45 JB |
18 | BuildRequires: cairo-devel >= 1.0 |
19 | BuildRequires: cmake >= 3.1 | |
20 | BuildRequires: dbus-devel >= 1.1.0 | |
21 | BuildRequires: doxygen | |
22 | BuildRequires: enchant-devel | |
055fd13d | 23 | BuildRequires: fontconfig-devel |
e3d2fa45 | 24 | BuildRequires: gcc >= 5:3.2 |
055fd13d | 25 | BuildRequires: gettext-devel |
e3d2fa45 JB |
26 | BuildRequires: gettext-tools |
27 | BuildRequires: glib2-devel >= 1:2.26 | |
28 | BuildRequires: gobject-introspection-devel | |
29 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 1:2.0} | |
30 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0} | |
055fd13d JB |
31 | BuildRequires: iso-codes |
32 | BuildRequires: json-c-devel | |
e3d2fa45 JB |
33 | BuildRequires: kf5-extra-cmake-modules >= 0.0.11 |
34 | BuildRequires: libuuid-devel | |
35 | BuildRequires: libxml2-devel >= 2.0 | |
055fd13d | 36 | %{?with_lua:BuildRequires: lua52-devel >= 5.2} |
e3d2fa45 JB |
37 | BuildRequires: opencc-devel |
38 | BuildRequires: pango-devel >= 1:1.0 | |
39 | BuildRequires: pkgconfig | |
89ee8dbf | 40 | BuildRequires: presage-devel |
e3d2fa45 JB |
41 | BuildRequires: tar >= 1:1.22 |
42 | BuildRequires: xkeyboard-config | |
43 | BuildRequires: xorg-lib-libX11-devel | |
44 | BuildRequires: xorg-lib-libXfixes-devel | |
45 | BuildRequires: xorg-lib-libXinerama-devel | |
46 | BuildRequires: xorg-lib-libxkbcommon-devel >= 0.5.0 | |
055fd13d | 47 | BuildRequires: xorg-lib-libxkbfile-devel |
e3d2fa45 JB |
48 | BuildRequires: xz |
49 | %if %{with qt} | |
50 | BuildRequires: QtCore-devel >= 4.8 | |
51 | BuildRequires: QtDBus-devel >= 4.8 | |
52 | BuildRequires: QtCore-devel >= 4.8 | |
53 | BuildRequires: qt4-build >= 4.8 | |
54 | %endif | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | %description | |
58 | Fcitx is an input method framework with extension support. Currently | |
59 | it supports Linux and Unix systems like FreeBSD. It has three built-in | |
60 | Input Method Engine, Pinyin, QuWei and Table-based input methods. | |
61 | ||
62 | Fcitx tries to provide a native feeling under all desktop as well as a | |
63 | light weight core. You can easily customize it to fit your | |
64 | requirements. | |
65 | ||
66 | %description -l pl.UTF-8 | |
67 | Fcitx to szkielet metody wprowadzania znaków z obsługą rozszerzeń. | |
68 | Obecnie obsługuje Linuksa oraz systemy uniksowe, takie jak FreeBSD. Ma | |
69 | trzy wbudowane silniki metod wprowadzania (IME): Pinyin, QuWei oraz | |
70 | Table. | |
71 | ||
72 | Fcitx próbuje zapewnić natywne zachowanie we wszystkich środowiskach, | |
73 | a także lekką część główną. Można go łatwo konfigurować, aby | |
74 | dostosować do własnych wymagań. | |
75 | ||
055fd13d JB |
76 | %package gtk2 |
77 | Summary: GTK+ 2.x Fcitx input method module | |
78 | Summary(pl.UTF-8): Moduł metody wprowadzania Fcitx dla GTK+ 2.x | |
79 | Group: X11/Libraries | |
80 | Requires: %{name}-glib = %{version}-%{release} | |
81 | ||
82 | %description gtk2 | |
83 | GTK+ 2.x Fcitx input method module. | |
84 | ||
85 | %description gtk2 -l pl.UTF-8 | |
86 | Moduł metody wprowadzania Fcitx dla GTK+ 2.x. | |
87 | ||
88 | %package gtk3 | |
89 | Summary: GTK+ 3.x Fcitx input method module | |
90 | Summary(pl.UTF-8): Moduł metody wprowadzania Fcitx dla GTK+ 3.x | |
91 | Group: X11/Libraries | |
92 | Requires: %{name}-glib = %{version}-%{release} | |
93 | ||
94 | %description gtk3 | |
95 | GTK+ 3.x Fcitx input method module. | |
96 | ||
97 | %description gtk3 -l pl.UTF-8 | |
98 | Moduł metody wprowadzania Fcitx dla GTK+ 3.x. | |
99 | ||
e3d2fa45 JB |
100 | %package libs |
101 | Summary: Fcitx shared libraries | |
102 | Summary(pl.UTF-8): Biblioteki współdzielone Fcitx | |
103 | Group: Libraries | |
104 | Requires: %{name}-libs = %{version}-%{release} | |
105 | ||
106 | %description libs | |
107 | Fcitx shared libraries. | |
108 | ||
109 | %description libs -l pl.UTF-8 | |
110 | Biblioteki współdzielone Fcitx. | |
111 | ||
112 | %package devel | |
113 | Summary: Header files for Fcitx libraries | |
114 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Fcitx | |
115 | Group: Development/Libraries | |
116 | Requires: %{name}-libs = %{version}-%{release} | |
117 | ||
118 | %description devel | |
119 | Header files for Fcitx libraries. | |
120 | ||
121 | %description devel -l pl.UTF-8 | |
122 | Pliki nagłówkowe bibliotek Fcitx. | |
123 | ||
055fd13d JB |
124 | %package glib |
125 | Summary: Fcitx client library for GLib | |
126 | Summary(pl.UTF-8): Biblioteka kliencka Fcitx dla GLiba | |
127 | Group: Libraries | |
128 | Requires: %{name}-libs = %{version}-%{release} | |
129 | Requires: glib2 >= 1:2.26 | |
130 | ||
131 | %description glib | |
132 | Fcitx client library for GLib. | |
133 | ||
134 | %description glib -l pl.UTF-8 | |
135 | Biblioteka kliencka Fcitx dla GLiba. | |
136 | ||
137 | %package glib-devel | |
138 | Summary: Header files for Fcitx client library for GLib | |
139 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej Fcitx dla GLiba | |
140 | Group: Libraries | |
141 | Requires: %{name}-devel = %{version}-%{release} | |
142 | Requires: %{name}-glib = %{version}-%{release} | |
143 | Requires: glib2-devel >= 1:2.26 | |
144 | ||
145 | %description glib-devel | |
146 | Header files for Fcitx client library for GLib. | |
147 | ||
148 | %description glib-devel -l pl.UTF-8 | |
149 | Pliki nagłówkowe biblioteki klienckiej Fcitx dla GLiba. | |
150 | ||
151 | %package qt | |
152 | Summary: Fcitx client/GUI library for Qt | |
153 | Summary(pl.UTF-8): Biblioteka kliencka/GUI Fcitx dla Qt | |
154 | Group: Libraries | |
155 | Requires: %{name}-libs = %{version}-%{release} | |
156 | Requires: QtCore >= 4.8 | |
157 | Requires: QtDBus >= 4.8 | |
158 | Requires: QtGui >= 4.8 | |
159 | ||
160 | %description qt | |
161 | Fcitx client/GUI library for Qt. | |
162 | ||
163 | %description qt -l pl.UTF-8 | |
164 | Biblioteka kliencka/GUI Fcitx dla Qt. | |
165 | ||
166 | %package qt-devel | |
167 | Summary: Header files for Fcitx client/GUI library for Qt | |
168 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej/GUI Fcitx dla Qt | |
169 | Group: Libraries | |
170 | Requires: %{name}-devel = %{version}-%{release} | |
171 | Requires: %{name}-qt = %{version}-%{release} | |
172 | Requires: QtCore-devel >= 4.8 | |
173 | Requires: QtDBus-devel >= 4.8 | |
174 | Requires: QtGui-devel >= 4.8 | |
175 | ||
176 | %description qt-devel | |
177 | Header files for Fcitx client/GUI library for Qt. | |
178 | ||
179 | %description qt-devel -l pl.UTF-8 | |
180 | Pliki nagłówkowe biblioteki klienckiej/GUI Fcitx dla Qt. | |
181 | ||
e3d2fa45 JB |
182 | %prep |
183 | %setup -q | |
184 | ||
45f1afa7 JB |
185 | %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \ |
186 | cmake/fcitx-{cmake-helper,extract-{confdesc,desktop,gettext,kde,po,qt},merge-config}.sh \ | |
187 | data/script/fcitx-diagnose.sh | |
188 | ||
e3d2fa45 JB |
189 | %build |
190 | install -d build | |
191 | cd build | |
192 | %cmake .. \ | |
193 | %{?debug:-DENABLE_DEBUG=ON} \ | |
194 | %{!?with_gtk2:-DENABLE_GTK2_IM_MODULE=OFF} \ | |
195 | %{?with_gtk3:-DENABLE_GTK3_IM_MODULE=ON} \ | |
196 | %{?with_lua:-DENABLE_LUA=ON} \ | |
197 | %{!?with_qt:-DENABLE_QT=OFF} \ | |
198 | -DLIB_INSTALL_DIR=%{_libdir} \ | |
199 | -DSYSCONFDIR=%{_sysconfdir} | |
200 | ||
201 | %{__make} | |
202 | ||
203 | %install | |
204 | rm -rf $RPM_BUILD_ROOT | |
205 | ||
206 | %{__make} -C build install \ | |
207 | DESTDIR=$RPM_BUILD_ROOT | |
208 | ||
209 | # packaged as %doc | |
210 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/fcitx | |
211 | ||
212 | %find_lang %{name} | |
213 | ||
214 | %clean | |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
217 | %post libs -p /sbin/ldconfig | |
218 | %postun libs -p /sbin/ldconfig | |
219 | ||
ce59b058 JB |
220 | %post glib -p /sbin/ldconfig |
221 | %postun glib -p /sbin/ldconfig | |
222 | ||
223 | %post qt -p /sbin/ldconfig | |
224 | %postun qt -p /sbin/ldconfig | |
225 | ||
e3d2fa45 JB |
226 | %files -f %{name}.lang |
227 | %defattr(644,root,root,755) | |
228 | %doc AUTHORS COPYING.LIBS COPYING.MIT ChangeLog README THANKS doc/{API.txt,Develop_Readme,cjkvinput.txt,pinyin.txt,wb_fh.htm} | |
229 | %attr(755,root,root) %{_bindir}/createPYMB | |
230 | %attr(755,root,root) %{_bindir}/fcitx | |
231 | %attr(755,root,root) %{_bindir}/fcitx-autostart | |
232 | %attr(755,root,root) %{_bindir}/fcitx-configtool | |
055fd13d | 233 | # R: dbus |
e3d2fa45 JB |
234 | %attr(755,root,root) %{_bindir}/fcitx-dbus-watcher |
235 | %attr(755,root,root) %{_bindir}/fcitx-diagnose | |
055fd13d | 236 | # R: dbus |
e3d2fa45 JB |
237 | %attr(755,root,root) %{_bindir}/fcitx-remote |
238 | %attr(755,root,root) %{_bindir}/fcitx-skin-installer | |
239 | %attr(755,root,root) %{_bindir}/mb2org | |
240 | %attr(755,root,root) %{_bindir}/mb2txt | |
241 | %attr(755,root,root) %{_bindir}/readPYBase | |
242 | %attr(755,root,root) %{_bindir}/readPYMB | |
243 | %attr(755,root,root) %{_bindir}/scel2org | |
244 | %attr(755,root,root) %{_bindir}/txt2mb | |
245 | /etc/xdg/autostart/fcitx-autostart.desktop | |
055fd13d JB |
246 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-autoeng.so |
247 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-chttrans.so | |
248 | # R: libX11 libXext cairo pango | |
249 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-classic-ui.so | |
250 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-clipboard.so | |
251 | # R: dbus | |
252 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-dbus.so | |
253 | # R: dbus | |
254 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-freedesktop-notify.so | |
255 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-fullwidth-char.so | |
256 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-imselector.so | |
257 | # R: dbus | |
258 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-ipc.so | |
259 | # R: dbus libuuid | |
260 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-ipcportal.so | |
261 | # R: json-c xkbcommon | |
262 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-keyboard.so | |
263 | # R: dbus | |
264 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-kimpanel-ui.so | |
265 | # R: lua52 | |
266 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-lua.so | |
267 | # R: dbus | |
268 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-notificationitem.so | |
269 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-pinyin.so | |
270 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-pinyin-enhance.so | |
271 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-punc.so | |
272 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-quickphrase.so | |
273 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-qw.so | |
274 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-remote-module.so | |
275 | # dlopens enchant or presage | |
276 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-spell.so | |
277 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-table.so | |
278 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-unicode.so | |
279 | # R: libX11 cairo pango | |
280 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-vk.so | |
281 | # R: libX11 libXfixes libXinerama libXrender | |
282 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-x11.so | |
283 | # R: libX11 libxkbfile libxml2 | |
284 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-xkb.so | |
285 | # R: dbus json-c | |
286 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-xkbdbus.so | |
287 | # R: libX11 | |
288 | %attr(755,root,root) %{_libdir}/fcitx/fcitx-xim.so | |
e3d2fa45 | 289 | %attr(755,root,root) %{_libdir}/fcitx/libexec/comp-spell-dict |
e3d2fa45 JB |
290 | %{_datadir}/dbus-1/services/org.fcitx.Fcitx.service |
291 | %{_datadir}/fcitx | |
292 | %{_datadir}/mime/packages/x-fskin.xml | |
293 | %{_desktopdir}/fcitx.desktop | |
294 | %{_desktopdir}/fcitx-configtool.desktop | |
295 | %{_desktopdir}/fcitx-skin-installer.desktop | |
296 | %{_iconsdir}/hicolor/*x*/apps/fcitx*.png | |
297 | %{_iconsdir}/hicolor/scalable/apps/fcitx*.svg | |
298 | %{_mandir}/man1/createPYMB.1* | |
299 | %{_mandir}/man1/fcitx.1* | |
300 | %{_mandir}/man1/fcitx-remote.1* | |
301 | %{_mandir}/man1/mb2org.1* | |
302 | %{_mandir}/man1/mb2txt.1* | |
303 | %{_mandir}/man1/readPYBase.1* | |
304 | %{_mandir}/man1/readPYMB.1* | |
305 | %{_mandir}/man1/scel2org.1* | |
306 | %{_mandir}/man1/txt2mb.1* | |
307 | ||
055fd13d JB |
308 | %if %{with gtk2} |
309 | %files gtk2 | |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_libdir}/gtk-2.0/2.*/immodules/im-fcitx.so | |
312 | %endif | |
313 | ||
314 | %if %{with gtk3} | |
315 | %files gtk3 | |
316 | %defattr(644,root,root,755) | |
317 | %attr(755,root,root) %{_libdir}/gtk-3.0/3.*/immodules/im-fcitx.so | |
318 | %endif | |
319 | ||
e3d2fa45 JB |
320 | %files libs |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) %{_libdir}/libfcitx-config.so.*.* | |
323 | %attr(755,root,root) %ghost %{_libdir}/libfcitx-config.so.4 | |
324 | %attr(755,root,root) %{_libdir}/libfcitx-core.so.*.* | |
325 | %attr(755,root,root) %ghost %{_libdir}/libfcitx-core.so.0 | |
e3d2fa45 JB |
326 | %attr(755,root,root) %{_libdir}/libfcitx-utils.so.*.* |
327 | %attr(755,root,root) %ghost %{_libdir}/libfcitx-utils.so.0 | |
e3d2fa45 JB |
328 | # common for base and -devel |
329 | %dir %{_libdir}/fcitx | |
330 | %dir %{_libdir}/fcitx/libexec | |
331 | ||
332 | %files devel | |
333 | %defattr(644,root,root,755) | |
334 | %attr(755,root,root) %{_bindir}/fcitx4-config | |
335 | %attr(755,root,root) %{_libdir}/libfcitx-config.so | |
336 | %attr(755,root,root) %{_libdir}/libfcitx-core.so | |
e3d2fa45 JB |
337 | %attr(755,root,root) %{_libdir}/libfcitx-utils.so |
338 | %attr(755,root,root) %{_libdir}/fcitx/libexec/fcitx-po-parser | |
339 | %attr(755,root,root) %{_libdir}/fcitx/libexec/fcitx-scanner | |
340 | %{_includedir}/fcitx | |
341 | %{_includedir}/fcitx-config | |
e3d2fa45 | 342 | %{_includedir}/fcitx-utils |
e3d2fa45 JB |
343 | %{_pkgconfigdir}/fcitx.pc |
344 | %{_pkgconfigdir}/fcitx-config.pc | |
e3d2fa45 JB |
345 | %{_pkgconfigdir}/fcitx-utils.pc |
346 | %dir %{_datadir}/cmake/fcitx | |
347 | %{_datadir}/cmake/fcitx/Fcitx*.cmake | |
348 | # scripts | |
349 | %attr(755,root,root) %{_datadir}/cmake/fcitx/fcitx-cmake-helper.sh | |
350 | %attr(755,root,root) %{_datadir}/cmake/fcitx/fcitx-extract-*.sh | |
351 | %attr(755,root,root) %{_datadir}/cmake/fcitx/fcitx-merge-config.sh | |
352 | %attr(755,root,root) %{_datadir}/cmake/fcitx/getdescpo | |
353 | # shell function libs | |
354 | %{_datadir}/cmake/fcitx/fcitx-parse-po.sh | |
355 | %{_datadir}/cmake/fcitx/fcitx-write-po.sh | |
055fd13d JB |
356 | |
357 | %files glib | |
358 | %defattr(644,root,root,755) | |
359 | %attr(755,root,root) %{_libdir}/libfcitx-gclient.so.*.* | |
360 | %attr(755,root,root) %ghost %{_libdir}/libfcitx-gclient.so.1 | |
361 | %{_libdir}/girepository-1.0/Fcitx-1.0.typelib | |
362 | ||
363 | %files glib-devel | |
364 | %defattr(644,root,root,755) | |
365 | %attr(755,root,root) %{_libdir}/libfcitx-gclient.so | |
366 | %{_includedir}/fcitx-gclient | |
367 | %{_datadir}/gir-1.0/Fcitx-1.0.gir | |
368 | %{_pkgconfigdir}/fcitx-gclient.pc | |
369 | ||
370 | %if %{with qt} | |
371 | %files qt | |
372 | %defattr(644,root,root,755) | |
373 | %attr(755,root,root) %{_libdir}/libfcitx-qt.so.*.* | |
374 | %attr(755,root,root) %ghost %{_libdir}/libfcitx-qt.so.0 | |
375 | %attr(755,root,root) %{_libdir}/fcitx/libexec/fcitx-qt-gui-wrapper | |
376 | %attr(755,root,root) %{_libdir}/qt4/plugins/inputmethods/qtim-fcitx.so | |
377 | ||
378 | %files qt-devel | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_libdir}/libfcitx-qt.so | |
381 | %{_includedir}/fcitx-qt | |
382 | %{_pkgconfigdir}/fcitx-qt.pc | |
383 | %endif |