]>
Commit | Line | Data |
---|---|---|
9af7ec76 ER |
1 | # Conditional build: |
2 | %bcond_with csharp # do not build C# bindings | |
3 | %bcond_without php # do not build PHP bindings | |
4 | %bcond_without python # do not build Python bindings | |
5 | %bcond_without ruby # do not build Ruby bindings | |
6 | %bcond_without tcl # do not build TCL bindings | |
7 | # | |
8 | Summary: Bindings for Xapian | |
9 | Name: xapian-bindings | |
10 | Version: 1.0.4 | |
11 | Release: 0.1 | |
12 | License: GPL | |
13 | Group: Development/Languages | |
14 | URL: http://www.xapian.org/ | |
15 | Source0: http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: d572e0bec4c4c26f26224e1253c4aa8f | |
17 | # jdk?? | |
18 | BuildRequires: jdk | |
19 | %{?with_csharp:BuildRequires: mono-devel} | |
20 | %{?with_php:BuildRequires: php-devel >= 3:5.0.0} | |
21 | BuildRequires: pkgconfig | |
22 | %{?with_python:BuildRequires: python-devel} | |
23 | BuildRequires: rpmbuild(macros) >= 1.344 | |
24 | %{?with_ruby:BuildRequires: ruby-devel} | |
25 | %{?with_tcl:BuildRequires: tcl-devel} | |
26 | BuildRequires: xapian-core-devel = %{version} | |
27 | Requires: xapian-core-libs = %{version} | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | Xapian is an Open Source Probabilistic Information Retrieval Library. | |
32 | It offers a highly adaptable toolkit that allows developers to easily | |
33 | add advanced indexing and search facilities to applications. | |
34 | ||
35 | %package -n python-xapian | |
36 | Summary: Files needed for developing Python scripts which use Xapian | |
37 | Group: Development/Languages/Python | |
38 | Requires: %{name} = %{version}-%{release} | |
39 | %pyrequires_eq python-modules | |
40 | ||
41 | %description -n python-xapian | |
42 | Xapian is an Open Source Probabilistic Information Retrieval | |
43 | framework. It offers a highly adaptable toolkit that allows developers | |
44 | to easily add advanced indexing and search facilities to applications. | |
45 | This package provides the files needed for developing Python scripts | |
46 | which use Xapian. | |
47 | ||
48 | %package -n php-xapian | |
49 | Summary: Files needed for developing PHP scripts which use Xapian | |
50 | Group: Networking/Daemons | |
51 | Requires: %{name} = %{version}-%{release} | |
52 | %{?requires_php_extension} | |
53 | Requires: php-common >= 4:5.0.4 | |
54 | ||
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 | |
60 | which use Xapian. | |
61 | ||
62 | %package -n ruby-xapian | |
63 | Summary: Files needed for developing Ruby scripts which use Xapian | |
64 | Group: Development/Languages | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: ruby | |
67 | ||
68 | %description -n ruby-xapian | |
69 | Xapian is an Open Source Probabilistic Information Retrieval | |
70 | framework. It offers a highly adaptable toolkit that allows developers | |
71 | to easily add advanced indexing and search facilities to applications. | |
72 | This package provides the files needed for developing Ruby scripts | |
73 | which use Xapian. | |
74 | ||
75 | %package -n tcl-xapian | |
76 | Summary: Files needed for developing TCL scripts which use Xapian | |
77 | Group: Development/Languages/Tcl | |
78 | Requires: %{name} = %{version}-%{release} | |
79 | Requires: tcl | |
80 | ||
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 | |
86 | which use Xapian. | |
87 | ||
88 | %package -n csharp-xapian | |
89 | Summary: Files needed for developing C# applications which use Xapian | |
90 | Group: Development/Languages | |
91 | Requires: %{name} = %{version}-%{release} | |
92 | Requires: mono-core | |
93 | ||
94 | %description -n csharp-xapian | |
95 | Xapian is an Open Source Probabilistic Information Retrieval | |
96 | framework. It offers a highly adaptable toolkit that allows developers | |
97 | to easily add advanced indexing and search facilities to applications. | |
98 | This package provides the files needed for developing C# applications | |
99 | which use Xapian. | |
100 | ||
101 | %prep | |
102 | %setup -q | |
103 | ||
104 | %build | |
105 | %configure \ | |
106 | --with-swig \ | |
107 | %{?with_python:--with-python} \ | |
108 | %{?with_php:--with-php} \ | |
109 | %{?with_ruby:--with-ruby} \ | |
110 | %{?with_tcl:--with-tcl} \ | |
111 | %{?with_csharp:--with-csharp} | |
112 | %{__make} | |
113 | ||
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | %{__make} install \ | |
117 | DESTDIR=$RPM_BUILD_ROOT | |
118 | ||
119 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} | |
120 | ||
121 | for binding in %{?with_csharp:csharp} %{?with_php:php} %{?with_python:python} %{?with_ruby:ruby} %{?with_tcl:tcl8}; do | |
122 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding | |
123 | cp -a $binding/docs/{index.html,examples} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding | |
124 | done | |
125 | ||
126 | %py_postclean | |
127 | ||
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %files | |
132 | %defattr(644,root,root,755) | |
133 | %doc AUTHORS ChangeLog HACKING NEWS README TODO | |
134 | %dir %{_examplesdir}/%{name}-%{version} | |
135 | ||
136 | %if %{with python} | |
137 | %files -n python-xapian | |
138 | %defattr(644,root,root,755) | |
139 | %{py_sitedir}/_xapian.so | |
140 | %{py_sitedir}/xapian.py[co] | |
141 | %{_examplesdir}/%{name}-%{version}/python | |
142 | %endif | |
143 | ||
144 | %if %{with php} | |
145 | %files -n php-xapian | |
146 | %defattr(644,root,root,755) | |
147 | %{php_extensiondir}/xapian.so | |
148 | %{php_data_dir}5/xapian.php | |
149 | %{_examplesdir}/%{name}-%{version}/php | |
150 | %endif | |
151 | ||
152 | %if %{with ruby} | |
153 | %files -n ruby-xapian | |
154 | %defattr(644,root,root,755) | |
155 | %attr(755,root,root) %{ruby_sitearchdir}/_xapian.so | |
156 | %{ruby_sitelibdir}/xapian.rb | |
157 | ||
158 | %{_examplesdir}/%{name}-%{version}/ruby | |
159 | %endif | |
160 | ||
161 | %if %{with tcl} | |
162 | %files -n tcl-xapian | |
163 | %defattr(644,root,root,755) | |
164 | %dir %{_libdir}/xapian%{version} | |
165 | %{_libdir}/xapian%{version}/pkgIndex.tcl | |
166 | %attr(755,root,root) %{_libdir}/xapian%{version}/xapian.so | |
167 | %{_examplesdir}/%{name}-%{version}/tcl8 | |
168 | %endif | |
169 | ||
170 | %if %{with csharp} | |
171 | %files -n csharp-xapian | |
172 | %defattr(644,root,root,755) | |
173 | %{_libdir}/XapianSharp.la | |
174 | %{_libdir}/XapianSharp.so | |
175 | %dir %{_libdir}/mono | |
176 | %{_libdir}/mono/XapianSharp | |
177 | %dir %{_libdir}/mono/gac | |
178 | %{_libdir}/mono/gac/XapianSharp | |
179 | %{_examplesdir}/%{name}-%{version}/csharp | |
180 | %endif |