File mingw64-clucene.spec of Package mingw64-clucene

#
# spec file for package mingw64-clucene
#
# Copyright (c) 2018 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 _basename clucene
Name:           mingw64-%{_basename}
Version:        2.3.3.4
Release:        0
#!BuildIgnore: post-build-checks
Summary:        CLucene is a C++ port of Lucene
License:        GPL-2.0-only
Group:          Development/Libraries/C and C++
Url:            http://clucene.sf.net
Source0:        %{_basename}-core-%{version}.tar.gz
Patch0:         clucene-git1-win64.patch
Patch1:         clucene-2.3.3.4-pkgconfig.patch
Patch2:         clucene-2.3.3.4-contrib-libs.patch
Patch3:         clucene-dont-use-pthreads-on-win32.patch
Patch4:         clucene-remove-beginthread-declaration.patch
Patch5:         clucene-2.3.3.4-fix-threads.patch
Patch6:         clucene-2.3.3.4-gcc8.patch
Patch7:         gcc-macro-ensure-version.patch
Patch8:         clucene-core-2.3.3.4-fix-mingw-compile.patch
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-zlib-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Lucene is a C++ port of Lucene. It is a high-performance, full-featured text search engine written in C++. CLucene is faster than lucene as it is written in C++.

%package devel
Summary:        CLucene is a C++ port of Lucene
Group:          Development/Libraries/C and C++

%description devel
CLucene is a C++ port of Lucene. It is a high-performance, full-featured text search engine written in C++. CLucene is faster than lucene as it is written in C++.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{_basename}-core-%{version}

%build
rm -rf CMakeCache.txt
%{_mingw64_cmake} \
	-DLIB_DESTINATION:PATH=%{mingw64_libdir} \
	-DBUILD_STATIC_LIBRARIES:BOOLEAN=FALSE \
	-DBUILD_CONTRIBS_LIB=ON \
    -D_CL_HAVE_GCC_ATOMIC_FUNCTIONS_EXITCODE=0 \
    -D_CL_HAVE_GCC_ATOMIC_FUNCTIONS_EXITCODE__TRYRUN_OUTPUT= \
    -D_CL_HAVE_TRY_BLOCKS_EXITCODE=0 \
    -D_CL_HAVE_TRY_BLOCKS_EXITCODE__TRYRUN_OUTPUT= \
    -D_CL_HAVE_NAMESPACES_EXITCODE=0 \
    -D_CL_HAVE_NAMESPACES_EXITCODE__TRYRUN_OUTPUT= \
    -D_CL_HAVE_NO_SNWPRINTF_BUG_EXITCODE=0 \
    -D_CL_HAVE_NO_SNWPRINTF_BUG_EXITCODE__TRYRUN_OUTPUT= \
    -DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE=1 \
    -DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT= \
	-D_CL_HAVE_GCCVISIBILITYPATCH=0 \
	-D_CL_HAVE_FUNCTION_SNPRINTF:INTERNAL=0

%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}

mkdir -p %{buildroot}%{_mingw64_bindir}
mv %{buildroot}%{_mingw64_libdir}/*.dll %{buildroot}%{_mingw64_bindir}/

%files
%defattr(-,root,root,-)
%{_mingw64_bindir}/libclucene-core.dll
%{_mingw64_bindir}/libclucene-shared.dll
%{_mingw64_bindir}/libclucene-contribs-lib.dll

%files devel
%defattr(-,root,root,-)
%{_mingw64_includedir}/CLucene.h
%{_mingw64_includedir}/CLucene/
%{_mingw64_libdir}/CLuceneConfig.cmake/
%{_mingw64_libdir}/CLuceneConfig.cmake/CLuceneConfig.cmake
%{_mingw64_libdir}/libclucene-shared.dll.a
%{_mingw64_libdir}/libclucene-core.dll.a
%{_mingw64_libdir}/libclucene-contribs-lib.dll.a
%{_mingw64_libdir}/pkgconfig/libclucene-core.pc

%changelog
openSUSE Build Service is sponsored by