3 %bcond_without lua # don't build Lua bindings
4 %bcond_without php # don't build (any) PHP bindings
5 %bcond_without ruby # don't build Ruby bindings
6 %bcond_with php4 # build PHP4 bindings (default PHP5)
8 %include /usr/lib/rpm/macros.perl
9 Summary: Redland RDF Application Framework Bindings
10 Summary(pl.UTF-8): Wiązania szkieletu aplikacji Redland RDF
11 Name: redland-bindings
14 License: LGPL v2.1+ or GPL v2+ or Apache v2.0+
16 Source0: http://download.librdf.org/source/%{name}-%{version}.tar.gz
17 # Source0-md5: 62fc463076cb6fef4e922bdb5f2979b9
18 Patch0: %{name}-py_sitescriptdir.patch
19 Patch1: %{name}-php.patch
20 Patch2: %{name}-sh.patch
21 URL: http://librdf.org/bindings/
22 BuildRequires: autoconf >= 2.62
23 BuildRequires: automake >= 1:1.11
24 BuildRequires: libtool
25 %{?with_lua:BuildRequires: lua51-devel >= 5.1}
26 BuildRequires: perl-devel >= 1:5.8.0
27 BuildRequires: pkgconfig
28 BuildRequires: python-devel
29 BuildRequires: redland-devel >= 1.0.15
30 BuildRequires: rpm-perlprov >= 4.1-13
31 BuildRequires: rpmbuild(macros) >= 1.344
34 BuildRequires: php4-cli
35 BuildRequires: php4-devel
37 BuildRequires: php-cli >= 3:5.0.0
38 BuildRequires: php-devel >= 3:5.0.0
40 BuildRequires: swig-php >= 2.0.0
43 BuildRequires: ruby-devel
45 Obsoletes: dotnet-redland
46 Obsoletes: java-redland
47 Obsoletes: tcl-redland
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 Redland is a library that provides a high-level interface for the
52 Resource Description Framework (RDF) allowing the RDF graph to be
53 parsed from XML, stored, queried and manipulated. Redland implements
54 each of the RDF concepts in its own class via an object based API,
55 reflected into the language APIs, currently Lua, Perl, PHP, Python and
56 Ruby. Several classes providing functionality such as for parsers,
57 storage are built as modules that can be loaded at compile or run-time
60 %description -l pl.UTF-8
61 Redland to biblioteka dostarczająca wysokopoziomowy interfejs dla
62 szkieletu opisu zasobów (RDF - Resource Description Framework),
63 umożliwiająca na przetwarzanie grafów XML z RDF, przechowywanie,
64 odpytywanie i obrabianie ich. Redland implementuje wszystkie idee RDF
65 we własnych klasach poprzez API oparte na obiektach, mających
66 odzwierciedlenie w API dla poszczególnych języków - aktualnie Lua,
67 Perla, PHP, Pythona i Ruby'ego. Kilka klas dostarczających
68 funkcjonalność dla analizatorów i przechowywania danych jest budowana
69 jako moduły, które mogą być wczytywane w czasie kompilacji lub
70 działania programu w razie potrzeby.
72 %package -n lua-redland
73 Summary: Lua bindings for Redland RDF library
74 Summary(pl.UTF-8): Interfejs języka Lua do biblioteki Redland RDF
75 Group: Development/Languages/Perl
76 Requires: redland >= 1.0.15
78 %description -n lua-redland
79 Lua bindings for Redland RDF library.
81 %description -n lua-redland -l pl.UTF-8
82 Interfejs języka Lua do biblioteki Redland RDF.
84 %package -n perl-RDF-Redland
85 Summary: Perl bindings for Redland RDF library
86 Summary(pl.UTF-8): Perlowy interfejs do biblioteki Redland RDF
87 Group: Development/Languages/Perl
88 Requires: redland >= 1.0.15
90 %description -n perl-RDF-Redland
91 Perl bindings for Redland RDF library.
93 %description -n perl-RDF-Redland -l pl.UTF-8
94 Perlowy interfejs do biblioteki Redland RDF.
96 %package -n php4-redland
97 Summary: PHP bindings for Redland RDF library
98 Summary(pl.UTF-8): Interfejs PHP do biblioteki Redland RDF
100 %{?requires_php_extension}
101 Requires: php4-common >= 3:4.4.0-3
102 Requires: redland >= 1.0.15
104 %description -n php4-redland
105 PHP 4.x bindings for Redland RDF library.
107 %description -n php4-redland -l pl.UTF-8
108 Interfejs PHP 4.x do biblioteki Redland RDF.
110 %package -n php-redland
111 Summary: PHP 5.x bindings for Redland RDF library
112 Summary(pl.UTF-8): Interfejs PHP 5.x do biblioteki Redland RDF
114 %{?requires_php_extension}
115 Requires: php(core) >= 5.0.4
116 Requires: redland >= 1.0.15
118 %description -n php-redland
119 PHP 5.x bindings for Redland RDF library.
121 %description -n php-redland -l pl.UTF-8
122 Interfejs PHP 5.x do biblioteki Redland RDF.
124 %package -n python-redland
125 Summary: Python bindings for Redland RDF library
126 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Redland RDF
127 Group: Libraries/Python
128 Requires: redland >= 1.0.15
129 %pyrequires_eq python
131 %description -n python-redland
132 Python bindings for Redland RDF library.
134 %description -n python-redland -l pl.UTF-8
135 Pythonowy interfejs do biblioteki Redland RDF.
137 %package -n ruby-redland
138 Summary: Ruby bindings for Redland RDF library
139 Summary(pl.UTF-8): Interfejs języka Ruby do biblioteki Redland RDF
141 Requires: redland >= 1.0.15
142 %{?ruby_mod_ver_requires_eq}
144 %description -n ruby-redland
145 Ruby bindings for Redland RDF library.
147 %description -n ruby-redland -l pl.UTF-8
148 Interfejs języka Ruby do biblioteki Redland RDF.
157 %{__rm} php/{php_redland.h,redland_wrap.c}
166 %{?with_lua:--with-lua=lua51} \
168 --with-perl-makemaker-args='INSTALLDIRS=vendor OPTIMIZE="%{rpmcflags}"' \
170 PHP_CONFIG=%{_bindir}/php%{?with_php4:4}-config \
171 --with-php=%{_bindir}/php%{?with_php4:4}.cli \
174 %{?with_ruby:--with-ruby}
177 pythondir=%{py_sitedir}
186 rm -rf $RPM_BUILD_ROOT
189 DESTDIR=$RPM_BUILD_ROOT \
190 pythondir=%{py_sitedir} \
191 luadir=%{_libdir}/lua/5.1
193 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
194 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
195 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
198 chmod +x $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.so
201 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
202 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/redland.ini
203 ; Enable redland bindings module
206 # make .so executable so that rpm would add autodeps on .so files
207 chmod +x $RPM_BUILD_ROOT%{php_extensiondir}/*.so
210 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
211 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RDF/Redland/CORE/.packlist
214 rm -rf $RPM_BUILD_ROOT
217 %php_webserver_restart
219 %postun -n php-redland
220 if [ "$1" = 0 ]; then
221 %php_webserver_restart
224 %post -n php4-redland
225 %php4_webserver_restart
227 %postun -n php4-redland
228 if [ "$1" = 0 ]; then
229 %php4_webserver_restart
233 %defattr(644,root,root,755)
234 %doc AUTHORS ChangeLog* LICENSE.html NEWS.html README.html RELEASE.html TODO.html
237 %files -n lua-redland
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/lua/5.1/redland.so
242 %files -n perl-RDF-Redland
243 %defattr(644,root,root,755)
245 %dir %{perl_vendorarch}/RDF
246 %{perl_vendorarch}/RDF/Redland.pm
247 %{perl_vendorarch}/RDF/Redland
248 %dir %{perl_vendorarch}/auto/RDF
249 %dir %{perl_vendorarch}/auto/RDF/Redland
250 %dir %{perl_vendorarch}/auto/RDF/Redland/CORE
251 %{perl_vendorarch}/auto/RDF/Redland/CORE/CORE.bs
252 %attr(755,root,root) %{perl_vendorarch}/auto/RDF/Redland/CORE/CORE.so
253 %{_mandir}/man3/RDF::Redland*.3pm*
256 %files -n php%{?with_php4:4}-redland
257 %defattr(644,root,root,755)
259 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/redland.ini
260 %attr(755,root,root) %{php_extensiondir}/redland.so
263 %files -n python-redland
264 %defattr(644,root,root,755)
265 %doc docs/python.html docs/pydoc
266 %{py_sitescriptdir}/RDF.py[co]
267 %attr(755,root,root) %{py_sitedir}/Redland.so
270 %files -n ruby-redland
271 %defattr(644,root,root,755)
272 %doc docs/ruby.html rdoc
273 %attr(755,root,root) %{ruby_archdir}/redland.so
274 %dir %{ruby_rubylibdir}/rdf
275 %{ruby_rubylibdir}/rdf/redland.rb
276 %{ruby_rubylibdir}/rdf/redland