]>
Commit | Line | Data |
---|---|---|
0973642d JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without perl # perl package | |
4 | %bcond_without static_libs # static library | |
5 | # | |
0973642d JB |
6 | Summary: CMU-Cambridge Language Modeling Toolkit |
7 | Summary(pl.UTF-8): CMU-Cambridge Language Modeling Toolkit - narzędzia do tworzenia modeli językowych | |
8 | Name: cmuclmtk | |
9 | Version: 0.7 | |
061b25db | 10 | Release: 2 |
0973642d JB |
11 | License: BSD, parts for research only |
12 | Group: Libraries | |
13 | Source0: http://downloads.sourceforge.net/cmusphinx/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 21bfb116d309e43e61def3692f98cdac | |
061b25db | 15 | Patch0: %{name}-missing.patch |
0973642d JB |
16 | URL: https://cmusphinx.github.io/ |
17 | %if %{with perl} | |
18 | BuildRequires: perl-devel | |
19 | BuildRequires: rpm-perlprov | |
20 | %endif | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | CMU-Cambridge Language Modeling Toolkit. | |
25 | ||
26 | %description -l pl.UTF-8 | |
27 | CMU-Cambridge Language Modeling Toolkit - narzędzia do tworzenia | |
28 | modeli językowych. | |
29 | ||
30 | %package devel | |
31 | Summary: Header files for CMU-C LM Toolkit library | |
32 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CMU-C LM Toolkit | |
33 | Group: Development/Libraries | |
34 | Requires: %{name} = %{version}-%{release} | |
35 | ||
36 | %description devel | |
37 | Header files for CMU-C LM Toolkit library. | |
38 | ||
39 | %description devel -l pl.UTF-8 | |
40 | Pliki nagłówkowe biblioteki CMU-C LM Toolkit. | |
41 | ||
42 | %package static | |
43 | Summary: Static CMU-C LM Toolkit library | |
44 | Summary(pl.UTF-8): Statyczna biblioteka CMU-C LM Toolkit | |
45 | Group: Development/Libraries | |
46 | Requires: %{name}-devel = %{version}-%{release} | |
47 | ||
48 | %description static | |
49 | Static CMU-C LM Toolkit library. | |
50 | ||
51 | %description static -l pl.UTF-8 | |
52 | Statyczna biblioteka CMU-C LM Toolkit. | |
53 | ||
54 | %package -n perl-Text-CMU-LMTraining | |
55 | Summary: Text::CMU::LMTraining - module for language model training | |
56 | Summary(pl.UTF-8): Text::CMU::LMTraining - moduł do trenowania modeli językowych | |
57 | Group: Development/Languages/Perl | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description -n perl-Text-CMU-LMTraining | |
61 | Text::CMU::LMTraining package contains language training modules. | |
62 | ||
63 | %description -n perl-Text-CMU-LMTraining -l pl.UTF-8 | |
64 | Pakiet Text::CMU::LMTraining zawiera moduły do trenowania modeli | |
65 | językowych. | |
66 | ||
67 | %prep | |
68 | %setup -q | |
061b25db | 69 | %patch0 -p1 |
0973642d JB |
70 | |
71 | %build | |
72 | %configure \ | |
73 | %{!?with_static_libs:--disable-static} | |
74 | %{__make} | |
75 | ||
76 | %if %{with perl} | |
77 | cd perl | |
78 | %{__perl} Makefile.PL \ | |
79 | INSTALLDIRS=vendor | |
80 | ||
81 | %{__make} | |
82 | %endif | |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %{__make} install \ | |
88 | DESTDIR=$RPM_BUILD_ROOT | |
89 | ||
90 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcmuclmtk.la | |
91 | ||
92 | %if %{with perl} | |
93 | %{__make} -C perl pure_install \ | |
94 | DESTDIR=$RPM_BUILD_ROOT | |
95 | %endif | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %post -p /sbin/ldconfig | |
101 | %postun -p /sbin/ldconfig | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc AUTHORS COPYING NEWS README TODO doc/{change_log.html,toolkit*} | |
106 | %attr(755,root,root) %{_bindir}/binlm2arpa | |
107 | %attr(755,root,root) %{_bindir}/evallm | |
108 | %attr(755,root,root) %{_bindir}/idngram2lm | |
109 | %attr(755,root,root) %{_bindir}/idngram2stats | |
110 | %attr(755,root,root) %{_bindir}/lm_combine | |
111 | %attr(755,root,root) %{_bindir}/lm_interpolate | |
112 | %attr(755,root,root) %{_bindir}/mergeidngram | |
113 | %attr(755,root,root) %{_bindir}/ngram2mgram | |
114 | %attr(755,root,root) %{_bindir}/text2idngram | |
115 | %attr(755,root,root) %{_bindir}/text2wfreq | |
116 | %attr(755,root,root) %{_bindir}/text2wngram | |
117 | %attr(755,root,root) %{_bindir}/wfreq2vocab | |
118 | %attr(755,root,root) %{_bindir}/wngram2idngram | |
119 | %attr(755,root,root) %{_libdir}/libcmuclmtk.so.*.*.* | |
120 | %attr(755,root,root) %ghost %{_libdir}/libcmuclmtk.so.0 | |
121 | ||
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
124 | %attr(755,root,root) %{_libdir}/libcmuclmtk.so | |
125 | %{_includedir}/cmuclmtk | |
126 | ||
127 | %if %{with static_libs} | |
128 | %files static | |
129 | %defattr(644,root,root,755) | |
130 | %{_libdir}/libcmuclmtk.a | |
131 | %endif | |
132 | ||
133 | %if %{with perl} | |
134 | %files -n perl-Text-CMU-LMTraining | |
135 | %defattr(644,root,root,755) | |
136 | %attr(755,root,root) %{_bindir}/cmu_build_vocab | |
137 | %attr(755,root,root) %{_bindir}/cmu_lm_train | |
138 | %attr(755,root,root) %{_bindir}/cmu_ngram_interp | |
139 | %attr(755,root,root) %{_bindir}/cmu_ngram_pronounce | |
140 | %attr(755,root,root) %{_bindir}/cmu_ngram_test | |
141 | %attr(755,root,root) %{_bindir}/cmu_ngram_train | |
142 | %attr(755,root,root) %{_bindir}/cmu_normalize_text | |
143 | %dir %{perl_vendorlib}/Text/CMU | |
144 | %{perl_vendorlib}/Text/CMU/InputFilter | |
145 | %{perl_vendorlib}/Text/CMU/NGramModel | |
146 | %{perl_vendorlib}/Text/CMU/InputFilter.pm | |
147 | %{perl_vendorlib}/Text/CMU/LMTraining.pm | |
148 | %{perl_vendorlib}/Text/CMU/NGramFactory.pm | |
149 | %{perl_vendorlib}/Text/CMU/NGramModel.pm | |
150 | %{perl_vendorlib}/Text/CMU/Smoothing.pm | |
151 | %{perl_vendorlib}/Text/CMU/Vocabulary.pm | |
152 | %attr(755,root,root) %{perl_vendorlib}/Text/CMU/class_tagger.pl | |
153 | %attr(755,root,root) %{perl_vendorlib}/Text/CMU/unihan_to_sphinx.pl | |
154 | %attr(755,root,root) %{perl_vendorlib}/Text/CMU/lm_changecase.pl | |
155 | %{_mandir}/man1/cmu_build_vocab.1p* | |
156 | %{_mandir}/man1/cmu_lm_train.1p* | |
157 | %{_mandir}/man1/cmu_ngram_interp.1p* | |
158 | %{_mandir}/man1/cmu_ngram_pronounce.1p* | |
159 | %{_mandir}/man1/cmu_ngram_test.1p* | |
160 | %{_mandir}/man1/cmu_ngram_train.1p* | |
161 | %{_mandir}/man1/cmu_normalize_text.1p* | |
162 | %{_mandir}/man3/Text::CMU::InputFilter*.3pm* | |
163 | %{_mandir}/man3/Text::CMU::LMTraining.3pm* | |
164 | %{_mandir}/man3/Text::CMU::NGramFactory.3pm* | |
165 | %{_mandir}/man3/Text::CMU::NGramModel*.3pm* | |
166 | %{_mandir}/man3/Text::CMU::Smoothing.3pm* | |
167 | %{_mandir}/man3/Text::CMU::Vocabulary.3pm* | |
168 | %endif |