File xapian-bindings.spec of Package xapian-bindings

#
# spec file for package xapian-bindings
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define php_extension_dir %(php-config --extension-dir)
%bcond_with mono

Name:           xapian-bindings
Version:        1.2.21
Release:        0
Summary:        Bindings for xapian
License:        GPL-2.0
Group:          Development/Languages/Other
Url:            http://www.xapian.org/
Source0:        http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz
Source1:        http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz.asc
Source2:        %{name}.keyring
Patch0:         replaced-swig-zend-error-noreturn-flag.patch
BuildRequires:  java-devel
BuildRequires:  libuuid-devel
BuildRequires:  libxapian-devel = %{version}
%if %{with mono}
BuildRequires:  mono-devel
%endif
BuildRequires:  php5-devel
BuildRequires:  pkg-config
BuildRequires:  python-devel
BuildRequires:  ruby-devel
BuildRequires:  tcl-devel
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Xapian is an Open Source Probabilistic Information Retrieval Library. It
offers a highly adaptable toolkit that allows developers to easily add advanced
indexing and search facilities to applications.

%package -n python-xapian
Summary:        Files needed for developing Python scripts which use Xapian
Group:          Development/Libraries/Python
%py_requires

%description -n python-xapian
Xapian is an Open Source Probabilistic Information Retrieval framework. It
offers a highly adaptable toolkit that allows developers to easily add advanced
indexing and search facilities to applications. This package provides the
files needed for developing Python scripts which use Xapian.

%package -n php-xapian
Summary:        Files needed for developing PHP scripts which use Xapian
Group:          Productivity/Networking/Web/Servers
Requires:       php5

%description -n php-xapian
Xapian is an Open Source Probabilistic Information Retrieval framework. It
offers a highly adaptable toolkit that allows developers to easily add advanced
indexing and search facilities to applications. This package provides the
files needed for developing PHP scripts which use Xapian.

%package -n ruby-xapian
Summary:        Files needed for developing Ruby scripts which use Xapian
Group:          Development/Languages/Ruby
Requires:       ruby

%description -n ruby-xapian
Xapian is an Open Source Probabilistic Information Retrieval framework. It
offers a highly adaptable toolkit that allows developers to easily add advanced
indexing and search facilities to applications. This package provides the
files needed for developing Ruby scripts which use Xapian.

%package -n tcl8-xapian
Summary:        Files needed for developing TCL scripts which use Xapian
Group:          Development/Libraries/Tcl
Requires:       tcl

%description -n tcl8-xapian
Xapian is an Open Source Probabilistic Information Retrieval framework. It
offers a highly adaptable toolkit that allows developers to easily add advanced
indexing and search facilities to applications. This package provides the
files needed for developing TCL scripts which use Xapian.

%if %{with mono}
%package -n xapian-csharp
Summary:        Files needed for developing C# applications which use Xapian
Group:          Development/Languages/Mono
Requires:       mono-core

%description -n xapian-csharp
Xapian is an Open Source Probabilistic Information Retrieval framework. It
offers a highly adaptable toolkit that allows developers to easily add advanced
indexing and search facilities to applications. This package provides the
files needed for developing C# applications which use Xapian.
%endif

%prep
%setup -q
%patch0 -p1

%build
%configure        \
    --with-python \
    --with-php    \
    --with-ruby   \
    --with-tcl    \
%if %{without mono}
    --without-csharp \
%else
    --with-csharp \
%endif
    --docdir=%{_docdir}/%{name}
make %{?_smp_mflags}

%check
make check %{?_smp_mflags}

%install
make install DESTDIR=%{?buildroot} %{?_smp_mflags}

%files -n python-xapian
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/python/
%{py_sitedir}/xapian/

%files -n php-xapian
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/php/
%{php_extension_dir}/xapian.so
%{_datadir}/php5/xapian.php

%files -n ruby-xapian
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/ruby/
%{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/_xapian.so
%{_libdir}/ruby/site_ruby/%{rb_ver}/xapian.rb

%files -n tcl8-xapian
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/tcl8/
%{_libdir}/tcl/xapian%{version}/

%if %{with mono}
%files -n xapian-csharp
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/csharp/
%{_libdir}/_XapianSharp.so
%dir %{_libdir}/mono/
%{_libdir}/mono/XapianSharp/
%dir %{_libdir}/mono/gac/
%{_libdir}/mono/gac/XapianSharp/
%endif

%changelog
openSUSE Build Service is sponsored by