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