]> git.pld-linux.org Git - SPECS.git/blob - hfst.spec
SPECS updated Sat 31 Jul 20:27:02 CEST 2021
[SPECS.git] / hfst.spec
1 #
2 # Conditional build:
3 %bcond_without  python3         # Python 3 binding
4 %bcond_without  readline        # readline in interactive programs
5 #
6 Summary:        Helsinki Finite-State Transducer (library and application suite)
7 Summary(pl.UTF-8):      Helsinki Finite-State Transducer (biblioteka i zestaw aplikacji)
8 Name:           hfst
9 Version:        3.15.1
10 Release:        3
11 License:        LGPL v3 (library), GPL v3 (tools)
12 Group:          Applications/Text
13 #Source0Download: https://github.com/hfst/hfst/releases
14 Source0:        https://github.com/hfst/hfst/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  31b046a2c42c5f169dd1a973b82677f4
16 Patch0:         %{name}-pc.patch
17 Patch1:         build.patch
18 Patch2:         %{name}-python3.patch
19 URL:            http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
20 # bundled library is used
21 #BuildRequires: SFST-devel
22 BuildRequires:  autoconf >= 2.62
23 BuildRequires:  automake >= 1:1.12
24 BuildRequires:  bison
25 BuildRequires:  flex >= 2.5.35
26 BuildRequires:  glib2-devel >= 1:2.16
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  libtool >= 2:2.2
29 # disabled in sources
30 #BuildRequires: libxml2-devel >= 2
31 BuildRequires:  ncurses-devel
32 # bundled library is used
33 #BuildRequires: openfst-devel
34 BuildRequires:  pkgconfig >= 1:0.14
35 BuildRequires:  python >= 1:2.4
36 %{?with_python3:BuildRequires:  python3 >= 1:3.2}
37 %{?with_readline:BuildRequires: readline-devel}
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %{?with_python3:BuildRequires:  swig-python}
41 BuildRequires:  zlib-devel
42 Requires:       glib2 >= 1:2.16
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 The Helsinki Finite-State Transducer software is intended for the
47 implementation of morphological analysers and other tools which are
48 based on weighted and unweigted finite-state transducer technology.
49
50 %description -l pl.UTF-8
51 Pakiet HFST (Helsinki Finite-State Transducer) to oprogramowanie
52 służące do implementacji analizatorów morfologicznych i innych
53 narzędzi opartych na technice przetwarzania ze skończoną liczbą
54 stanów z wagami lub bez.
55
56 %package tagger
57 Summary:        HFST Tagger scripts
58 Summary(pl.UTF-8):      Skrypty HFST Tagger
59 License:        GPL v3
60 Group:          Applications/Text
61 Requires:       %{name} = %{version}-%{release}
62
63 %description tagger
64 HFST Tagger scripts written in Python.
65
66 %description tagger -l pl.UTF-8
67 Skrypty HFST Tagger napisane w Pythonie.
68
69 %package devel
70 Summary:        Header files for HFST library
71 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki HFST
72 License:        LGPL v3
73 Group:          Development/Libraries
74 Requires:       %{name} = %{version}-%{release}
75 #Requires:      SFST-devel
76 Requires:       glib2-devel >= 1:2.16
77 Requires:       libstdc++-devel
78 #Requires:      openfst-devel
79 Requires:       readline-devel
80
81 %description devel
82 Header files for HFST library.
83
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki HFST.
86
87 %package static
88 Summary:        Static HFST library
89 Summary(pl.UTF-8):      Statyczna biblioteka HFST
90 License:        LGPL v3
91 Group:          Development/Libraries
92 Requires:       %{name}-devel = %{version}-%{release}
93
94 %description static
95 Static HFST library.
96
97 %description static -l pl.UTF-8
98 Statyczna biblioteka HFST.
99
100 %package -n python-hfst
101 Summary:        Python 2 binding for HFST library
102 Summary(pl.UTF-8):      Wiązanie Pythona 2 do biblioteki HFST
103 License:        LGPL v3
104 Group:          Libraries/Python
105 Requires:       %{name} = %{version}-%{release}
106
107 %description -n python-hfst
108 Python 2 binding for HFST library.
109
110 %description -n python-hfst -l pl.UTF-8
111 Wiązanie Pythona 2 do biblioteki HFST.
112
113 %package -n python3-hfst
114 Summary:        Python 3 binding for HFST library
115 Summary(pl.UTF-8):      Wiązanie Pythona 3 do biblioteki HFST
116 License:        LGPL v3
117 Group:          Libraries/Python
118 Requires:       %{name} = %{version}-%{release}
119
120 %description -n python3-hfst
121 Python 3 binding for HFST library.
122
123 %description -n python3-hfst -l pl.UTF-8
124 Wiązanie Pythona 3 do biblioteki HFST.
125
126 %prep
127 %setup -q
128 %patch0 -p1
129 %patch1 -p1
130 %patch2 -p1
131
132 %build
133 %{__libtoolize}
134 %{__aclocal}
135 %{__autoconf}
136 %{__autoheader}
137 %{__automake}
138 %configure \
139         --enable-calculate \
140         --enable-foma-wrapper \
141         --enable-lexc \
142         --enable-lexc-wrapper \
143         --enable-proc \
144         --disable-silent-rules \
145         --enable-tagger \
146         --enable-train-tagger \
147         --enable-xfst \
148         %{?with_readline:--with-readline} \
149         --with-unicode-handler=glib
150
151 # parallel build is broken with foma backend
152 %{__make} -j1
153
154 cd python
155 %py_build
156 %if %{with python3}
157 %py3_build
158 %endif
159
160 %install
161 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT%{_bindir}
163
164 %{__make} install \
165         DESTDIR=$RPM_BUILD_ROOT
166
167 # obsoleted by pkgconfig
168 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfst.la
169
170 # for transducer data
171 install -d $RPM_BUILD_ROOT%{_datadir}/hfst
172
173 cd python
174 %py_install
175 %py_postclean
176 %if %{with python3}
177 %py3_install
178 %endif
179
180 %clean
181 rm -rf $RPM_BUILD_ROOT
182
183 %post   -p /sbin/ldconfig
184 %postun -p /sbin/ldconfig
185
186 %files
187 %defattr(644,root,root,755)
188 %doc AUTHORS NEWS README THANKS
189 %attr(755,root,root) %{_bindir}/hfst-*
190 %attr(755,root,root) %{_bindir}/hfst_foma
191 %attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libhfst.so.52
193 %dir %{_datadir}/hfst
194 %{_mandir}/man1/hfst-*.1*
195
196 %files tagger
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_bindir}/hfst_tagger_compute_data_statistics.py
199 %{py3_sitescriptdir}/hfst_tagger_compute_data_statistics.py
200 %{py3_sitescriptdir}/tagger_aux.py
201 %{py3_sitescriptdir}/__pycache__/hfst_tagger_compute_data_statistics.cpython-*.py[co]
202 %{py3_sitescriptdir}/__pycache__/tagger_aux.cpython-*.py[co]
203 %{_mandir}/man1/hfst_tagger_compute_data_statistics.py.1*
204
205 %files devel
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_libdir}/libhfst.so
208 %{_includedir}/hfst
209 %{_aclocaldir}/hfst.m4
210 %{_pkgconfigdir}/hfst.pc
211
212 %files static
213 %defattr(644,root,root,755)
214 %{_libdir}/libhfst.a
215
216 %files -n python-hfst
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{py_sitedir}/_libhfst.so
219 %{py_sitedir}/hfst
220 %{py_sitedir}/libhfst.py[co]
221 %{py_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
222
223 %if %{with python3}
224 %files -n python3-hfst
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{py3_sitedir}/_libhfst.cpython-*.so
227 %{py3_sitedir}/hfst
228 %{py3_sitedir}/libhfst.py
229 %{py3_sitedir}/__pycache__/libhfst.cpython-*.py[co]
230 %{py3_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
231 %endif
This page took 0.721566 seconds and 3 git commands to generate.