]> git.pld-linux.org Git - packages/redland-bindings.git/blob - redland-bindings.spec
- updated to 1.0.17.1
[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
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
12 Version:        1.0.17.1
13 Release:        1
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:  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
33 %if %{with php}
34 BuildRequires:  %{php_name}-devel
35 BuildRequires:  %{php_name}-program
36 BuildRequires:  swig-php >= 2.0.0
37 %endif
38 %if %{with ruby}
39 BuildRequires:  ruby-devel
40 %endif
41 Obsoletes:      dotnet-redland
42 Obsoletes:      java-redland
43 Obsoletes:      tcl-redland
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
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,
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.
55
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.
67
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
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
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
85
86 %description -n perl-RDF-Redland
87 Perl bindings for Redland RDF library.
88
89 %description -n perl-RDF-Redland -l pl.UTF-8
90 Perlowy interfejs do biblioteki Redland RDF.
91
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
95 Group:          Libraries
96 %{?requires_php_extension}
97 Requires:       redland >= 1.0.15
98
99 %description -n %{php_name}-redland
100 PHP 5.x bindings for Redland RDF library.
101
102 %description -n %{php_name}-redland -l pl.UTF-8
103 Interfejs PHP 5.x do biblioteki Redland RDF.
104
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
109 Requires:       python
110 Requires:       redland >= 1.0.15
111
112 %description -n python-redland
113 Python bindings for Redland RDF library.
114
115 %description -n python-redland -l pl.UTF-8
116 Pythonowy interfejs do biblioteki Redland RDF.
117
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
121 Group:          Libraries
122 Requires:       redland >= 1.0.15
123 %{?ruby_mod_ver_requires_eq}
124
125 %description -n ruby-redland
126 Ruby bindings for Redland RDF library.
127
128 %description -n ruby-redland -l pl.UTF-8
129 Interfejs języka Ruby do biblioteki Redland RDF.
130
131 %prep
132 %setup -q
133 %patch0 -p1
134 %patch1 -p1
135 %patch2 -p1
136 %patch3 -p1
137
138 # force regeneration
139 %{__rm} php/{php_redland.h,redland_wrap.c}
140
141 %build
142 %{__libtoolize}
143 %{__aclocal}
144 %{__autoconf}
145 %{__automake}
146 %configure \
147         --disable-static \
148         %{?with_lua:--with-lua=lua51} \
149         --with-perl \
150         --with-perl-makemaker-args='INSTALLDIRS=vendor OPTIMIZE="%{rpmcflags}"' \
151 %if %{with php}
152         PHP_CONFIG=%{_bindir}/php-config \
153         --with-php=%{__php} \
154 %endif
155         --with-python \
156         %{?with_ruby:--with-ruby}
157
158 %{__make} \
159         pythondir=%{py_sitedir}
160
161 %if %{with ruby}
162 cd ruby
163 rdoc --op ../rdoc
164 cd ..
165 %endif
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169 %{__make} install \
170         DESTDIR=$RPM_BUILD_ROOT \
171         pythondir=%{py_sitedir} \
172         luadir=%{_libdir}/lua/5.1
173
174 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
175 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
176 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
177
178 %if %{with lua}
179 chmod +x $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.so
180 %endif
181 %if %{with php}
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
185 extension=redland.so
186 EOF
187 # make .so executable so that rpm would add autodeps on .so files
188 chmod +x $RPM_BUILD_ROOT%{php_extensiondir}/*.so
189 %endif
190
191 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
192 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RDF/Redland/CORE/.packlist
193
194 %clean
195 rm -rf $RPM_BUILD_ROOT
196
197 %post -n %{php_name}-redland
198 %php_webserver_restart
199
200 %postun -n %{php_name}-redland
201 if [ "$1" = 0 ]; then
202         %php_webserver_restart
203 fi
204
205 %files
206 %defattr(644,root,root,755)
207 %doc AUTHORS ChangeLog* LICENSE.html NEWS.html README.html RELEASE.html TODO.html
208
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
215 %files -n perl-RDF-Redland
216 %defattr(644,root,root,755)
217 %doc docs/perl.html
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*
227
228 %if %{with php}
229 %files -n %{php_name}-redland
230 %defattr(644,root,root,755)
231 %doc docs/php.html
232 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/redland.ini
233 %attr(755,root,root) %{php_extensiondir}/redland.so
234 %endif
235
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
242
243 %if %{with ruby}
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
251 %endif
This page took 0.103912 seconds and 3 git commands to generate.