3 %bcond_without python # python extensions
4 %bcond_without static_libs # static library
6 Summary: OpenFst - library for finite state transducers development
7 Summary(pl.UTF-8): OpenFst - biblioteka do programowania automatów skończonych z wyjściem
13 #Source0Download: http://www.openfst.org/twiki/bin/view/FST/FstDownload
14 Source0: http://www.openfst.org/twiki/pub/FST/FstDownload/%{name}-%{version}.tar.gz
15 # Source0-md5: a24fee5ffe28744c6fb7b1a49e0006c4
16 Patch0: %{name}-link.patch
17 Patch1: %{name}-python.patch
18 URL: http://www.openfst.org/
19 BuildRequires: autoconf >= 2.50
20 BuildRequires: automake
21 BuildRequires: libstdc++-devel >= 6:4.7
22 BuildRequires: libtool >= 2:1.5
23 %{?with_python:BuildRequires: python-devel >= 1:2.7}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 # modules dlopened from libfst refer to symbols from the library
27 %define skip_post_check_so .*%{_libdir}/fst/.*\.so.*
30 OpenFst is a library for constructing, combining, optimizing, and
31 searching weighted finite-state transducers (FSTs).
33 %description -l pl.UTF-8
34 OpenFst to biblioteka do konstruowania, łączenia, optymalizacji i
35 przeszukiwania automatów skończonych z wyjściem (FST) i wagami.
38 Summary: Header files for OpenFst library
39 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenFst
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
42 Requires: libstdc++-devel >= 6:4.7
45 Header files for OpenFst library.
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki OpenFst.
51 Summary: Static OpenFst library
52 Summary(pl.UTF-8): Statyczna biblioteka OpenFst
53 Group: Development/Libraries
54 Requires: %{name}-devel = %{version}-%{release}
57 Static OpenFst library.
59 %description static -l pl.UTF-8
60 Statyczna biblioteka OpenFst.
62 %package -n python-openfst
63 Summary: Python binding for OpenFst
64 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenFst
65 Group: Libraries/Python
66 Requires: %{name} = %{version}-%{release}
67 Requires: python-libs >= 1:2.7
69 %description -n python-openfst
70 Python binding for OpenFst.
72 %description -n python-openfst -l pl.UTF-8
73 Wiązanie Pythona do biblioteki OpenFst.
87 --enable-compact-fsts \
91 --enable-linear-fsts \
92 --enable-lookahead-fsts \
97 %{?with_static_libs:--enable-static}
102 rm -rf $RPM_BUILD_ROOT
105 DESTDIR=$RPM_BUILD_ROOT
107 %{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.la \
108 %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/fst.la}
109 %if %{with static_libs}
110 %{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.a \
111 %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/fst.a}
115 rm -rf $RPM_BUILD_ROOT
117 %post -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
121 %defattr(644,root,root,755)
122 %doc AUTHORS COPYING NEWS README
123 %attr(755,root,root) %{_bindir}/far*
124 %attr(755,root,root) %{_bindir}/fst*
125 %attr(755,root,root) %{_bindir}/mpdt*
126 %attr(755,root,root) %{_bindir}/pdt*
127 %attr(755,root,root) %{_libdir}/libfst.so.*.*.*
128 %attr(755,root,root) %ghost %{_libdir}/libfst.so.1
129 %attr(755,root,root) %{_libdir}/libfstscript.so.*.*.*
130 %attr(755,root,root) %ghost %{_libdir}/libfstscript.so.1
132 %attr(755,root,root) %{_libdir}/fst/*.so*
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_libdir}/libfst.so
137 %attr(755,root,root) %{_libdir}/libfstscript.so
139 %{_libdir}/libfstscript.la
142 %if %{with static_libs}
144 %defattr(644,root,root,755)
146 %{_libdir}/libfstscript.a
150 %files -n python-openfst
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{py_sitedir}/fst.so