]> git.pld-linux.org Git - packages/libvoikko.git/blob - libvoikko.spec
109cb228e2cacb7416ff9ee697bd64c85d1a0b46
[packages/libvoikko.git] / libvoikko.spec
1 # TODO: java (BR: maven), common-lisp, csharp, js, python (2.7, 3+) bindings
2 #
3 # Conditional build:
4 %bcond_without  hfst            # HFST morphology backend
5 %bcond_with     lttoolbox       # lttoolbox morphology backend (experimental)
6 %bcond_without  malaga          # Finnish morphology backend (formerly default, now deprecated)
7 %bcond_without  vfst            # VFST morphology backend, experimental language independent backend
8 %bcond_with     vfst_exp        # VFST morphology backend - experimental features
9 %bcond_with     vislcg3         # VISLCG3 support (experimental)
10 #
11 Summary:        Library for spell checking, hyphenation and grammar checking
12 Summary(pl.UTF-8):      Biblioteka do sprawdzania pisowni i gramatyki oraz przenoszenia wyrazów
13 Name:           libvoikko
14 Version:        4.1.1
15 Release:        1
16 %if %{with malaga} || %{with lttoolbox}
17 License:        GPL v2+
18 %else
19 License:        MPL v1.1 or LGPL v2.1+ or GPL v2+
20 %endif
21 Group:          Libraries
22 #Source0Download: https://github.com/voikko/corevoikko/releases
23 Source0:        https://github.com/voikko/corevoikko/archive/rel-libvoikko-%{version}/%{name}-%{version}.tar.gz
24 # Source0-md5:  94894137eadc507cf61c5bfb03d2656f
25 URL:            http://voikko.puimula.org/
26 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
27 BuildRequires:  glibc-localedb-all
28 %endif
29 BuildRequires:  autoconf >= 2.60
30 BuildRequires:  automake >= 1:1.10
31 %{?with_hfst:BuildRequires:     hfst-ospell-devel >= 0.2}
32 BuildRequires:  libstdc++-devel >= 6:4.7
33 BuildRequires:  libtool >= 2:2.2.6
34 %{?with_lttoolbox:BuildRequires:        lttoolbox-devel >= 3.2.0}
35 BuildRequires:  pkgconfig
36 BuildRequires:  python3 >= 1:3
37 BuildRequires:  python3-modules >= 1:3
38 %{?with_vislcg3:BuildRequires:  tinyxml2-devel}
39 %{?with_vislcg3:BuildRequires:  vislcg3-devel >= 0.9}
40 %{?with_hfst:Requires:  hfst-ospell >= 0.2}
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 libvoikko is a library of free Finnish language tools. The library is
45 written in C++ and uses a left associative grammar for describing the
46 morphology of Finnish language. The morphology is developed using
47 Malaga natural language development tool.
48
49 libvoikko provides spell checking, hyphenation, grammar checking and
50 morphological analysis for Finnish language. Support for other
51 languages is in experimental state.
52
53 %description -l pl.UTF-8
54 libvoikko to biblioteka wolnodostępnych narzędzi dla języka fińskiego.
55 Jest napisana w C++ i do opisu morfologii języka fińskiego
56 wykorzystuje gramatykę wiązaną lewostronnie. Morfologię tworzy się
57 przy użyciu Malagi - narzędzia do programowania gramatyk języków
58 naturalnych.
59
60 libvoikko udostępnia sprawdzanie pisowni, przenoszenie wyrazów,
61 sprawdzanie gramatyki oraz analizę morfologiczną dla języka fińskiego.
62 Obsługa innych języków jest w stanie eksperymentalnym.
63
64 %package devel
65 Summary:        Header files for libvoikko library
66 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libvoikko
67 Group:          Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69
70 %description devel
71 Header files for libvoikko library.
72
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki libvoikko.
75
76 %package static
77 Summary:        Static libvoikko library
78 Summary(pl.UTF-8):      Statyczna biblioteka libvoikko
79 Group:          Development/Libraries
80 Requires:       %{name}-devel = %{version}-%{release}
81
82 %description static
83 Static libvoikko library.
84
85 %description static -l pl.UTF-8
86 Statyczna biblioteka libvoikko.
87
88 %prep
89 %setup -q -n corevoikko-rel-libvoikko-%{version}
90
91 %build
92 cd libvoikko
93 %{__libtoolize}
94 %{__aclocal} -I m4
95 %{__autoconf}
96 %{__autoheader}
97 %{__automake}
98 %configure \
99         %{!?with_hfst:--disable-hfst} \
100         %{?with_lttoolbox:--enable-lttoolbox} \
101         %{?with_malaga:--enable-malaga} \
102         %{!?with_vfst:--disable-vfst} \
103         %{?with_vfst_exp:--enable-expvfst} \
104         %{?with_vislcg3:--enable-vislcg3} \
105         --with-dictionary-path=%{_datadir}/voikko:%{_libdir}/voikko
106
107 # python script needs non-ascii locale
108 LC_ALL=C.UTF-8 \
109 %{__make}
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT{%{_libdir},%{_datadir}}/voikko
114 %if %{with malaga}
115 install -d $RPM_BUILD_ROOT%{_libdir}/voikko/2/mor-{default,standard}
116 %endif
117 %if %{with hfst}
118 install -d $RPM_BUILD_ROOT%{_datadir}/voikko/{3,4}/mor-{default,standard}
119 %endif
120 %if %{with vfst}
121 install -d $RPM_BUILD_ROOT%{_datadir}/voikko/5/mor-{default,standard}
122 %endif
123
124 %{__make} -C libvoikko install \
125         DESTDIR=$RPM_BUILD_ROOT
126
127 # obsoleted by pkg-config
128 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvoikko.la
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post   -p /sbin/ldconfig
134 %postun -p /sbin/ldconfig
135
136 %files
137 %defattr(644,root,root,755)
138 %doc libvoikko/{ChangeLog,README}
139 %attr(755,root,root) %{_bindir}/voikkogc
140 %attr(755,root,root) %{_bindir}/voikkohyphenate
141 %attr(755,root,root) %{_bindir}/voikkospell
142 %attr(755,root,root) %{_bindir}/voikkovfstc
143 %attr(755,root,root) %{_libdir}/libvoikko.so.*.*.*
144 %attr(755,root,root) %ghost %{_libdir}/libvoikko.so.1
145 # for arch-dependent dictionaries
146 %dir %{_libdir}/voikko
147 %if %{with malaga}
148 %dir %{_libdir}/voikko/2
149 %dir %{_libdir}/voikko/2/mor-default
150 %dir %{_libdir}/voikko/2/mor-standard
151 %endif
152 # for arch-independent dictionaries
153 %dir %{_datadir}/voikko
154 %if %{with hfst}
155 %dir %{_datadir}/voikko/3
156 %dir %{_datadir}/voikko/3/mor-default
157 %dir %{_datadir}/voikko/3/mor-standard
158 %dir %{_datadir}/voikko/4
159 %dir %{_datadir}/voikko/4/mor-default
160 %dir %{_datadir}/voikko/4/mor-standard
161 %endif
162 %if %{with vfst}
163 %dir %{_datadir}/voikko/5
164 %dir %{_datadir}/voikko/5/mor-default
165 %dir %{_datadir}/voikko/5/mor-standard
166 %endif
167 %{_mandir}/man1/voikkogc.1*
168 %{_mandir}/man1/voikkohyphenate.1*
169 %{_mandir}/man1/voikkospell.1*
170 %{_mandir}/man1/voikkovfstc.1*
171
172 %files devel
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libvoikko.so
175 %{_includedir}/libvoikko
176 %{_pkgconfigdir}/libvoikko.pc
177
178 %files static
179 %defattr(644,root,root,755)
180 %{_libdir}/libvoikko.a
This page took 0.07106 seconds and 2 git commands to generate.