]>
Commit | Line | Data |
---|---|---|
a602ed6f JB |
1 | # |
2 | # Conditional build: | |
5d9ab1b8 | 3 | %bcond_without apidocs # API documentation |
a602ed6f | 4 | %bcond_without ngram # ARPA ngram language model |
5d9ab1b8 | 5 | %bcond_without static_libs # static library |
a602ed6f JB |
6 | # |
7 | Summary: Presage - the intelligent predictive text entry system | |
8 | Summary(pl.UTF-8): Presage - inteligentny, przewidujący system wprowadzania tekstu | |
9 | Name: presage | |
10 | Version: 0.9.1 | |
daec572d | 11 | Release: 2 |
a602ed6f JB |
12 | License: GPL v2+ |
13 | Group: Libraries | |
14 | Source0: http://downloads.sourceforge.net/presage/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 9667be297912fa0d432e748526d8dd9e | |
16 | Patch0: %{name}-link.patch | |
17 | Patch1: %{name}-configure.patch | |
5d9ab1b8 JB |
18 | Patch2: %{name}-build.patch |
19 | Patch3: %{name}-cmuclmtk.patch | |
a602ed6f JB |
20 | URL: http://presage.sourceforge.net/ |
21 | BuildRequires: autoconf >= 2.50 | |
22 | BuildRequires: automake >= 1:1.9 | |
5d9ab1b8 | 23 | %{?with_ngram:BuildRequires: cmuclmtk >= 0.7} |
a602ed6f JB |
24 | BuildRequires: cppunit-devel >= 1.9.6 |
25 | %{?with_apidocs:BuildRequires: doxygen} | |
26 | BuildRequires: graphviz | |
27 | BuildRequires: glib2-devel >= 1:2.0 | |
28 | BuildRequires: gtk+2-devel >= 1:2.0 | |
29 | BuildRequires: help2man | |
30 | BuildRequires: libstdc++-devel | |
31 | BuildRequires: libtool >= 2:2 | |
32 | BuildRequires: ncurses-devel | |
33 | BuildRequires: pkgconfig | |
a602ed6f | 34 | BuildRequires: python-devel >= 2.0 |
5d9ab1b8 JB |
35 | BuildRequires: rpm-pythonprov |
36 | BuildRequires: rpmbuild(macros) >= 1.714 | |
37 | BuildRequires: sed >= 4.0 | |
a602ed6f JB |
38 | BuildRequires: sqlite3-devel >= 3 |
39 | BuildRequires: swig-python >= 2.0 | |
40 | BuildRequires: tinyxml-devel | |
41 | BuildRequires: xorg-lib-libX11-devel | |
42 | BuildRequires: xorg-lib-libXevie-devel | |
43 | Requires: %{name}-libs = %{version}-%{release} | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | Presage (formerly known as Soothsayer) generates predictions by | |
48 | modelling natural language as a combination of redundant information | |
49 | sources. Presage computes probabilities for words which are most | |
50 | likely to be entered next by merging predictions generated by the | |
51 | different predictive algorithms. Presage's modular and extensible | |
52 | architecture allows its language model to be extended and customized | |
53 | to utilize statistical, syntactic, and semantic predictive algorithms. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | Presage (wcześniej znany jako Soothsayer) generuje przewidywania | |
57 | poprzez modelowanie języka naturalnego jako kombinacji redundantnych | |
58 | źródeł informacji. Presage wylicza prawdopodobieństwa słów, które są | |
59 | najbardziej spodziewane być wpisane jako kolejne, łącząc przewidywania | |
60 | wygenerowane różnymi algorytmami predykcji. Modularna i rozszerzalna | |
61 | architektura Presage pozwala na rozszerzanie modelu języka i | |
62 | dostosowywanie go, aby wykorzystywał algorytmy statystyczne, | |
63 | syntaktyczne oraz semantyczne. | |
64 | ||
65 | %package libs | |
66 | Summary: Presage shared library | |
67 | Summary(pl.UTF-8): Biblioteka współdzielona Presage | |
68 | Group: Libraries | |
69 | ||
70 | %description libs | |
71 | Presage shared library. | |
72 | ||
73 | %description libs -l pl.UTF-8 | |
74 | Biblioteka współdzielona Presage. | |
75 | ||
76 | %package devel | |
77 | Summary: Header files for Presage library | |
78 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Presage | |
79 | Group: Development/Libraries | |
80 | Requires: %{name}-libs = %{version}-%{release} | |
81 | Requires: libstdc++-devel | |
82 | ||
83 | %description devel | |
84 | Header files for Presage library. | |
85 | ||
86 | %description devel -l pl.UTF-8 | |
87 | Pliki nagłówkowe biblioteki Presage. | |
88 | ||
89 | %package static | |
90 | Summary: Static Presage library | |
91 | Summary(pl.UTF-8): Statyczna biblioteka Presage | |
92 | Group: Development/Libraries | |
93 | Requires: %{name}-devel = %{version}-%{release} | |
94 | ||
95 | %description static | |
96 | Static Presage library. | |
97 | ||
98 | %description static -l pl.UTF-8 | |
99 | Statyczna biblioteka Presage. | |
100 | ||
101 | %package apidocs | |
102 | Summary: API documentation for Presage library | |
103 | Summary(pl.UTF-8): Dokumentacja API biblioteki Presage | |
104 | Group: Documentation | |
105 | %if "%{_rpmversion}" >= "5" | |
106 | BuildArch: noarch | |
107 | %endif | |
108 | ||
109 | %description apidocs | |
110 | API documentation for Presage library. | |
111 | ||
112 | %description apidocs -l pl.UTF-8 | |
113 | Dokumentacja API biblioteki Presage. | |
114 | ||
5d9ab1b8 JB |
115 | %package dbus |
116 | Summary: Presage DBus service | |
117 | Summary(pl.UTF-8): Usługa DBus presage | |
118 | Group: Applications | |
119 | Requires: %{name} = %{version}-%{release} | |
120 | Requires: python-dbus | |
121 | Requires: python-presage = %{version}-%{release} | |
daec572d | 122 | Requires: python-pygobject >= 2.28 |
5d9ab1b8 JB |
123 | |
124 | %description dbus | |
125 | Presage is an intelligent predictive text entry system. This package | |
126 | contains the presage D-Bus service. | |
127 | ||
128 | %description dbus | |
129 | Presage to inteligentny, przewidujący system wprowadzania tekstu. Ten | |
130 | pakiet zawiera usługę D-Bus presage. | |
131 | ||
132 | %package gtk | |
133 | Summary: GTK+ presage applications | |
134 | Summary(pl.UTF-8): Aplikacje presage oparte na GTK+ | |
135 | Group: X11/Applications | |
136 | Requires: %{name} = %{version}-%{release} | |
137 | ||
138 | %description gtk | |
139 | GTK+ presage applications: | |
140 | - gpresagemate: user input predictions using XEvIE extension | |
141 | - gprompter: intelligent predictive GTK+ text editor | |
142 | ||
143 | %description gtk -l pl.UTF-8 | |
144 | Aplikacje presage oparte na GTK+: | |
145 | - gpresagemate - przewidywanie wejścia użytkownika z wykorzystaniem | |
146 | rozszerzenia XEvIE | |
147 | - gprompter - inteligenty, przewidujący edytor tekstu oparty na GTK+ | |
148 | ||
149 | %package -n python-presage | |
150 | Summary: Python binding for presage | |
151 | Summary(pl.UTF-8): Wiązanie Pythona do presage | |
152 | Group: Libraries/Python | |
153 | Requires: %{name}-libs = %{version}-%{release} | |
154 | ||
155 | %description -n python-presage | |
156 | Python binding for presage, the intelligent predictive text entry | |
157 | system. | |
158 | ||
159 | %description -n python-presage -l pl.UTF-8 | |
160 | Wiązanie Pythona do presage - inteligentnego, przewidującego systemu | |
161 | wprowadzania tekstu. | |
162 | ||
163 | %package -n python-pypresagemate | |
164 | Summary: Python presagemate widget | |
165 | Summary(pl.UTF-8): Widget presagemate dla Pythona | |
166 | Group: Libraries/Python | |
167 | Requires: python-Xlib | |
168 | Requires: python-presage = %{version}-%{release} | |
169 | Requires: python-pyatspi | |
170 | Requires: python-pygtk-gtk >= 2:2 | |
171 | Requires: python-pygtk-pango >= 2:2 | |
172 | ||
173 | %description -n python-pypresagemate | |
174 | Python presagemate widget. | |
175 | ||
176 | %description -n python-pypresagemate -l pl.UTF-8 | |
177 | Widget presagemate dla Pythona. | |
178 | ||
179 | %package -n python-pyprompter | |
180 | Summary: pyprompter - intelligent predictive wxPython text editor | |
181 | Summary(pl.UTF-8): pyprompter - inteligentny, przewidujący edytor tekstu wykorzystujący bibliotekę wxPython | |
182 | Group: Libraries/Python | |
183 | Requires: python-wxPython | |
184 | ||
185 | %description -n python-pyprompter | |
186 | pyprompter is an intelligent predictive wxPython text editor. | |
187 | ||
188 | %description -n python-pyprompter -l pl.UTF-8 | |
189 | pyprompter to inteligentny, przewidujący edytor tekstu wykorzystujący | |
190 | bibliotekę wxPython. | |
191 | ||
a602ed6f JB |
192 | %prep |
193 | %setup -q | |
194 | %patch0 -p1 | |
5d9ab1b8 JB |
195 | %patch1 -p1 |
196 | %patch2 -p1 | |
197 | %patch3 -p1 | |
198 | ||
199 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' apps/dbus/{presage_dbus_python_demo,presage_dbus_service,presage_dbus_service.py} | |
a602ed6f JB |
200 | |
201 | %build | |
202 | %{__libtoolize} | |
203 | %{__aclocal} -I m4 | |
204 | %{__autoconf} | |
205 | %{__autoheader} | |
206 | %{__automake} | |
207 | %configure \ | |
208 | %{!?with_apidocs:--disable-documentation} \ | |
209 | %{!?with_static_libs:--disable-static} | |
210 | %{__make} | |
211 | ||
212 | %install | |
213 | rm -rf $RPM_BUILD_ROOT | |
214 | ||
215 | %{__make} install \ | |
216 | DESTDIR=$RPM_BUILD_ROOT | |
217 | ||
5d9ab1b8 JB |
218 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
219 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
a602ed6f JB |
220 | %py_postclean |
221 | ||
5d9ab1b8 JB |
222 | # not used |
223 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/presage.{svg,xpm} | |
224 | # packaged as %doc | |
225 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/html | |
226 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/{getting_started,python_binding}.txt | |
227 | ||
a602ed6f JB |
228 | %clean |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
231 | %post libs -p /sbin/ldconfig | |
232 | %postun libs -p /sbin/ldconfig | |
233 | ||
234 | %files | |
235 | %defattr(644,root,root,755) | |
236 | %doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO doc/getting_started.txt | |
a602ed6f | 237 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/presage.xml |
a602ed6f JB |
238 | %attr(755,root,root) %{_bindir}/presage_demo |
239 | %attr(755,root,root) %{_bindir}/presage_demo_text | |
240 | %attr(755,root,root) %{_bindir}/presage_python_demo | |
241 | %attr(755,root,root) %{_bindir}/presage_simulator | |
242 | %attr(755,root,root) %{_bindir}/text2ngram | |
243 | %dir %{_datadir}/%{name} | |
244 | %{_datadir}/%{name}/abbreviations_*.txt | |
a602ed6f | 245 | %if %{with ngram} |
5d9ab1b8 JB |
246 | %{_datadir}/%{name}/arpa_en.arpa |
247 | %{_datadir}/%{name}/arpa_en.vocab | |
248 | %{_datadir}/%{name}/arpa_it.arpa | |
249 | %{_datadir}/%{name}/arpa_it.vocab | |
a602ed6f | 250 | %endif |
5d9ab1b8 JB |
251 | %{_datadir}/%{name}/database_*.db |
252 | %{_datadir}/%{name}/presage.png | |
a602ed6f JB |
253 | %{_mandir}/man1/presage_demo.1* |
254 | %{_mandir}/man1/presage_demo_text.1* | |
255 | %{_mandir}/man1/presage_python_demo.1* | |
256 | %{_mandir}/man1/presage_simulator.1* | |
257 | %{_mandir}/man1/text2ngram.1* | |
258 | ||
5d9ab1b8 JB |
259 | %files libs |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_libdir}/libpresage.so.*.*.* | |
262 | %attr(755,root,root) %ghost %{_libdir}/libpresage.so.1 | |
a602ed6f JB |
263 | |
264 | %files devel | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %{_libdir}/libpresage.so | |
267 | %{_libdir}/libpresage.la | |
268 | %{_includedir}/presage*.h | |
269 | ||
270 | %if %{with static_libs} | |
271 | %files static | |
272 | %defattr(644,root,root,755) | |
273 | %{_libdir}/libpresage.a | |
274 | %endif | |
275 | ||
276 | %if %{with apidocs} | |
277 | %files apidocs | |
278 | %defattr(644,root,root,755) | |
5d9ab1b8 | 279 | %doc doc/html/*.{css,html,js,png} |
a602ed6f JB |
280 | %endif |
281 | ||
5d9ab1b8 JB |
282 | %files dbus |
283 | %defattr(644,root,root,755) | |
284 | # dbus service, R: python-dbus | |
285 | %attr(755,root,root) %{_bindir}/presage_dbus_python_demo | |
286 | %attr(755,root,root) %{_bindir}/presage_dbus_service | |
287 | %{py_sitescriptdir}/presage_dbus_service.py[co] | |
288 | %{_datadir}/dbus-1/services/org.gnome.presage.service | |
289 | %{_mandir}/man1/presage_dbus_python_demo.1* | |
290 | %{_mandir}/man1/presage_dbus_service.1* | |
291 | ||
292 | %files gtk | |
293 | %defattr(644,root,root,755) | |
294 | %attr(755,root,root) %{_bindir}/gpresagemate | |
295 | %attr(755,root,root) %{_bindir}/gprompter | |
296 | %{_desktopdir}/gprompter.desktop | |
297 | %{_iconsdir}/hicolor/scalable/apps/gprompter.svg | |
298 | %{_pixmapsdir}/gprompter.png | |
299 | %{_pixmapsdir}/gprompter.xpm | |
300 | %{_mandir}/man1/gprompter.1* | |
301 | ||
302 | %files -n python-presage | |
303 | %defattr(644,root,root,755) | |
304 | %doc doc/python_binding.txt | |
305 | %attr(755,root,root) %{py_sitedir}/_presage.so | |
306 | %{py_sitedir}/presage.py[co] | |
307 | %{py_sitedir}/python_presage-%{version}-py*.egg-info | |
a602ed6f | 308 | |
5d9ab1b8 JB |
309 | %files -n python-pypresagemate |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_bindir}/pypresagemate | |
312 | %{py_sitescriptdir}/presagemate | |
313 | ||
314 | %files -n python-pyprompter | |
315 | %defattr(644,root,root,755) | |
316 | %attr(755,root,root) %{_bindir}/pyprompter | |
317 | %{py_sitedir}/prompter | |
318 | %{py_sitedir}/pyprompter-%{version}-py*.egg-info | |
319 | %{_desktopdir}/pyprompter.desktop | |
320 | %{_iconsdir}/hicolor/scalable/apps/pyprompter.svg | |
321 | %{_pixmapsdir}/pyprompter.png | |
322 | %{_pixmapsdir}/pyprompter.xpm | |
323 | %{_mandir}/man1/pyprompter.1* |