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 >= 3:5.0.0}
22 BuildRequires: pkgconfig
23 %{?with_python:BuildRequires: python-devel}
24 BuildRequires: python-modules
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.344
27 BuildRequires: rpmbuild(macros) >= 1.484
28 %{?with_ruby:BuildRequires: ruby-devel}
29 %{?with_ruby:BuildRequires: ruby-modules}
30 %{?with_tcl:BuildRequires: tcl-devel}
31 BuildRequires: xapian-core-devel >= %{version}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Xapian is an Open Source Probabilistic Information Retrieval Library.
36 It offers a highly adaptable toolkit that allows developers to easily
37 add advanced indexing and search facilities to applications.
39 %package -n python-xapian
40 Summary: Files needed for developing Python scripts which use Xapian
41 Group: Development/Languages/Python
42 %pyrequires_eq python-modules
44 %description -n python-xapian
45 Xapian is an Open Source Probabilistic Information Retrieval
46 framework. It offers a highly adaptable toolkit that allows developers
47 to easily add advanced indexing and search facilities to applications.
48 This package provides the files needed for developing Python scripts
51 %package -n php-xapian
52 Summary: Files needed for developing PHP scripts which use Xapian
53 Group: Networking/Daemons
54 %{?requires_php_extension}
55 Requires: php-common >= 4:5.0.4
57 %description -n php-xapian
58 Xapian is an Open Source Probabilistic Information Retrieval
59 framework. It offers a highly adaptable toolkit that allows developers
60 to easily add advanced indexing and search facilities to applications.
61 This package provides the files needed for developing PHP scripts
64 %package -n ruby-xapian
65 Summary: Files needed for developing Ruby scripts which use Xapian
66 Group: Development/Languages
67 %{?ruby_mod_ver_requires_eq}
69 %description -n ruby-xapian
70 Xapian is an Open Source Probabilistic Information Retrieval
71 framework. It offers a highly adaptable toolkit that allows developers
72 to easily add advanced indexing and search facilities to applications.
73 This package provides the files needed for developing Ruby scripts
76 %package -n tcl-xapian
77 Summary: Files needed for developing TCL scripts which use Xapian
78 Group: Development/Languages/Tcl
81 %description -n tcl-xapian
82 Xapian is an Open Source Probabilistic Information Retrieval
83 framework. It offers a highly adaptable toolkit that allows developers
84 to easily add advanced indexing and search facilities to applications.
85 This package provides the files needed for developing TCL scripts
88 %package -n csharp-xapian
89 Summary: Files needed for developing C# applications which use Xapian
90 Group: Development/Languages
93 %description -n csharp-xapian
94 Xapian is an Open Source Probabilistic Information Retrieval
95 framework. It offers a highly adaptable toolkit that allows developers
96 to easily add advanced indexing and search facilities to applications.
97 This package provides the files needed for developing C# applications
105 %{?with_java:--with-java} \
106 %{?with_python:--with-python} \
107 %{?with_php:--with-php} \
108 %{?with_ruby:--with-ruby} \
109 %{?with_tcl:--with-tcl} \
110 %{?with_csharp:--with-csharp}
112 # PATH=. hack needed:
113 # /bin/sh ../libtool --config > libtoolconfig.tmp
114 # . libtoolconfig.tmp; cp $objdir/_xapian.so .
115 # /bin/sh: .: libtoolconfig.tmp: not found
116 PATH=$PATH:. %{__make}
119 rm -rf $RPM_BUILD_ROOT
121 phpincdir=%{php_data_dir} \
122 DESTDIR=$RPM_BUILD_ROOT
124 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
126 for binding in %{?with_csharp:csharp} %{?with_php:php} %{?with_python:python} %{?with_ruby:ruby} %{?with_tcl:tcl8}; do
127 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
128 cp -a $binding/docs/{index.html,examples} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
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 %{py_sitedir}/_xapian.so
145 %{py_sitedir}/xapian.py[co]
150 %defattr(644,root,root,755)
151 %{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 %{_libdir}/XapianSharp.la
174 %{_libdir}/XapianSharp.so
176 %{_libdir}/mono/XapianSharp
177 %dir %{_libdir}/mono/gac
178 %{_libdir}/mono/gac/XapianSharp