]>
Commit | Line | Data |
---|---|---|
6be5f69b JB |
1 | # |
2 | # Conditional build: | |
52243c20 | 3 | %bcond_without lua # don't build Lua bindings |
70c50690 | 4 | %bcond_without php # don't build (any) PHP bindings |
8175c7f4 | 5 | %bcond_without ruby # don't build Ruby bindings |
896d9365 | 6 | |
6eb1667a | 7 | %define php_name php%{?php_suffix} |
6be5f69b JB |
8 | %include /usr/lib/rpm/macros.perl |
9 | Summary: Redland RDF Application Framework Bindings | |
638cfcf8 | 10 | Summary(pl.UTF-8): Wiązania szkieletu aplikacji Redland RDF |
6be5f69b | 11 | Name: redland-bindings |
6eb1667a JB |
12 | Version: 1.0.17.1 |
13 | Release: 1 | |
52243c20 | 14 | License: LGPL v2.1+ or GPL v2+ or Apache v2.0+ |
6be5f69b | 15 | Group: Libraries |
70c50690 | 16 | Source0: http://download.librdf.org/source/%{name}-%{version}.tar.gz |
6eb1667a | 17 | # Source0-md5: b13c3d0e1bf291b071aae73603e70e65 |
644002bb | 18 | Patch0: %{name}-py_sitescriptdir.patch |
f3f01388 | 19 | Patch1: %{name}-php.patch |
f60c3f1b | 20 | Patch2: %{name}-sh.patch |
6eb1667a | 21 | Patch3: %{name}-ruby.patch |
8175c7f4 | 22 | URL: http://librdf.org/bindings/ |
5c588575 | 23 | BuildRequires: autoconf >= 2.62 |
1e5961ad | 24 | BuildRequires: automake >= 1:1.11 |
6be5f69b | 25 | BuildRequires: libtool |
52243c20 | 26 | %{?with_lua:BuildRequires: lua51-devel >= 5.1} |
6be5f69b | 27 | BuildRequires: perl-devel >= 1:5.8.0 |
5151d7dd | 28 | BuildRequires: pkgconfig |
70c50690 | 29 | BuildRequires: python-devel |
5c588575 | 30 | BuildRequires: redland-devel >= 1.0.15 |
70c50690 | 31 | BuildRequires: rpm-perlprov >= 4.1-13 |
bbab72d0 | 32 | BuildRequires: rpmbuild(macros) >= 1.344 |
70c50690 | 33 | %if %{with php} |
896d9365 ER |
34 | BuildRequires: %{php_name}-devel |
35 | BuildRequires: %{php_name}-program | |
5c588575 | 36 | BuildRequires: swig-php >= 2.0.0 |
70c50690 | 37 | %endif |
8175c7f4 | 38 | %if %{with ruby} |
8175c7f4 JB |
39 | BuildRequires: ruby-devel |
40 | %endif | |
f3f01388 JB |
41 | Obsoletes: dotnet-redland |
42 | Obsoletes: java-redland | |
43 | Obsoletes: tcl-redland | |
6be5f69b JB |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
6be5f69b JB |
46 | %description |
47 | Redland is a library that provides a high-level interface for the | |
48 | Resource Description Framework (RDF) allowing the RDF graph to be | |
49 | parsed from XML, stored, queried and manipulated. Redland implements | |
50 | each of the RDF concepts in its own class via an object based API, | |
1ec896c5 JB |
51 | reflected into the language APIs, currently Lua, Perl, PHP, Python and |
52 | Ruby. Several classes providing functionality such as for parsers, | |
53 | storage are built as modules that can be loaded at compile or run-time | |
54 | as required. | |
6be5f69b | 55 | |
3046b797 JR |
56 | %description -l pl.UTF-8 |
57 | Redland to biblioteka dostarczająca wysokopoziomowy interfejs dla | |
58 | szkieletu opisu zasobów (RDF - Resource Description Framework), | |
59 | umożliwiająca na przetwarzanie grafów XML z RDF, przechowywanie, | |
6be5f69b | 60 | odpytywanie i obrabianie ich. Redland implementuje wszystkie idee RDF |
3046b797 | 61 | we własnych klasach poprzez API oparte na obiektach, mających |
1ec896c5 JB |
62 | odzwierciedlenie w API dla poszczególnych języków - aktualnie Lua, |
63 | Perla, PHP, Pythona i Ruby'ego. Kilka klas dostarczających | |
64 | funkcjonalność dla analizatorów i przechowywania danych jest budowana | |
65 | jako moduły, które mogą być wczytywane w czasie kompilacji lub | |
66 | działania programu w razie potrzeby. | |
6be5f69b | 67 | |
52243c20 JB |
68 | %package -n lua-redland |
69 | Summary: Lua bindings for Redland RDF library | |
70 | Summary(pl.UTF-8): Interfejs języka Lua do biblioteki Redland RDF | |
71 | Group: Development/Languages/Perl | |
5c588575 | 72 | Requires: redland >= 1.0.15 |
52243c20 JB |
73 | |
74 | %description -n lua-redland | |
75 | Lua bindings for Redland RDF library. | |
76 | ||
77 | %description -n lua-redland -l pl.UTF-8 | |
78 | Interfejs języka Lua do biblioteki Redland RDF. | |
79 | ||
6be5f69b JB |
80 | %package -n perl-RDF-Redland |
81 | Summary: Perl bindings for Redland RDF library | |
638cfcf8 | 82 | Summary(pl.UTF-8): Perlowy interfejs do biblioteki Redland RDF |
6be5f69b | 83 | Group: Development/Languages/Perl |
5c588575 | 84 | Requires: redland >= 1.0.15 |
6be5f69b JB |
85 | |
86 | %description -n perl-RDF-Redland | |
87 | Perl bindings for Redland RDF library. | |
88 | ||
3046b797 | 89 | %description -n perl-RDF-Redland -l pl.UTF-8 |
6be5f69b | 90 | Perlowy interfejs do biblioteki Redland RDF. |
95b13dcd | 91 | |
896d9365 | 92 | %package -n %{php_name}-redland |
bbab72d0 ER |
93 | Summary: PHP 5.x bindings for Redland RDF library |
94 | Summary(pl.UTF-8): Interfejs PHP 5.x do biblioteki Redland RDF | |
6be5f69b | 95 | Group: Libraries |
ff5b9005 | 96 | %{?requires_php_extension} |
5c588575 | 97 | Requires: redland >= 1.0.15 |
6be5f69b | 98 | |
896d9365 | 99 | %description -n %{php_name}-redland |
bbab72d0 | 100 | PHP 5.x bindings for Redland RDF library. |
6be5f69b | 101 | |
896d9365 | 102 | %description -n %{php_name}-redland -l pl.UTF-8 |
bbab72d0 | 103 | Interfejs PHP 5.x do biblioteki Redland RDF. |
6be5f69b JB |
104 | |
105 | %package -n python-redland | |
106 | Summary: Python bindings for Redland RDF library | |
638cfcf8 | 107 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Redland RDF |
6be5f69b | 108 | Group: Libraries/Python |
896d9365 | 109 | Requires: python |
5c588575 | 110 | Requires: redland >= 1.0.15 |
6be5f69b JB |
111 | |
112 | %description -n python-redland | |
113 | Python bindings for Redland RDF library. | |
114 | ||
3046b797 | 115 | %description -n python-redland -l pl.UTF-8 |
6be5f69b JB |
116 | Pythonowy interfejs do biblioteki Redland RDF. |
117 | ||
118 | %package -n ruby-redland | |
119 | Summary: Ruby bindings for Redland RDF library | |
638cfcf8 | 120 | Summary(pl.UTF-8): Interfejs języka Ruby do biblioteki Redland RDF |
6be5f69b | 121 | Group: Libraries |
5c588575 | 122 | Requires: redland >= 1.0.15 |
39b261fd | 123 | %{?ruby_mod_ver_requires_eq} |
6be5f69b JB |
124 | |
125 | %description -n ruby-redland | |
126 | Ruby bindings for Redland RDF library. | |
127 | ||
3046b797 JR |
128 | %description -n ruby-redland -l pl.UTF-8 |
129 | Interfejs języka Ruby do biblioteki Redland RDF. | |
6be5f69b | 130 | |
6be5f69b JB |
131 | %prep |
132 | %setup -q | |
a6190a9d | 133 | %patch0 -p1 |
54a09cd5 | 134 | %patch1 -p1 |
f60c3f1b | 135 | %patch2 -p1 |
6eb1667a | 136 | %patch3 -p1 |
70c50690 | 137 | |
f3f01388 | 138 | # force regeneration |
f179a1c8 | 139 | %{__rm} php/{php_redland.h,redland_wrap.c} |
6be5f69b JB |
140 | |
141 | %build | |
142 | %{__libtoolize} | |
143 | %{__aclocal} | |
144 | %{__autoconf} | |
145 | %{__automake} | |
146 | %configure \ | |
147 | --disable-static \ | |
52243c20 | 148 | %{?with_lua:--with-lua=lua51} \ |
6be5f69b | 149 | --with-perl \ |
f60c3f1b | 150 | --with-perl-makemaker-args='INSTALLDIRS=vendor OPTIMIZE="%{rpmcflags}"' \ |
70c50690 | 151 | %if %{with php} |
896d9365 ER |
152 | PHP_CONFIG=%{_bindir}/php-config \ |
153 | --with-php=%{__php} \ | |
70c50690 | 154 | %endif |
6be5f69b | 155 | --with-python \ |
f3f01388 | 156 | %{?with_ruby:--with-ruby} |
6be5f69b JB |
157 | |
158 | %{__make} \ | |
f3f01388 | 159 | pythondir=%{py_sitedir} |
6be5f69b | 160 | |
208185ed | 161 | %if %{with ruby} |
162 | cd ruby | |
163 | rdoc --op ../rdoc | |
164 | cd .. | |
165 | %endif | |
166 | ||
6be5f69b JB |
167 | %install |
168 | rm -rf $RPM_BUILD_ROOT | |
6be5f69b JB |
169 | %{__make} install \ |
170 | DESTDIR=$RPM_BUILD_ROOT \ | |
52243c20 JB |
171 | pythondir=%{py_sitedir} \ |
172 | luadir=%{_libdir}/lua/5.1 | |
6be5f69b | 173 | |
54a09cd5 | 174 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} |
175 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
f60c3f1b | 176 | %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py |
54a09cd5 | 177 | |
52243c20 JB |
178 | %if %{with lua} |
179 | chmod +x $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.so | |
180 | %endif | |
70c50690 | 181 | %if %{with php} |
bbab72d0 ER |
182 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
183 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/redland.ini | |
ff5b9005 ER |
184 | ; Enable redland bindings module |
185 | extension=redland.so | |
186 | EOF | |
a4f025ce | 187 | # make .so executable so that rpm would add autodeps on .so files |
bbab72d0 | 188 | chmod +x $RPM_BUILD_ROOT%{php_extensiondir}/*.so |
70c50690 | 189 | %endif |
ff5b9005 | 190 | |
bbab72d0 ER |
191 | rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
192 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RDF/Redland/CORE/.packlist | |
193 | ||
6be5f69b JB |
194 | %clean |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | ||
896d9365 | 197 | %post -n %{php_name}-redland |
bbab72d0 ER |
198 | %php_webserver_restart |
199 | ||
896d9365 | 200 | %postun -n %{php_name}-redland |
bbab72d0 ER |
201 | if [ "$1" = 0 ]; then |
202 | %php_webserver_restart | |
203 | fi | |
204 | ||
6be5f69b JB |
205 | %files |
206 | %defattr(644,root,root,755) | |
f3f01388 | 207 | %doc AUTHORS ChangeLog* LICENSE.html NEWS.html README.html RELEASE.html TODO.html |
6be5f69b | 208 | |
52243c20 JB |
209 | %if %{with lua} |
210 | %files -n lua-redland | |
211 | %defattr(644,root,root,755) | |
212 | %attr(755,root,root) %{_libdir}/lua/5.1/redland.so | |
213 | %endif | |
214 | ||
6be5f69b JB |
215 | %files -n perl-RDF-Redland |
216 | %defattr(644,root,root,755) | |
8175c7f4 | 217 | %doc docs/perl.html |
6be5f69b JB |
218 | %dir %{perl_vendorarch}/RDF |
219 | %{perl_vendorarch}/RDF/Redland.pm | |
220 | %{perl_vendorarch}/RDF/Redland | |
221 | %dir %{perl_vendorarch}/auto/RDF | |
222 | %dir %{perl_vendorarch}/auto/RDF/Redland | |
223 | %dir %{perl_vendorarch}/auto/RDF/Redland/CORE | |
224 | %{perl_vendorarch}/auto/RDF/Redland/CORE/CORE.bs | |
225 | %attr(755,root,root) %{perl_vendorarch}/auto/RDF/Redland/CORE/CORE.so | |
226 | %{_mandir}/man3/RDF::Redland*.3pm* | |
95b13dcd | 227 | |
70c50690 | 228 | %if %{with php} |
896d9365 | 229 | %files -n %{php_name}-redland |
95b13dcd AG |
230 | %defattr(644,root,root,755) |
231 | %doc docs/php.html | |
bbab72d0 ER |
232 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/redland.ini |
233 | %attr(755,root,root) %{php_extensiondir}/redland.so | |
70c50690 | 234 | %endif |
6be5f69b JB |
235 | |
236 | %files -n python-redland | |
237 | %defattr(644,root,root,755) | |
238 | %doc docs/python.html docs/pydoc | |
54a09cd5 | 239 | %{py_sitescriptdir}/RDF.py[co] |
6eb1667a JB |
240 | %{py_sitescriptdir}/Redland.py[co] |
241 | %attr(755,root,root) %{py_sitedir}/_Redland.so | |
6be5f69b | 242 | |
84d635b7 | 243 | %if %{with ruby} |
6be5f69b JB |
244 | %files -n ruby-redland |
245 | %defattr(644,root,root,755) | |
208185ed | 246 | %doc docs/ruby.html rdoc |
6be5f69b | 247 | %attr(755,root,root) %{ruby_archdir}/redland.so |
8572d63b | 248 | %dir %{ruby_rubylibdir}/rdf |
249 | %{ruby_rubylibdir}/rdf/redland.rb | |
250 | %{ruby_rubylibdir}/rdf/redland | |
84d635b7 | 251 | %endif |