]> git.pld-linux.org Git - packages/xapian-bindings.git/blob - xapian-bindings.spec
- release 2
[packages/xapian-bindings.git] / xapian-bindings.spec
1 #
2 # Conditional build:
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
9
10 Summary:        Bindings for Xapian
11 Name:           xapian-bindings
12 Version:        1.0.16
13 Release:        2
14 License:        GPL v2+
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)
32
33 %description
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.
37
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
42
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
48 which use Xapian.
49
50 %package -n php-xapian
51 Summary:        Files needed for developing PHP scripts which use Xapian
52 Group:          Networking/Daemons
53 %{?requires_php_extension}
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 %{?ruby_mod_ver_requires_eq}
66
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
72 which use Xapian.
73
74 %package -n tcl-xapian
75 Summary:        Files needed for developing TCL scripts which use Xapian
76 Group:          Development/Languages/Tcl
77 Requires:       tcl
78
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
84 which use Xapian.
85
86 %package -n csharp-xapian
87 Summary:        Files needed for developing C# applications which use Xapian
88 Group:          Development/Languages
89 Requires:       mono-core
90
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
96 which use Xapian.
97
98 %prep
99 %setup -q
100
101 %build
102 %configure \
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}
109
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}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 %{__make} install \
119         phpincdir=%{php_data_dir} \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
123
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
127 done
128
129 rm -f $RPM_BUILD_ROOT%{_libdir}/XapianSharp.la
130
131 %py_postclean
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %files
137 %defattr(644,root,root,755)
138 %doc AUTHORS ChangeLog HACKING NEWS README TODO
139 %{_examplesdir}/%{name}-%{version}
140
141 %if %{with python}
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]
146 %endif
147
148 %if %{with php}
149 %files -n php-xapian
150 %defattr(644,root,root,755)
151 %attr(755,root,root) %{php_extensiondir}/xapian.so
152 %{php_data_dir}/xapian.php
153 %endif
154
155 %if %{with ruby}
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
160 %endif
161
162 %if %{with tcl}
163 %files -n tcl-xapian
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
168 %endif
169
170 %if %{with csharp}
171 %files -n csharp-xapian
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{_libdir}/XapianSharp.so
174 %dir %{_libdir}/mono
175 %{_libdir}/mono/XapianSharp
176 %dir %{_libdir}/mono/gac
177 %{_libdir}/mono/gac/XapianSharp
178 %endif
This page took 0.079854 seconds and 4 git commands to generate.