]>
Commit | Line | Data |
---|---|---|
2c8e85eb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static libraries | |
4 | # | |
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 | |
7 | Name: opengrm-ngram | |
e8864589 | 8 | Version: 1.3.4 |
564e66aa | 9 | Release: 2 |
2c8e85eb JB |
10 | License: Apache v2.0 |
11 | Group: Libraries | |
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 | |
e8864589 | 14 | # Source0-md5: a158efb18c83c1f64bce5211d635af77 |
2c8e85eb JB |
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) | |
23 | ||
24 | %description | |
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. | |
29 | ||
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. | |
35 | ||
36 | %package devel | |
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 | |
43 | ||
44 | %description devel | |
45 | Header files for OpenGrm NGram library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki OpenGrm NGram. | |
49 | ||
50 | %package static | |
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} | |
55 | ||
56 | %description static | |
57 | Static OpenGrm NGram library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka OpenGrm NGram. | |
61 | ||
62 | %prep | |
63 | %setup -q | |
64 | %patch0 -p1 | |
65 | ||
66 | %build | |
67 | %{__libtoolize} | |
68 | %{__aclocal} -I m4 | |
69 | %{__autoconf} | |
70 | %{__autoheader} | |
71 | %{__automake} | |
72 | %configure \ | |
73 | %{?with_static_libs:--enable-static} | |
74 | %{__make} | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %{__make} install \ | |
80 | DESTDIR=$RPM_BUILD_ROOT | |
81 | ||
82 | # dlopened module | |
83 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/hist-arc.la \ | |
84 | %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/hist-arc.a} | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %post -p /sbin/ldconfig | |
90 | %postun -p /sbin/ldconfig | |
91 | ||
92 | %files | |
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.*.*.* | |
e8864589 | 114 | %attr(755,root,root) %ghost %{_libdir}/libngram.so.134 |
2c8e85eb | 115 | %attr(755,root,root) %{_libdir}/libngramhist.so.*.*.* |
e8864589 | 116 | %attr(755,root,root) %ghost %{_libdir}/libngramhist.so.134 |
2c8e85eb JB |
117 | # dlopened module |
118 | %attr(755,root,root) %{_libdir}/hist-arc.so | |
119 | ||
120 | %files devel | |
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 | |
126 | %{_includedir}/ngram | |
127 | ||
128 | %if %{with static_libs} | |
129 | %files static | |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libngram.a | |
132 | %{_libdir}/libngramhist.a | |
133 | %endif |