3 %bcond_with csharp # C# bindings
4 %bcond_without php # PHP bindings
5 %bcond_without python # Python bindings
6 %bcond_without ruby # Ruby bindings
7 %bcond_without tcl # TCL bindings
8 %bcond_with java # Java bindings
10 Summary: Bindings for Xapian
15 Group: Development/Languages
16 URL: http://www.xapian.org/
17 Source0: http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: c330b2ccc451c890916c44446e148f07
19 %{?with_java:BuildRequires: jdk}
20 %{?with_csharp:BuildRequires: mono-devel}
21 %{?with_php:BuildRequires: php-devel >= 4:5.0.4}
22 BuildRequires: pkgconfig
23 %{?with_python:BuildRequires: python-devel}
24 BuildRequires: python-modules
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.484
27 %{?with_ruby:BuildRequires: ruby-devel}
28 %{?with_ruby:BuildRequires: ruby-modules}
29 %{?with_tcl:BuildRequires: tcl-devel}
30 BuildRequires: xapian-core-devel >= %{version}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Xapian is an Open Source Probabilistic Information Retrieval Library.
35 It offers a highly adaptable toolkit that allows developers to easily
36 add advanced indexing and search facilities to applications.
38 %package -n python-xapian
39 Summary: Files needed for developing Python scripts which use Xapian
40 Group: Development/Languages/Python
41 %pyrequires_eq python-modules
43 %description -n python-xapian
44 Xapian is an Open Source Probabilistic Information Retrieval
45 framework. It offers a highly adaptable toolkit that allows developers
46 to easily add advanced indexing and search facilities to applications.
47 This package provides the files needed for developing Python scripts
50 %package -n php-xapian
51 Summary: Files needed for developing PHP scripts which use Xapian
52 Group: Networking/Daemons
53 %{?requires_php_extension}
55 %description -n php-xapian
56 Xapian is an Open Source Probabilistic Information Retrieval
57 framework. It offers a highly adaptable toolkit that allows developers
58 to easily add advanced indexing and search facilities to applications.
59 This package provides the files needed for developing PHP scripts
62 %package -n ruby-xapian
63 Summary: Files needed for developing Ruby scripts which use Xapian
64 Group: Development/Languages
65 %{?ruby_mod_ver_requires_eq}
67 %description -n ruby-xapian
68 Xapian is an Open Source Probabilistic Information Retrieval
69 framework. It offers a highly adaptable toolkit that allows developers
70 to easily add advanced indexing and search facilities to applications.
71 This package provides the files needed for developing Ruby scripts
74 %package -n tcl-xapian
75 Summary: Files needed for developing TCL scripts which use Xapian
76 Group: Development/Languages/Tcl
79 %description -n tcl-xapian
80 Xapian is an Open Source Probabilistic Information Retrieval
81 framework. It offers a highly adaptable toolkit that allows developers
82 to easily add advanced indexing and search facilities to applications.
83 This package provides the files needed for developing TCL scripts
86 %package -n csharp-xapian
87 Summary: Files needed for developing C# applications which use Xapian
88 Group: Development/Languages
91 %description -n csharp-xapian
92 Xapian is an Open Source Probabilistic Information Retrieval
93 framework. It offers a highly adaptable toolkit that allows developers
94 to easily add advanced indexing and search facilities to applications.
95 This package provides the files needed for developing C# applications
103 %{?with_java:--with-java} \
104 %{?with_python:--with-python} \
105 %{?with_php:--with-php} \
106 %{?with_ruby:--with-ruby} \
107 %{?with_tcl:--with-tcl} \
108 %{?with_csharp:--with-csharp}
110 # PATH=. hack needed:
111 # /bin/sh ../libtool --config > libtoolconfig.tmp
112 # . libtoolconfig.tmp; cp $objdir/_xapian.so .
113 # /bin/sh: .: libtoolconfig.tmp: not found
114 PATH=$PATH:. %{__make}
117 rm -rf $RPM_BUILD_ROOT
119 phpincdir=%{php_data_dir} \
120 DESTDIR=$RPM_BUILD_ROOT
122 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
124 for binding in %{?with_csharp:csharp} %{?with_php:php} %{?with_python:python} %{?with_ruby:ruby} %{?with_tcl:tcl8}; do
125 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
126 cp -a $binding/docs/{index.html,examples} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
129 rm -f $RPM_BUILD_ROOT%{_libdir}/XapianSharp.la
134 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %doc AUTHORS ChangeLog HACKING NEWS README TODO
139 %{_examplesdir}/%{name}-%{version}
142 %files -n python-xapian
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{py_sitedir}/_xapian.so
145 %{py_sitedir}/xapian.py[co]
150 %defattr(644,root,root,755)
151 %attr(755,root,root) %{php_extensiondir}/xapian.so
152 %{php_data_dir}/xapian.php
156 %files -n ruby-xapian
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{ruby_sitearchdir}/_xapian.so
159 %{ruby_sitelibdir}/xapian.rb
164 %defattr(644,root,root,755)
165 %dir %{_libdir}/xapian%{version}
166 %{_libdir}/xapian%{version}/pkgIndex.tcl
167 %attr(755,root,root) %{_libdir}/xapian%{version}/xapian.so
171 %files -n csharp-xapian
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{_libdir}/XapianSharp.so
175 %{_libdir}/mono/XapianSharp
176 %dir %{_libdir}/mono/gac
177 %{_libdir}/mono/gac/XapianSharp