]>
Commit | Line | Data |
---|---|---|
9d30ea08 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python # python extensions | |
4 | %bcond_without static_libs # static library | |
5 | # | |
c656d5f1 JB |
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 | |
8 | Name: openfst | |
b3b5d29b | 9 | Version: 1.6.5 |
b6786aa7 | 10 | Release: 1 |
c656d5f1 JB |
11 | License: Apache v2.0 |
12 | Group: Libraries | |
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 | |
b3b5d29b | 15 | # Source0-md5: 60bed07f4f5857d9be2e6f1ab3a2f055 |
8741f377 | 16 | Patch0: %{name}-python.patch |
c656d5f1 JB |
17 | URL: http://www.openfst.org/ |
18 | BuildRequires: autoconf >= 2.50 | |
19 | BuildRequires: automake | |
9d30ea08 | 20 | BuildRequires: libstdc++-devel >= 6:4.7 |
c656d5f1 | 21 | BuildRequires: libtool >= 2:1.5 |
9d30ea08 | 22 | %{?with_python:BuildRequires: python-devel >= 1:2.7} |
c656d5f1 JB |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | # modules dlopened from libfst refer to symbols from the library | |
26 | %define skip_post_check_so .*%{_libdir}/fst/.*\.so.* | |
27 | ||
28 | %description | |
29 | OpenFst is a library for constructing, combining, optimizing, and | |
30 | searching weighted finite-state transducers (FSTs). | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | OpenFst to biblioteka do konstruowania, łączenia, optymalizacji i | |
34 | przeszukiwania automatów skończonych z wyjściem (FST) i wagami. | |
35 | ||
36 | %package devel | |
37 | Summary: Header files for OpenFst library | |
38 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenFst | |
39 | Group: Development/Libraries | |
40 | Requires: %{name} = %{version}-%{release} | |
9d30ea08 | 41 | Requires: libstdc++-devel >= 6:4.7 |
c656d5f1 JB |
42 | |
43 | %description devel | |
44 | Header files for OpenFst library. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe biblioteki OpenFst. | |
48 | ||
49 | %package static | |
50 | Summary: Static OpenFst library | |
51 | Summary(pl.UTF-8): Statyczna biblioteka OpenFst | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-devel = %{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static OpenFst library. | |
57 | ||
58 | %description static -l pl.UTF-8 | |
59 | Statyczna biblioteka OpenFst. | |
60 | ||
9d30ea08 JB |
61 | %package -n python-openfst |
62 | Summary: Python binding for OpenFst | |
63 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenFst | |
64 | Group: Libraries/Python | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: python-libs >= 1:2.7 | |
67 | ||
68 | %description -n python-openfst | |
69 | Python binding for OpenFst. | |
70 | ||
71 | %description -n python-openfst -l pl.UTF-8 | |
72 | Wiązanie Pythona do biblioteki OpenFst. | |
73 | ||
c656d5f1 JB |
74 | %prep |
75 | %setup -q | |
76 | %patch0 -p1 | |
b6786aa7 | 77 | |
c656d5f1 JB |
78 | %build |
79 | %{__libtoolize} | |
80 | %{__aclocal} -I m4 | |
81 | %{__autoconf} | |
82 | %{__autoheader} | |
83 | %{__automake} | |
84 | %configure \ | |
85 | --enable-compact-fsts \ | |
9d30ea08 | 86 | --enable-compress \ |
c656d5f1 JB |
87 | --enable-const-fsts \ |
88 | --enable-far \ | |
9d30ea08 | 89 | --enable-linear-fsts \ |
c656d5f1 | 90 | --enable-lookahead-fsts \ |
9d30ea08 | 91 | --enable-mpdt \ |
b6786aa7 | 92 | --enable-ngram-fsts \ |
c656d5f1 | 93 | --enable-pdt \ |
9d30ea08 JB |
94 | --enable-python \ |
95 | %{?with_static_libs:--enable-static} | |
c656d5f1 JB |
96 | |
97 | %{__make} | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
0773b1b4 | 102 | %{__make} install \ |
c656d5f1 JB |
103 | DESTDIR=$RPM_BUILD_ROOT |
104 | ||
9d30ea08 | 105 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.la \ |
8741f377 | 106 | %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/pywrapfst.la} |
9d30ea08 JB |
107 | %if %{with static_libs} |
108 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.a \ | |
8741f377 | 109 | %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/pywrapfst.a} |
9d30ea08 | 110 | %endif |
c656d5f1 JB |
111 | |
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %post -p /sbin/ldconfig | |
116 | %postun -p /sbin/ldconfig | |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
b6786aa7 | 120 | %doc AUTHORS COPYING NEWS README |
c656d5f1 JB |
121 | %attr(755,root,root) %{_bindir}/far* |
122 | %attr(755,root,root) %{_bindir}/fst* | |
9d30ea08 | 123 | %attr(755,root,root) %{_bindir}/mpdt* |
c656d5f1 JB |
124 | %attr(755,root,root) %{_bindir}/pdt* |
125 | %attr(755,root,root) %{_libdir}/libfst.so.*.*.* | |
b3b5d29b | 126 | %attr(755,root,root) %ghost %{_libdir}/libfst.so.8 |
8741f377 | 127 | %attr(755,root,root) %{_libdir}/libfstcompact.so.*.*.* |
b3b5d29b | 128 | %attr(755,root,root) %ghost %{_libdir}/libfstcompact.so.8 |
8741f377 | 129 | %attr(755,root,root) %{_libdir}/libfstcompressscript.so.*.*.* |
b3b5d29b | 130 | %attr(755,root,root) %ghost %{_libdir}/libfstcompressscript.so.8 |
8741f377 | 131 | %attr(755,root,root) %{_libdir}/libfstconst.so.*.*.* |
b3b5d29b | 132 | %attr(755,root,root) %ghost %{_libdir}/libfstconst.so.8 |
8741f377 | 133 | %attr(755,root,root) %{_libdir}/libfstfar.so.*.*.* |
b3b5d29b | 134 | %attr(755,root,root) %ghost %{_libdir}/libfstfar.so.8 |
8741f377 | 135 | %attr(755,root,root) %{_libdir}/libfstfarscript.so.*.*.* |
b3b5d29b | 136 | %attr(755,root,root) %ghost %{_libdir}/libfstfarscript.so.8 |
8741f377 | 137 | %attr(755,root,root) %{_libdir}/libfstlinearscript.so.*.*.* |
b3b5d29b | 138 | %attr(755,root,root) %ghost %{_libdir}/libfstlinearscript.so.8 |
8741f377 | 139 | %attr(755,root,root) %{_libdir}/libfstlookahead.so.*.*.* |
b3b5d29b | 140 | %attr(755,root,root) %ghost %{_libdir}/libfstlookahead.so.8 |
8741f377 | 141 | %attr(755,root,root) %{_libdir}/libfstmpdtscript.so.*.*.* |
b3b5d29b | 142 | %attr(755,root,root) %ghost %{_libdir}/libfstmpdtscript.so.8 |
8741f377 | 143 | %attr(755,root,root) %{_libdir}/libfstngram.so.*.*.* |
b3b5d29b | 144 | %attr(755,root,root) %ghost %{_libdir}/libfstngram.so.8 |
8741f377 | 145 | %attr(755,root,root) %{_libdir}/libfstpdtscript.so.*.*.* |
b3b5d29b | 146 | %attr(755,root,root) %ghost %{_libdir}/libfstpdtscript.so.8 |
c656d5f1 | 147 | %attr(755,root,root) %{_libdir}/libfstscript.so.*.*.* |
b3b5d29b | 148 | %attr(755,root,root) %ghost %{_libdir}/libfstscript.so.8 |
c656d5f1 JB |
149 | %dir %{_libdir}/fst |
150 | %attr(755,root,root) %{_libdir}/fst/*.so* | |
151 | ||
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) %{_libdir}/libfst.so | |
8741f377 JB |
155 | %attr(755,root,root) %{_libdir}/libfstcompact.so |
156 | %attr(755,root,root) %{_libdir}/libfstcompressscript.so | |
157 | %attr(755,root,root) %{_libdir}/libfstconst.so | |
158 | %attr(755,root,root) %{_libdir}/libfstfar.so | |
159 | %attr(755,root,root) %{_libdir}/libfstfarscript.so | |
160 | %attr(755,root,root) %{_libdir}/libfstlinearscript.so | |
161 | %attr(755,root,root) %{_libdir}/libfstlookahead.so | |
162 | %attr(755,root,root) %{_libdir}/libfstmpdtscript.so | |
163 | %attr(755,root,root) %{_libdir}/libfstngram.so | |
164 | %attr(755,root,root) %{_libdir}/libfstpdtscript.so | |
c656d5f1 JB |
165 | %attr(755,root,root) %{_libdir}/libfstscript.so |
166 | %{_libdir}/libfst.la | |
8741f377 JB |
167 | %{_libdir}/libfstcompact.la |
168 | %{_libdir}/libfstcompressscript.la | |
169 | %{_libdir}/libfstconst.la | |
170 | %{_libdir}/libfstfar.la | |
171 | %{_libdir}/libfstfarscript.la | |
172 | %{_libdir}/libfstlinearscript.la | |
173 | %{_libdir}/libfstlookahead.la | |
174 | %{_libdir}/libfstmpdtscript.la | |
175 | %{_libdir}/libfstngram.la | |
176 | %{_libdir}/libfstpdtscript.la | |
c656d5f1 JB |
177 | %{_libdir}/libfstscript.la |
178 | %{_includedir}/fst | |
179 | ||
9d30ea08 | 180 | %if %{with static_libs} |
c656d5f1 JB |
181 | %files static |
182 | %defattr(644,root,root,755) | |
183 | %{_libdir}/libfst.a | |
8741f377 JB |
184 | %{_libdir}/libfstcompact.a |
185 | %{_libdir}/libfstcompressscript.a | |
186 | %{_libdir}/libfstconst.a | |
187 | %{_libdir}/libfstfar.a | |
188 | %{_libdir}/libfstfarscript.a | |
189 | %{_libdir}/libfstlinearscript.a | |
190 | %{_libdir}/libfstlookahead.a | |
191 | %{_libdir}/libfstmpdtscript.a | |
192 | %{_libdir}/libfstngram.a | |
193 | %{_libdir}/libfstpdtscript.a | |
c656d5f1 | 194 | %{_libdir}/libfstscript.a |
9d30ea08 JB |
195 | %endif |
196 | ||
197 | %if %{with python} | |
198 | %files -n python-openfst | |
199 | %defattr(644,root,root,755) | |
8741f377 | 200 | %attr(755,root,root) %{py_sitedir}/pywrapfst.so |
9d30ea08 | 201 | %endif |