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
7 %define php_name php%{?php_suffix}
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: b13c3d0e1bf291b071aae73603e70e65
18 Patch0: %{name}-py_sitescriptdir.patch
19 Patch1: %{name}-php.patch
20 Patch2: %{name}-sh.patch
21 Patch3: %{name}-ruby.patch
22 URL: http://librdf.org/bindings/
23 BuildRequires: autoconf >= 2.62
24 BuildRequires: automake >= 1:1.11
25 BuildRequires: libtool
26 %{?with_lua:BuildRequires: lua51-devel >= 5.1}
27 BuildRequires: perl-devel >= 1:5.8.0
28 BuildRequires: pkgconfig
29 BuildRequires: python-devel
30 BuildRequires: redland-devel >= 1.0.15
31 BuildRequires: rpm-perlprov >= 4.1-13
32 BuildRequires: rpmbuild(macros) >= 1.344
34 BuildRequires: %{php_name}-devel
35 BuildRequires: %{php_name}-program
36 BuildRequires: swig-php >= 2.0.0
39 BuildRequires: ruby-devel
41 Obsoletes: dotnet-redland
42 Obsoletes: java-redland
43 Obsoletes: tcl-redland
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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,
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
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,
60 odpytywanie i obrabianie ich. Redland implementuje wszystkie idee RDF
61 we własnych klasach poprzez API oparte na obiektach, mających
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.
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
72 Requires: redland >= 1.0.15
74 %description -n lua-redland
75 Lua bindings for Redland RDF library.
77 %description -n lua-redland -l pl.UTF-8
78 Interfejs języka Lua do biblioteki Redland RDF.
80 %package -n perl-RDF-Redland
81 Summary: Perl bindings for Redland RDF library
82 Summary(pl.UTF-8): Perlowy interfejs do biblioteki Redland RDF
83 Group: Development/Languages/Perl
84 Requires: redland >= 1.0.15
86 %description -n perl-RDF-Redland
87 Perl bindings for Redland RDF library.
89 %description -n perl-RDF-Redland -l pl.UTF-8
90 Perlowy interfejs do biblioteki Redland RDF.
92 %package -n %{php_name}-redland
93 Summary: PHP 5.x bindings for Redland RDF library
94 Summary(pl.UTF-8): Interfejs PHP 5.x do biblioteki Redland RDF
96 %{?requires_php_extension}
97 Requires: redland >= 1.0.15
99 %description -n %{php_name}-redland
100 PHP 5.x bindings for Redland RDF library.
102 %description -n %{php_name}-redland -l pl.UTF-8
103 Interfejs PHP 5.x do biblioteki Redland RDF.
105 %package -n python-redland
106 Summary: Python bindings for Redland RDF library
107 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Redland RDF
108 Group: Libraries/Python
110 Requires: redland >= 1.0.15
112 %description -n python-redland
113 Python bindings for Redland RDF library.
115 %description -n python-redland -l pl.UTF-8
116 Pythonowy interfejs do biblioteki Redland RDF.
118 %package -n ruby-redland
119 Summary: Ruby bindings for Redland RDF library
120 Summary(pl.UTF-8): Interfejs języka Ruby do biblioteki Redland RDF
122 Requires: redland >= 1.0.15
123 %{?ruby_mod_ver_requires_eq}
125 %description -n ruby-redland
126 Ruby bindings for Redland RDF library.
128 %description -n ruby-redland -l pl.UTF-8
129 Interfejs języka Ruby do biblioteki Redland RDF.
139 %{__rm} php/{php_redland.h,redland_wrap.c}
148 %{?with_lua:--with-lua=lua51} \
150 --with-perl-makemaker-args='INSTALLDIRS=vendor OPTIMIZE="%{rpmcflags}"' \
152 PHP_CONFIG=%{_bindir}/php-config \
153 --with-php=%{__php} \
156 %{?with_ruby:--with-ruby}
159 pythondir=%{py_sitedir}
168 rm -rf $RPM_BUILD_ROOT
170 DESTDIR=$RPM_BUILD_ROOT \
171 pythondir=%{py_sitedir} \
172 luadir=%{_libdir}/lua/5.1
174 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
175 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
176 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
179 chmod +x $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.so
182 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
183 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/redland.ini
184 ; Enable redland bindings module
187 # make .so executable so that rpm would add autodeps on .so files
188 chmod +x $RPM_BUILD_ROOT%{php_extensiondir}/*.so
191 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
192 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RDF/Redland/CORE/.packlist
195 rm -rf $RPM_BUILD_ROOT
197 %post -n %{php_name}-redland
198 %php_webserver_restart
200 %postun -n %{php_name}-redland
201 if [ "$1" = 0 ]; then
202 %php_webserver_restart
206 %defattr(644,root,root,755)
207 %doc AUTHORS ChangeLog* LICENSE.html NEWS.html README.html RELEASE.html TODO.html
210 %files -n lua-redland
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/lua/5.1/redland.so
215 %files -n perl-RDF-Redland
216 %defattr(644,root,root,755)
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*
229 %files -n %{php_name}-redland
230 %defattr(644,root,root,755)
232 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/redland.ini
233 %attr(755,root,root) %{php_extensiondir}/redland.so
236 %files -n python-redland
237 %defattr(644,root,root,755)
238 %doc docs/python.html docs/pydoc
239 %{py_sitescriptdir}/RDF.py[co]
240 %{py_sitescriptdir}/Redland.py[co]
241 %attr(755,root,root) %{py_sitedir}/_Redland.so
244 %files -n ruby-redland
245 %defattr(644,root,root,755)
246 %doc docs/ruby.html rdoc
247 %attr(755,root,root) %{ruby_archdir}/redland.so
248 %dir %{ruby_rubylibdir}/rdf
249 %{ruby_rubylibdir}/rdf/redland.rb
250 %{ruby_rubylibdir}/rdf/redland