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