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