File perl-Search-Xapian.spec of Package perl-Search-Xapian
#
# spec file for package perl-Search-Xapian
#
# 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 xapian_version 1.2.21
Name: perl-Search-Xapian
Version: %{xapian_version}.0
Release: 0
Summary: Perl bindings for Xapian
License: GPL-2.0+
Group: Productivity/Databases/Servers
Url: http://www.xapian.org/
Source: http://search.cpan.org/CPAN/authors/id/O/OL/OLLY/Search-Xapian-%{version}.tar.gz
Patch0: perl-Search-Xapian-1.0.4_thread_testsuite.patch
BuildRequires: libxapian-devel = %{xapian_version}
%if 0%{?suse_version} >= 1310
BuildRequires: perl-macros
%endif
# Needs for tests only for openSUSE not SLE
%if 0%{?is_opensuse}
BuildRequires: perl-Devel-Leak
BuildRequires: perl-Test-Pod
BuildRequires: perl-Test-Pod-Coverage
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
%if 0%{?suse_version} >= 1310
# sle11 doesn't know
%{perl_requires}
%endif
%description
This is Search::Xapian, a Perl XS frontend to the Xapian C++ search
library.
%prep
%setup -q -n Search-Xapian-%{version}
%patch0
%build
perl Makefile.PL --verbose
make %{?_smp_mflags} VERBOSE=1
%install
%perl_make_install
%perl_process_packlist
%if 0%{?is_opensuse}
%check
make %{?_smp_mflags} test
%endif
%files
%defattr(-,root,root)
%{perl_vendorarch}/Search/Xapian.pm
%dir %{perl_vendorarch}/Search
%{perl_vendorarch}/Search/Xapian/
%dir %{perl_vendorarch}/auto/Search
%{perl_vendorarch}/auto/Search/Xapian/
%{_mandir}/man3/Search::Xapian.3pm*
%{_mandir}/man3/Search::Xapian::*.3pm*
%if %{?suse_version} <= 1130
%{_localstatedir}/adm/perl-modules/perl-Search-Xapian
%endif
%changelog