3 %bcond_without python3 # Python 3 binding
4 %bcond_without readline # readline in interactive programs
6 Summary: Helsinki Finite-State Transducer (library and application suite)
7 Summary(pl.UTF-8): Helsinki Finite-State Transducer (biblioteka i zestaw aplikacji)
11 License: LGPL v3 (library), GPL v3 (tools)
12 Group: Applications/Text
13 #Source0Download: https://github.com/hfst/hfst/releases
14 Source0: https://github.com/hfst/hfst/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 31b046a2c42c5f169dd1a973b82677f4
16 Patch0: %{name}-pc.patch
18 Patch2: %{name}-python3.patch
19 URL: http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
20 # bundled library is used
21 #BuildRequires: SFST-devel
22 BuildRequires: autoconf >= 2.62
23 BuildRequires: automake >= 1:1.12
25 BuildRequires: flex >= 2.5.35
26 BuildRequires: glib2-devel >= 1:2.16
27 BuildRequires: libstdc++-devel
28 BuildRequires: libtool >= 2:2.2
30 #BuildRequires: libxml2-devel >= 2
31 BuildRequires: ncurses-devel
32 # bundled library is used
33 #BuildRequires: openfst-devel
34 BuildRequires: pkgconfig >= 1:0.14
35 BuildRequires: python >= 1:2.4
36 %{?with_python3:BuildRequires: python3 >= 1:3.2}
37 %{?with_readline:BuildRequires: readline-devel}
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.714
40 %{?with_python3:BuildRequires: swig-python}
41 BuildRequires: zlib-devel
42 Requires: glib2 >= 1:2.16
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 The Helsinki Finite-State Transducer software is intended for the
47 implementation of morphological analysers and other tools which are
48 based on weighted and unweigted finite-state transducer technology.
50 %description -l pl.UTF-8
51 Pakiet HFST (Helsinki Finite-State Transducer) to oprogramowanie
52 służące do implementacji analizatorów morfologicznych i innych
53 narzędzi opartych na technice przetwarzania ze skończoną liczbą
54 stanów z wagami lub bez.
57 Summary: HFST Tagger scripts
58 Summary(pl.UTF-8): Skrypty HFST Tagger
60 Group: Applications/Text
61 Requires: %{name} = %{version}-%{release}
64 HFST Tagger scripts written in Python.
66 %description tagger -l pl.UTF-8
67 Skrypty HFST Tagger napisane w Pythonie.
70 Summary: Header files for HFST library
71 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HFST
73 Group: Development/Libraries
74 Requires: %{name} = %{version}-%{release}
76 Requires: glib2-devel >= 1:2.16
77 Requires: libstdc++-devel
78 #Requires: openfst-devel
79 Requires: readline-devel
82 Header files for HFST library.
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki HFST.
88 Summary: Static HFST library
89 Summary(pl.UTF-8): Statyczna biblioteka HFST
91 Group: Development/Libraries
92 Requires: %{name}-devel = %{version}-%{release}
97 %description static -l pl.UTF-8
98 Statyczna biblioteka HFST.
100 %package -n python-hfst
101 Summary: Python 2 binding for HFST library
102 Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki HFST
104 Group: Libraries/Python
105 Requires: %{name} = %{version}-%{release}
107 %description -n python-hfst
108 Python 2 binding for HFST library.
110 %description -n python-hfst -l pl.UTF-8
111 Wiązanie Pythona 2 do biblioteki HFST.
113 %package -n python3-hfst
114 Summary: Python 3 binding for HFST library
115 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki HFST
117 Group: Libraries/Python
118 Requires: %{name} = %{version}-%{release}
120 %description -n python3-hfst
121 Python 3 binding for HFST library.
123 %description -n python3-hfst -l pl.UTF-8
124 Wiązanie Pythona 3 do biblioteki HFST.
140 --enable-foma-wrapper \
142 --enable-lexc-wrapper \
144 --disable-silent-rules \
146 --enable-train-tagger \
148 %{?with_readline:--with-readline} \
149 --with-unicode-handler=glib
151 # parallel build is broken with foma backend
161 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT%{_bindir}
165 DESTDIR=$RPM_BUILD_ROOT
167 # obsoleted by pkgconfig
168 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfst.la
170 # for transducer data
171 install -d $RPM_BUILD_ROOT%{_datadir}/hfst
181 rm -rf $RPM_BUILD_ROOT
183 %post -p /sbin/ldconfig
184 %postun -p /sbin/ldconfig
187 %defattr(644,root,root,755)
188 %doc AUTHORS NEWS README THANKS
189 %attr(755,root,root) %{_bindir}/hfst-*
190 %attr(755,root,root) %{_bindir}/hfst_foma
191 %attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libhfst.so.52
193 %dir %{_datadir}/hfst
194 %{_mandir}/man1/hfst-*.1*
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_bindir}/hfst_tagger_compute_data_statistics.py
199 %{py3_sitescriptdir}/hfst_tagger_compute_data_statistics.py
200 %{py3_sitescriptdir}/tagger_aux.py
201 %{py3_sitescriptdir}/__pycache__/hfst_tagger_compute_data_statistics.cpython-*.py[co]
202 %{py3_sitescriptdir}/__pycache__/tagger_aux.cpython-*.py[co]
203 %{_mandir}/man1/hfst_tagger_compute_data_statistics.py.1*
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_libdir}/libhfst.so
209 %{_aclocaldir}/hfst.m4
210 %{_pkgconfigdir}/hfst.pc
213 %defattr(644,root,root,755)
216 %files -n python-hfst
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{py_sitedir}/_libhfst.so
220 %{py_sitedir}/libhfst.py[co]
221 %{py_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
224 %files -n python3-hfst
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{py3_sitedir}/_libhfst.cpython-*.so
228 %{py3_sitedir}/libhfst.py
229 %{py3_sitedir}/__pycache__/libhfst.cpython-*.py[co]
230 %{py3_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info