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