]>
Commit | Line | Data |
---|---|---|
46e7b9ff JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without java # Java bindings | |
4 | %bcond_without perl # Perl bindings | |
b3d026f6 | 5 | %bcond_without python # Python 3 bindings |
46e7b9ff | 6 | |
5162239e | 7 | Summary: Link Grammar - a syntactic parser of English |
f15a6cbb | 8 | Summary(pl.UTF-8): Link Grammar - składniowy analizator języka angielskiego |
5162239e | 9 | Name: link-grammar |
b3d026f6 | 10 | Version: 5.12.3 |
6ebe26e3 | 11 | Release: 1 |
46e7b9ff | 12 | License: LGPL v2.1 |
5162239e | 13 | Group: Libraries |
6ebe26e3 | 14 | Source0: http://www.nl.abisource.com/downloads/link-grammar/%{version}/%{name}-%{version}.tar.gz |
b3d026f6 | 15 | # Source0-md5: 8550f72456a51d495ee020f9ece89411 |
46e7b9ff | 16 | Patch0: %{name}-modules.patch |
5162239e | 17 | URL: http://www.link.cs.cmu.edu/link/ |
46e7b9ff | 18 | BuildRequires: autoconf >= 2.50 |
5162239e | 19 | BuildRequires: automake |
46e7b9ff JB |
20 | BuildRequires: gcc >= 6:4.7 |
21 | %{?with_java:BuildRequires: jdk} | |
22 | BuildRequires: hunspell-devel | |
23 | BuildRequires: libedit-devel | |
24 | BuildRequires: libstdc++-devel >= 6:4.7 | |
25 | BuildRequires: libtool >= 2:2 | |
26 | BuildRequires: pcre2-8-devel | |
27 | %{?with_perl:BuildRequires: perl-devel} | |
28 | BuildRequires: pkgconfig | |
29 | %{?with_perl:BuildRequires: swig-perl >= 2.0.0} | |
30 | %if %{with python} | |
31 | BuildRequires: swig-python >= 2.0.0 | |
46e7b9ff JB |
32 | BuildRequires: python3-devel >= 1:3.4 |
33 | %endif | |
34 | BuildRequires: rpmbuild(macros) >= 1.714 | |
35 | BuildRequires: sqlite3-devel >= 3.0.0 | |
36 | BuildRequires: zlib-devel | |
5162239e JB |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
40 | The Link Grammar Parser is a syntactic parser of English, based on | |
41 | link grammar, an original theory of English syntax. Given a sentence, | |
42 | the system assigns to it a syntactic structure, which consists of a | |
43 | set of labeled links connecting pairs of words. The parser also | |
44 | produces a "constituent" representation of a sentence (showing noun | |
45 | phrases, verb phrases, etc.). | |
46 | ||
33dd5be0 JR |
47 | %description -l pl.UTF-8 |
48 | Parser Link Grammar to składniowy analizator języka angielskiego | |
49 | oparty na gramatyce łączeń - oryginalnej teorii składni języka | |
50 | angielskiego. Po podaniu zdania system przypisuje mu strukturę | |
51 | składniową, składającą się ze zbioru oznaczonych łączeń wiążących pary | |
52 | słów. Analizator tworzy także składową reprezentację zdania | |
53 | (pokazującą frazy rzeczownika, frazy czasownika itp.). | |
5162239e JB |
54 | |
55 | %package devel | |
56 | Summary: Header files for link-grammar library | |
f15a6cbb | 57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki link-grammar |
5162239e JB |
58 | Group: Development/Libraries |
59 | Requires: %{name} = %{version}-%{release} | |
60 | ||
61 | %description devel | |
62 | Header files for link-grammar library. | |
63 | ||
33dd5be0 JR |
64 | %description devel -l pl.UTF-8 |
65 | Pliki nagłówkowe biblioteki link-grammar. | |
5162239e JB |
66 | |
67 | %package static | |
68 | Summary: Static link-grammar library | |
f15a6cbb | 69 | Summary(pl.UTF-8): Statyczna biblioteka link-grammar |
5162239e JB |
70 | Group: Development/Libraries |
71 | Requires: %{name}-devel = %{version}-%{release} | |
72 | ||
73 | %description static | |
74 | Static link-grammar library. | |
75 | ||
33dd5be0 | 76 | %description static -l pl.UTF-8 |
5162239e JB |
77 | Statyczna biblioteka link-grammar. |
78 | ||
46e7b9ff JB |
79 | %package -n java-link-grammar |
80 | Summary: Java binding for link-grammar library | |
81 | Summary(pl.UTF-8): Wiązanie Javy do biblioteki link-grammar | |
82 | Group: Libraries/Java | |
83 | Requires: %{name} = %{version}-%{release} | |
84 | ||
85 | %description -n java-link-grammar | |
86 | Java binding for link-grammar library. | |
87 | ||
88 | %description -n java-link-grammar -l pl.UTF-8 | |
89 | Wiązanie Javy do biblioteki link-grammar. | |
90 | ||
91 | %package -n perl-linkgrammar | |
92 | Summary: Perl binding for link-grammar library | |
93 | Summary(pl.UTF-8): Wiązanie Perla do biblioteki link-grammar | |
94 | Group: Development/Languages/Perl | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description -n perl-linkgrammar | |
98 | Perl binding for link-grammar library. | |
99 | ||
100 | %description -n perl-linkgrammar -l pl.UTF-8 | |
101 | Wiązanie Perla do biblioteki link-grammar. | |
102 | ||
46e7b9ff JB |
103 | %package -n python3-linkgrammar |
104 | Summary: Python 3 binding for link-grammar library | |
105 | Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki link-grammar | |
106 | Group: Libraries/Python | |
107 | Requires: %{name} = %{version}-%{release} | |
108 | Requires: python3-libs >= 1:3.4 | |
109 | ||
110 | %description -n python3-linkgrammar | |
111 | Python 3 binding for link-grammar library. | |
112 | ||
113 | %description -n python3-linkgrammar -l pl.UTF-8 | |
114 | Wiązanie Pythona 3 do biblioteki link-grammar. | |
115 | ||
5162239e JB |
116 | %prep |
117 | %setup -q | |
8ab880fe | 118 | %patch0 -p1 |
5162239e JB |
119 | |
120 | %build | |
46e7b9ff JB |
121 | %{__libtoolize} |
122 | %{__aclocal} -I m4 | |
123 | %{__autoconf} | |
124 | %{__automake} | |
5162239e | 125 | %configure \ |
46e7b9ff JB |
126 | %{!?with_java:--disable-java-bindings} \ |
127 | %{?with_perl:--enable-perl-bindings} \ | |
128 | %{!?with_python:--disable-python-bindings} \ | |
129 | --disable-silent-rules | |
5162239e | 130 | |
46e7b9ff | 131 | %{__make} -j1 \ |
b3d026f6 | 132 | pkgperldir=%{perl_vendorarch} |
5162239e JB |
133 | |
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %{__make} install \ | |
46e7b9ff | 138 | DESTDIR=$RPM_BUILD_ROOT \ |
b3d026f6 | 139 | pkgperldir=%{perl_vendorarch} |
46e7b9ff JB |
140 | |
141 | %if %{with java} | |
142 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblink-grammar-java.la \ | |
143 | $RPM_BUILD_ROOT%{_libdir}/liblink-grammar-java.a | |
144 | %endif | |
145 | %if %{with perl} | |
146 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/clinkgrammar.la \ | |
147 | $RPM_BUILD_ROOT%{perl_vendorarch}/clinkgrammar.a | |
148 | %endif | |
149 | %if %{with python} | |
46e7b9ff JB |
150 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/linkgrammar/_clinkgrammar.la \ |
151 | $RPM_BUILD_ROOT%{py3_sitedir}/linkgrammar/_clinkgrammar.a | |
152 | ||
153 | %py_postclean | |
154 | %endif | |
5162239e JB |
155 | |
156 | %clean | |
157 | rm -rf $RPM_BUILD_ROOT | |
158 | ||
159 | %post -p /sbin/ldconfig | |
160 | %postun -p /sbin/ldconfig | |
161 | ||
162 | %files | |
163 | %defattr(644,root,root,755) | |
46e7b9ff | 164 | %doc AUTHORS ChangeLog LICENSE MAINTAINERS NEWS README.md TODO |
b3d026f6 | 165 | %attr(755,root,root) %{_bindir}/link-generator |
46e7b9ff | 166 | %attr(755,root,root) %{_bindir}/link-parser |
5162239e | 167 | %attr(755,root,root) %{_libdir}/liblink-grammar.so.*.*.* |
46e7b9ff | 168 | %attr(755,root,root) %ghost %{_libdir}/liblink-grammar.so.5 |
5162239e | 169 | %{_datadir}/link-grammar |
b3d026f6 | 170 | %{_mandir}/man1/link-generator.1* |
46e7b9ff | 171 | %{_mandir}/man1/link-parser.1* |
5162239e JB |
172 | |
173 | %files devel | |
174 | %defattr(644,root,root,755) | |
175 | %attr(755,root,root) %{_libdir}/liblink-grammar.so | |
176 | %{_libdir}/liblink-grammar.la | |
177 | %{_includedir}/link-grammar | |
178 | %{_pkgconfigdir}/link-grammar.pc | |
179 | ||
180 | %files static | |
181 | %defattr(644,root,root,755) | |
182 | %{_libdir}/liblink-grammar.a | |
46e7b9ff JB |
183 | |
184 | %if %{with java} | |
185 | %files -n java-link-grammar | |
186 | %defattr(644,root,root,755) | |
187 | %attr(755,root,root) %{_libdir}/liblink-grammar-java.so.*.*.* | |
188 | %attr(755,root,root) %ghost %{_libdir}/liblink-grammar-java.so.5 | |
189 | %attr(755,root,root) %{_libdir}/liblink-grammar-java.so | |
190 | %{_javadir}/linkgrammar-%{version}.jar | |
191 | %{_javadir}/linkgrammar.jar | |
192 | %endif | |
193 | ||
194 | %if %{with perl} | |
195 | %files -n perl-linkgrammar | |
196 | %defattr(644,root,root,755) | |
197 | %attr(755,root,root) %{perl_vendorarch}/clinkgrammar.so | |
198 | %{perl_vendorarch}/clinkgrammar.pm | |
199 | %endif | |
200 | ||
201 | %if %{with python} | |
46e7b9ff JB |
202 | %files -n python3-linkgrammar |
203 | %defattr(644,root,root,755) | |
46e7b9ff JB |
204 | %dir %{py3_sitedir}/linkgrammar |
205 | %attr(755,root,root) %{py3_sitedir}/linkgrammar/_clinkgrammar.so | |
b3d026f6 JB |
206 | %{py3_sitescriptdir}/linkgrammar |
207 | %{py3_sitescriptdir}/linkgrammar.pth | |
46e7b9ff | 208 | %endif |