]> git.pld-linux.org Git - packages/redland-bindings.git/blob - redland-bindings.spec
- release 4 (by relup.sh)
[packages/redland-bindings.git] / redland-bindings.spec
1 #
2 # Conditional build:
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)
7 #
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
12 Version:        1.0.16.1
13 Release:        4
14 License:        LGPL v2.1+ or GPL v2+ or Apache v2.0+
15 Group:          Libraries
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
32 %if %{with php}
33 %if %{with php4}
34 BuildRequires:  php4-cli
35 BuildRequires:  php4-devel
36 %else
37 BuildRequires:  php-cli >= 3:5.0.0
38 BuildRequires:  php-devel >= 3:5.0.0
39 %endif
40 BuildRequires:  swig-php >= 2.0.0
41 %endif
42 %if %{with ruby}
43 BuildRequires:  ruby-devel
44 %endif
45 Obsoletes:      dotnet-redland
46 Obsoletes:      java-redland
47 Obsoletes:      tcl-redland
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
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
58 as required.
59
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.
71
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
77
78 %description -n lua-redland
79 Lua bindings for Redland RDF library.
80
81 %description -n lua-redland -l pl.UTF-8
82 Interfejs języka Lua do biblioteki Redland RDF.
83
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
89
90 %description -n perl-RDF-Redland
91 Perl bindings for Redland RDF library.
92
93 %description -n perl-RDF-Redland -l pl.UTF-8
94 Perlowy interfejs do biblioteki Redland RDF.
95
96 %package -n php4-redland
97 Summary:        PHP bindings for Redland RDF library
98 Summary(pl.UTF-8):      Interfejs PHP do biblioteki Redland RDF
99 Group:          Libraries
100 %{?requires_php_extension}
101 Requires:       php4-common >= 3:4.4.0-3
102 Requires:       redland >= 1.0.15
103
104 %description -n php4-redland
105 PHP 4.x bindings for Redland RDF library.
106
107 %description -n php4-redland -l pl.UTF-8
108 Interfejs PHP 4.x do biblioteki Redland RDF.
109
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
113 Group:          Libraries
114 %{?requires_php_extension}
115 Requires:       php(core) >= 5.0.4
116 Requires:       redland >= 1.0.15
117
118 %description -n php-redland
119 PHP 5.x bindings for Redland RDF library.
120
121 %description -n php-redland -l pl.UTF-8
122 Interfejs PHP 5.x do biblioteki Redland RDF.
123
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
130
131 %description -n python-redland
132 Python bindings for Redland RDF library.
133
134 %description -n python-redland -l pl.UTF-8
135 Pythonowy interfejs do biblioteki Redland RDF.
136
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
140 Group:          Libraries
141 Requires:       redland >= 1.0.15
142 %{?ruby_mod_ver_requires_eq}
143
144 %description -n ruby-redland
145 Ruby bindings for Redland RDF library.
146
147 %description -n ruby-redland -l pl.UTF-8
148 Interfejs języka Ruby do biblioteki Redland RDF.
149
150 %prep
151 %setup -q
152 %patch0 -p1
153 %patch1 -p1
154 %patch2 -p1
155
156 # force regeneration
157 %{__rm} php/{php_redland.h,redland_wrap.c}
158
159 %build
160 %{__libtoolize}
161 %{__aclocal}
162 %{__autoconf}
163 %{__automake}
164 %configure \
165         --disable-static \
166         %{?with_lua:--with-lua=lua51} \
167         --with-perl \
168         --with-perl-makemaker-args='INSTALLDIRS=vendor OPTIMIZE="%{rpmcflags}"' \
169 %if %{with php}
170         PHP_CONFIG=%{_bindir}/php%{?with_php4:4}-config \
171         --with-php=%{_bindir}/php%{?with_php4:4}.cli \
172 %endif
173         --with-python \
174         %{?with_ruby:--with-ruby}
175
176 %{__make} \
177         pythondir=%{py_sitedir}
178
179 %if %{with ruby}
180 cd ruby
181 rdoc --op ../rdoc
182 cd ..
183 %endif
184
185 %install
186 rm -rf $RPM_BUILD_ROOT
187
188 %{__make} install \
189         DESTDIR=$RPM_BUILD_ROOT \
190         pythondir=%{py_sitedir} \
191         luadir=%{_libdir}/lua/5.1
192
193 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
194 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
195 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
196
197 %if %{with lua}
198 chmod +x $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.so
199 %endif
200 %if %{with php}
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
204 extension=redland.so
205 EOF
206 # make .so executable so that rpm would add autodeps on .so files
207 chmod +x $RPM_BUILD_ROOT%{php_extensiondir}/*.so
208 %endif
209
210 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
211 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RDF/Redland/CORE/.packlist
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %post -n php-redland
217 %php_webserver_restart
218
219 %postun -n php-redland
220 if [ "$1" = 0 ]; then
221         %php_webserver_restart
222 fi
223
224 %post -n php4-redland
225 %php4_webserver_restart
226
227 %postun -n php4-redland
228 if [ "$1" = 0 ]; then
229         %php4_webserver_restart
230 fi
231
232 %files
233 %defattr(644,root,root,755)
234 %doc AUTHORS ChangeLog* LICENSE.html NEWS.html README.html RELEASE.html TODO.html
235
236 %if %{with lua}
237 %files -n lua-redland
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/lua/5.1/redland.so
240 %endif
241
242 %files -n perl-RDF-Redland
243 %defattr(644,root,root,755)
244 %doc docs/perl.html
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*
254
255 %if %{with php}
256 %files -n php%{?with_php4:4}-redland
257 %defattr(644,root,root,755)
258 %doc docs/php.html
259 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/redland.ini
260 %attr(755,root,root) %{php_extensiondir}/redland.so
261 %endif
262
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
268
269 %if %{with ruby}
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
277 %endif
This page took 0.140828 seconds and 3 git commands to generate.