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
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
33 BuildRequires: %{php_name}-devel
34 BuildRequires: %{php_name}-program
35 BuildRequires: swig-php >= 2.0.0
38 BuildRequires: ruby-devel
40 Obsoletes: dotnet-redland
41 Obsoletes: java-redland
42 Obsoletes: tcl-redland
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Redland is a library that provides a high-level interface for the
47 Resource Description Framework (RDF) allowing the RDF graph to be
48 parsed from XML, stored, queried and manipulated. Redland implements
49 each of the RDF concepts in its own class via an object based API,
50 reflected into the language APIs, currently Lua, Perl, PHP, Python and
51 Ruby. Several classes providing functionality such as for parsers,
52 storage are built as modules that can be loaded at compile or run-time
55 %description -l pl.UTF-8
56 Redland to biblioteka dostarczająca wysokopoziomowy interfejs dla
57 szkieletu opisu zasobów (RDF - Resource Description Framework),
58 umożliwiająca na przetwarzanie grafów XML z RDF, przechowywanie,
59 odpytywanie i obrabianie ich. Redland implementuje wszystkie idee RDF
60 we własnych klasach poprzez API oparte na obiektach, mających
61 odzwierciedlenie w API dla poszczególnych języków - aktualnie Lua,
62 Perla, PHP, Pythona i Ruby'ego. Kilka klas dostarczających
63 funkcjonalność dla analizatorów i przechowywania danych jest budowana
64 jako moduły, które mogą być wczytywane w czasie kompilacji lub
65 działania programu w razie potrzeby.
67 %package -n lua-redland
68 Summary: Lua bindings for Redland RDF library
69 Summary(pl.UTF-8): Interfejs języka Lua do biblioteki Redland RDF
70 Group: Development/Languages/Perl
71 Requires: redland >= 1.0.15
73 %description -n lua-redland
74 Lua bindings for Redland RDF library.
76 %description -n lua-redland -l pl.UTF-8
77 Interfejs języka Lua do biblioteki Redland RDF.
79 %package -n perl-RDF-Redland
80 Summary: Perl bindings for Redland RDF library
81 Summary(pl.UTF-8): Perlowy interfejs do biblioteki Redland RDF
82 Group: Development/Languages/Perl
83 Requires: redland >= 1.0.15
85 %description -n perl-RDF-Redland
86 Perl bindings for Redland RDF library.
88 %description -n perl-RDF-Redland -l pl.UTF-8
89 Perlowy interfejs do biblioteki Redland RDF.
91 %package -n %{php_name}-redland
92 Summary: PHP 5.x bindings for Redland RDF library
93 Summary(pl.UTF-8): Interfejs PHP 5.x do biblioteki Redland RDF
95 %{?requires_php_extension}
96 Requires: redland >= 1.0.15
98 %description -n %{php_name}-redland
99 PHP 5.x bindings for Redland RDF library.
101 %description -n %{php_name}-redland -l pl.UTF-8
102 Interfejs PHP 5.x do biblioteki Redland RDF.
104 %package -n python-redland
105 Summary: Python bindings for Redland RDF library
106 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Redland RDF
107 Group: Libraries/Python
109 Requires: redland >= 1.0.15
111 %description -n python-redland
112 Python bindings for Redland RDF library.
114 %description -n python-redland -l pl.UTF-8
115 Pythonowy interfejs do biblioteki Redland RDF.
117 %package -n ruby-redland
118 Summary: Ruby bindings for Redland RDF library
119 Summary(pl.UTF-8): Interfejs języka Ruby do biblioteki Redland RDF
121 Requires: redland >= 1.0.15
122 %{?ruby_mod_ver_requires_eq}
124 %description -n ruby-redland
125 Ruby bindings for Redland RDF library.
127 %description -n ruby-redland -l pl.UTF-8
128 Interfejs języka Ruby do biblioteki Redland RDF.
137 %{__rm} php/{php_redland.h,redland_wrap.c}
146 %{?with_lua:--with-lua=lua51} \
148 --with-perl-makemaker-args='INSTALLDIRS=vendor OPTIMIZE="%{rpmcflags}"' \
150 PHP_CONFIG=%{_bindir}/php-config \
151 --with-php=%{__php} \
154 %{?with_ruby:--with-ruby}
157 pythondir=%{py_sitedir}
166 rm -rf $RPM_BUILD_ROOT
168 DESTDIR=$RPM_BUILD_ROOT \
169 pythondir=%{py_sitedir} \
170 luadir=%{_libdir}/lua/5.1
172 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
173 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
174 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
177 chmod +x $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.so
180 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
181 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/redland.ini
182 ; Enable redland bindings module
185 # make .so executable so that rpm would add autodeps on .so files
186 chmod +x $RPM_BUILD_ROOT%{php_extensiondir}/*.so
189 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
190 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RDF/Redland/CORE/.packlist
193 rm -rf $RPM_BUILD_ROOT
195 %post -n %{php_name}-redland
196 %php_webserver_restart
198 %postun -n %{php_name}-redland
199 if [ "$1" = 0 ]; then
200 %php_webserver_restart
204 %defattr(644,root,root,755)
205 %doc AUTHORS ChangeLog* LICENSE.html NEWS.html README.html RELEASE.html TODO.html
208 %files -n lua-redland
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_libdir}/lua/5.1/redland.so
213 %files -n perl-RDF-Redland
214 %defattr(644,root,root,755)
216 %dir %{perl_vendorarch}/RDF
217 %{perl_vendorarch}/RDF/Redland.pm
218 %{perl_vendorarch}/RDF/Redland
219 %dir %{perl_vendorarch}/auto/RDF
220 %dir %{perl_vendorarch}/auto/RDF/Redland
221 %dir %{perl_vendorarch}/auto/RDF/Redland/CORE
222 %{perl_vendorarch}/auto/RDF/Redland/CORE/CORE.bs
223 %attr(755,root,root) %{perl_vendorarch}/auto/RDF/Redland/CORE/CORE.so
224 %{_mandir}/man3/RDF::Redland*.3pm*
227 %files -n %{php_name}-redland
228 %defattr(644,root,root,755)
230 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/redland.ini
231 %attr(755,root,root) %{php_extensiondir}/redland.so
234 %files -n python-redland
235 %defattr(644,root,root,755)
236 %doc docs/python.html docs/pydoc
237 %{py_sitescriptdir}/RDF.py[co]
238 %attr(755,root,root) %{py_sitedir}/Redland.so
241 %files -n ruby-redland
242 %defattr(644,root,root,755)
243 %doc docs/ruby.html rdoc
244 %attr(755,root,root) %{ruby_archdir}/redland.so
245 %dir %{ruby_rubylibdir}/rdf
246 %{ruby_rubylibdir}/rdf/redland.rb
247 %{ruby_rubylibdir}/rdf/redland