File mingw64-xapian-core.spec of Package mingw64-xapian-core

#
# spec file for package xapian-core
#
# Copyright (c) 2017 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         _name xapian-core
Name:           mingw64-%{_name}
Version:        1.4.21
Release:        0
Summary:        The Xapian Probabilistic Information Retrieval Library
License:        GPL-2.0-only
Group:          Productivity/Databases/Servers
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
Source3:        baselibs.conf
Patch0:         xapian-core-1.4.21-std-fixes.patch
BuildRequires:  automake
BuildRequires:  mingw64-cross-gcc-c++ >= 4.6
#BuildRequires:  mingw64-libuuid-devel
BuildRequires:  xz
BuildRequires:  mingw64-zlib-devel
Requires:       mingw64-libxapian30 = %{version}
%_mingw64_package_header_debug
BuildArch: noarch

%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 mingw64-libxapian30
Summary:        Xapian search engine libraries
Group:          Development/Libraries/C and C++

%description -n mingw64-libxapian30
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
libraries for applications using Xapian functionality

%package -n mingw64-libxapian-devel
Summary:        Files needed for building packages which use Xapian
Group:          Development/Libraries/C and C++
Requires:       mingw64-cross-gcc-c++
#Requires:       libuuid-devel
Requires:       mingw64-libxapian30 = %{version}
Requires:       mingw64-zlib-devel

%description -n mingw64-libxapian-devel
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 building packages which use Xapian

%package doc
Summary:        Documentation for Xapian-core libraries
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description doc
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 building packages which use Xapian

%package examples
Summary:        Examples for Xapian-core libraries
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description examples
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 building packages which use Xapian

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{_name}-%{version}

%build
# fix undefined reference to `__memmove_chk
%global _mingw64_ldflags %{_mingw64_ldflags} -lssp

%_mingw64_configure --docdir=%{_mingw64_docdir}/%{_name} \
## %ifarch i586
##      --disable-sse \
##%endif

make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} docdatadir=%{_mingw64_docdir}/%{_name} install %{?_smp_mflags}
rm -rf examples/{.libs,.deps,.dirstamp,*.o,quest,delve,simplesearch,simpleexpand,simpleindex,copydatabase,xapian-metadata}
cp -vr examples  %{buildroot}%{_mingw64_docdir}/%{_name}/
find . -name \*.spec -delete
install -m 644 AUTHORS COPYING ChangeLog README NEWS HACKING PLATFORMS ChangeLog.examples %{buildroot}%{_mingw64_docdir}/%{_name}

%files
%defattr(-, root, root)
%dir %{_mingw64_docdir}/%{_name}
%{_mingw64_docdir}/%{_name}/AUTHORS
%{_mingw64_docdir}/%{_name}/COPYING
%{_mingw64_docdir}/%{_name}/ChangeLog
%{_mingw64_docdir}/%{_name}/README
%{_mingw64_docdir}/%{_name}/NEWS
%{_mingw64_docdir}/%{_name}/HACKING
%{_mingw64_docdir}/%{_name}/PLATFORMS
%{_mingw64_docdir}/%{_name}/ChangeLog.examples
%{_mingw64_bindir}/xapian-tcpsrv.exe
%{_mingw64_bindir}/xapian-progsrv.exe
%{_mingw64_bindir}/quest.exe
%{_mingw64_bindir}/copydatabase.exe
%{_mingw64_bindir}/simpleindex.exe
%{_mingw64_bindir}/simplesearch.exe
%{_mingw64_bindir}/simpleexpand.exe
%{_mingw64_bindir}/xapian-compact.exe
%{_mingw64_bindir}/xapian-check.exe
%{_mingw64_bindir}/xapian-delve.exe
%{_mingw64_bindir}/xapian-metadata.exe
%{_mingw64_bindir}/xapian-pos.exe
%{_mingw64_bindir}/xapian-replicate.exe
%{_mingw64_bindir}/xapian-replicate-server.exe
%{_mingw64_mandir}/man1/xapian-check.1*
%{_mingw64_mandir}/man1/xapian-delve.1*
%{_mingw64_mandir}/man1/copydatabase.1*
%{_mingw64_mandir}/man1/quest.1*
%{_mingw64_mandir}/man1/xapian-compact.1*
%{_mingw64_mandir}/man1/xapian-config.1*
%{_mingw64_mandir}/man1/xapian-progsrv.1*
%{_mingw64_mandir}/man1/xapian-tcpsrv.1*
%{_mingw64_mandir}/man1/xapian-metadata.1*
%{_mingw64_mandir}/man1/xapian-pos.1*
%{_mingw64_mandir}/man1/xapian-replicate.1*
%{_mingw64_mandir}/man1/xapian-replicate-server.1*
%{_mingw64_datadir}/xapian-core/

%files -n mingw64-libxapian30
%defattr(-, root, root)
%{_mingw64_bindir}/libxapian*.dll

%files -n mingw64-libxapian-devel
%defattr(-, root, root)
%{_mingw64_bindir}/xapian-config
%{_mingw64_includedir}/xapian
%{_mingw64_includedir}/xapian.h
%{_mingw64_libdir}/libxapian.dll.a
%{_mingw64_datadir}/aclocal/xapian.m4
%dir %{_mingw64_libdir}/cmake/
%{_mingw64_libdir}/cmake/xapian/
%{_mingw64_libdir}/pkgconfig/xapian-core.pc

%files doc
%defattr(-, root, root)
%{_mingw64_docdir}/%{_name}/*.html
%{_mingw64_docdir}/%{_name}/apidoc*

%files examples
%defattr(-, root, root)
%{_mingw64_docdir}/%{_name}/examples/

%changelog
openSUSE Build Service is sponsored by