File clucene-core.spec of Package clucene-core
#
# spec file for package clucene-core
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#
Name: clucene-core
Version: 2.3.3.4
Release: 0
Summary: CLucene is a C++ port of Lucene
License: LGPL-2.1 or Apache-2.0
Group: Development/Libraries/C and C++
Url: http://clucene.sourceforge.net/
Source: %{name}-%{version}.tar.bz2
Source2: baselibs.conf
# PATCH-FIX-UPSTREAM [rh#748196]
Patch0: clucene-2.3.3.4-pkgconfig.patch
# PATCH-FIX-UPSTREAM [rh#794795]
Patch1: clucene-2.3.3.4-contrib-libs.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
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++.
%package -n libclucene2
Summary: Development files for clucene library
Group: Development/Libraries/C and C++
Provides: %{name} = %{version}
#TODO: Change back to '<' after next version update:
Obsoletes: %{name} <= %{version}
%description -n libclucene2
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++.
%package -n libclucene-contribs-lib1
Summary: Language specific text analyzers for %{name}
Group: Development/Libraries/C and C++
%description -n libclucene-contribs-lib1
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++.
This package contains language specific text analyzers for clucene.
%package devel
Summary: Development files for clucene library
Group: Development/Libraries/C and C++
Requires: libclucene-contribs-lib1 = %{version}
Requires: libclucene2 = %{version}
Requires: libstdc++-devel
%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++.
This package holds the development files for clucene.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# the tar ball is stripped like this:
rm -rf test/data/reuters* tests/data/utf* # test/data is not allowed to be distributed bnc#253602
%build
cmake . \
-DCMAKE_CXX_FLAGS="%{optflags}" \
-DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DLUCENE_SYS_INCLUDES=%{_libdir} \
-DBUILD_CONTRIBS_LIB=ON \
%if "%_lib" == "lib64"
-DLIB_SUFFIX=64 \
%endif
-DCMAKE_BUILD_TYPE=RelWithDebInfo
make %{?_smp_mflags} VERBOSE=1
%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake
%post -n libclucene2 -p /sbin/ldconfig
%postun -n libclucene2 -p /sbin/ldconfig
%files -n libclucene2
%defattr(-,root,root,-)
%doc APACHE.license AUTHORS ChangeLog COPYING doc/ LGPL.license NEWS README README.PACKAGE REQUESTS
%{_libdir}/libclucene-core.so.*
%{_libdir}/libclucene-shared.so.*
%post -n libclucene-contribs-lib1 -p /sbin/ldconfig
%postun -n libclucene-contribs-lib1 -p /sbin/ldconfig
%files -n libclucene-contribs-lib1
%defattr(-, root, root, -)
%{_libdir}/libclucene-contribs-lib.so.1*
%{_libdir}/libclucene-contribs-lib.so.%{version}
%files devel
%defattr(-,root,root,-)
%{_libdir}/libclucene*.so
%{_includedir}/CLucene*
%dir %{_libdir}/CLucene/
%{_libdir}/CLucene/clucene-config.h
%{_libdir}/CLucene/CLuceneConfig.cmake
%{_libdir}/pkgconfig/libclucene-core.pc
%changelog