]> git.pld-linux.org Git - packages/xapian-bindings.git/blob - xapian-bindings.spec
- BR: python-modules, rpm-pythonprov
[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:        0.3
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 >= 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)
33
34 %description
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.
38
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
43
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
49 which use Xapian.
50
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
56
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
62 which use Xapian.
63
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}
68
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
74 which use Xapian.
75
76 %package -n tcl-xapian
77 Summary:        Files needed for developing TCL scripts which use Xapian
78 Group:          Development/Languages/Tcl
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:       mono-core
92
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
98 which use Xapian.
99
100 %prep
101 %setup -q
102
103 %build
104 %configure \
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}
111
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}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 %{__make} install \
121         phpincdir=%{php_data_dir} \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
125
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
129 done
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 %{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 %{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 %{_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 %endif
This page took 0.103892 seconds and 4 git commands to generate.