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/releases/download/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 6cbdddcb9ef28aa5681081a8a1dc6b54
16 Patch0: %{name}-pc.patch
17 URL: http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
18 # bundled library is used
19 #BuildRequires: SFST-devel
20 BuildRequires: autoconf >= 2.62
21 BuildRequires: automake >= 1:1.11
23 BuildRequires: flex >= 2.5.35
24 BuildRequires: glib2-devel >= 1:2.16
25 BuildRequires: libstdc++-devel
26 BuildRequires: libtool >= 2:2.2
28 #BuildRequires: libxml2-devel >= 2
29 BuildRequires: ncurses-devel
30 # bundled library is used
31 #BuildRequires: openfst-devel
32 BuildRequires: pkgconfig >= 1:0.14
33 BuildRequires: python >= 1:2.4
34 %{?with_python3:BuildRequires: python3 >= 1:3.2}
35 %{?with_readline:BuildRequires: readline-devel}
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
38 %{?with_python3:BuildRequires: swig-python}
39 BuildRequires: zlib-devel
40 Requires: glib2 >= 1:2.16
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 The Helsinki Finite-State Transducer software is intended for the
45 implementation of morphological analysers and other tools which are
46 based on weighted and unweigted finite-state transducer technology.
48 %description -l pl.UTF-8
49 Pakiet HFST (Helsinki Finite-State Transducer) to oprogramowanie
50 służące do implementacji analizatorów morfologicznych i innych
51 narzędzi opartych na technice przetwarzania ze skończoną liczbą
52 stanów z wagami lub bez.
55 Summary: HFST Tagger scripts
56 Summary(pl.UTF-8): Skrypty HFST Tagger
58 Group: Applications/Text
59 Requires: %{name} = %{version}-%{release}
62 HFST Tagger scripts written in Python.
64 %description tagger -l pl.UTF-8
65 Skrypty HFST Tagger napisane w Pythonie.
68 Summary: Header files for HFST library
69 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HFST
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
74 Requires: glib2-devel >= 1:2.16
75 Requires: libstdc++-devel
76 #Requires: openfst-devel
77 Requires: readline-devel
80 Header files for HFST library.
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe biblioteki HFST.
86 Summary: Static HFST library
87 Summary(pl.UTF-8): Statyczna biblioteka HFST
89 Group: Development/Libraries
90 Requires: %{name}-devel = %{version}-%{release}
95 %description static -l pl.UTF-8
96 Statyczna biblioteka HFST.
98 %package -n python-hfst
99 Summary: Python 2 binding for HFST library
100 Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki HFST
102 Group: Libraries/Python
103 Requires: %{name} = %{version}-%{release}
105 %description -n python-hfst
106 Python 2 binding for HFST library.
108 %description -n python-hfst -l pl.UTF-8
109 Wiązanie Pythona 2 do biblioteki HFST.
111 %package -n python3-hfst
112 Summary: Python 3 binding for HFST library
113 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki HFST
115 Group: Libraries/Python
116 Requires: %{name} = %{version}-%{release}
118 %description -n python3-hfst
119 Python 3 binding for HFST library.
121 %description -n python3-hfst -l pl.UTF-8
122 Wiązanie Pythona 3 do biblioteki HFST.
136 --enable-foma-wrapper \
138 --enable-lexc-wrapper \
140 --disable-silent-rules \
143 %{?with_readline:--with-readline} \
144 --with-unicode-handler=glib
146 # parallel build is broken with foma backend
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT%{_bindir}
160 DESTDIR=$RPM_BUILD_ROOT
162 # obsoleted by pkgconfig
163 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfst.la
165 # for transducer data
166 install -d $RPM_BUILD_ROOT%{_datadir}/hfst
176 rm -rf $RPM_BUILD_ROOT
178 %post -p /sbin/ldconfig
179 %postun -p /sbin/ldconfig
182 %defattr(644,root,root,755)
183 %doc AUTHORS NEWS README THANKS
184 %attr(755,root,root) %{_bindir}/hfst-*
185 %attr(755,root,root) %{_bindir}/hfst_foma
186 %attr(755,root,root) %{_bindir}/htwolcpre*
187 %attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
188 %attr(755,root,root) %ghost %{_libdir}/libhfst.so.46
189 %dir %{_datadir}/hfst
190 %{_mandir}/man1/hfst-*.1*
191 %{_mandir}/man1/htwolcpre?.1*
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_bindir}/hfst_tagger_compute_data_statistics.py
196 %{py_sitescriptdir}/hfst_tagger_compute_data_statistics.py[co]
197 %{py_sitescriptdir}/tagger_aux.py[co]
198 %{_mandir}/man1/hfst_tagger_compute_data_statistics.py.1*
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/libhfst.so
204 %{_aclocaldir}/hfst.m4
205 %{_pkgconfigdir}/hfst.pc
208 %defattr(644,root,root,755)
211 %files -n python-hfst
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{py_sitedir}/_libhfst.so
215 %{py_sitedir}/libhfst.py[co]
216 %{py_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
219 %files -n python3-hfst
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{py3_sitedir}/_libhfst.cpython-*.so
223 %{py3_sitedir}/libhfst.py
224 %{py3_sitedir}/__pycache__/libhfst.cpython-*.py[co]
225 %{py3_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info