3 %bcond_without static_libs # static libraries
5 Summary: OpenGrm NGram library - making and modifying n-gram language models
6 Summary(pl.UTF-8): Biblioteka OpenGrm NGram - tworzenie i modyfikowanie modeli n-gramowych języków
12 #Source0Download: http://www.openfst.org/twiki/bin/view/GRM/NGramDownload
13 Source0: http://www.openfst.org/twiki/pub/GRM/NGramDownload/%{name}-%{version}.tar.gz
14 # Source0-md5: a158efb18c83c1f64bce5211d635af77
15 Patch0: %{name}-link.patch
16 URL: http://www.openfst.org/twiki/bin/view/GRM/NGramLibrary
17 BuildRequires: autoconf >= 2.50
18 BuildRequires: automake
19 BuildRequires: libstdc++-devel >= 6:4.7
20 BuildRequires: libtool >= 2:1.5
21 BuildRequires: openfst-devel >= 1.5.2
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 The OpenGrm NGram library is used for making and modifying n-gram
26 language models encoded as weighted finite-state transducers (FSTs).
27 It makes use of functionality in the OpenFst library to create, access
28 and manipulate n-gram models.
30 %description -l pl.UTF-8
31 Biblioteka OpenGrm NGram służy do tworzenia i modyfikowania modeli
32 n-gramowych języków zakodowanych jako automaty skończone z wyjściem
33 (FST) i wagami. Do tworzenia, dostępu i operowania na modelach
34 n-gramowych wykorzystuje bibliotekę OpenFst.
37 Summary: Header files for OpenGrm NGram library
38 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenGrm NGram
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
41 Requires: libstdc++-devel >= 6:4.7
42 Requires: openfst-devel >= 1.5.2
45 Header files for OpenGrm NGram library.
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki OpenGrm NGram.
51 Summary: Static OpenGrm NGram library
52 Summary(pl.UTF-8): Statyczna biblioteka OpenGrm NGram
53 Group: Development/Libraries
54 Requires: %{name}-devel = %{version}-%{release}
57 Static OpenGrm NGram library.
59 %description static -l pl.UTF-8
60 Statyczna biblioteka OpenGrm NGram.
73 %{?with_static_libs:--enable-static}
77 rm -rf $RPM_BUILD_ROOT
80 DESTDIR=$RPM_BUILD_ROOT
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/hist-arc.la \
84 %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/hist-arc.a}
87 rm -rf $RPM_BUILD_ROOT
89 %post -p /sbin/ldconfig
90 %postun -p /sbin/ldconfig
93 %defattr(644,root,root,755)
94 %doc AUTHORS NEWS README
95 %attr(755,root,root) %{_bindir}/ngramapply
96 %attr(755,root,root) %{_bindir}/ngramcontext
97 %attr(755,root,root) %{_bindir}/ngramcount
98 %attr(755,root,root) %{_bindir}/ngramhisttest
99 %attr(755,root,root) %{_bindir}/ngraminfo
100 %attr(755,root,root) %{_bindir}/ngrammake
101 %attr(755,root,root) %{_bindir}/ngrammarginalize
102 %attr(755,root,root) %{_bindir}/ngrammerge
103 %attr(755,root,root) %{_bindir}/ngramperplexity
104 %attr(755,root,root) %{_bindir}/ngramprint
105 %attr(755,root,root) %{_bindir}/ngramrandgen
106 %attr(755,root,root) %{_bindir}/ngramrandtest
107 %attr(755,root,root) %{_bindir}/ngramread
108 %attr(755,root,root) %{_bindir}/ngramshrink
109 %attr(755,root,root) %{_bindir}/ngramsort
110 %attr(755,root,root) %{_bindir}/ngramsplit
111 %attr(755,root,root) %{_bindir}/ngramsymbols
112 %attr(755,root,root) %{_bindir}/ngramtransfer
113 %attr(755,root,root) %{_libdir}/libngram.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libngram.so.134
115 %attr(755,root,root) %{_libdir}/libngramhist.so.*.*.*
116 %attr(755,root,root) %ghost %{_libdir}/libngramhist.so.134
118 %attr(755,root,root) %{_libdir}/hist-arc.so
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libngram.so
123 %attr(755,root,root) %{_libdir}/libngramhist.so
124 %{_libdir}/libngram.la
125 %{_libdir}/libngramhist.la
128 %if %{with static_libs}
130 %defattr(644,root,root,755)
131 %{_libdir}/libngram.a
132 %{_libdir}/libngramhist.a