%define develname %mklibname clucene -d # Do not push for the moment Summary: C++ port of Lucene Name: clucene Version: 2.3.3.4 Release: %mkrel 15 License: LGPL Group: Archiving/Other URL: https://clucene.sourceforge.net/ BuildRequires: cmake BuildRequires: pkgconfig(zlib) BuildRequires: boost-devel Source0: https://prdownloads.sourceforge.net/clucene/%{name}-core-%{version}.tar.gz Patch0: clucene-core-2.3.3.4-use-system-libs.patch Patch1: clucene-core-2.3.3.4-mga-timeh.patch ## upstreamable patches # include LUCENE_SYS_INCLUDES in pkgconfig --cflags output # https://bugzilla.redhat.com/748196 # and # https://sourceforge.net/tracker/?func=detail&aid=3461512&group_id=80013&atid=558446 # pkgconfig file is missing clucene-shared Patch50: clucene-core-2.3.3.4-pkgconfig.patch # https://bugzilla.redhat.com/794795 # https://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446 # contribs-lib is not built and installed even with config Patch51: clucene-core-2.3.3.4-install_contribs_lib.patch %description CLucene is a C++ port of Lucene: the high-performance, full-featured text search engine written in Java. CLucene is faster than lucene as it is written in C++. #------------------------------------------------------------------------------ %define clucene_core_major 1 %define libclucene_core %mklibname clucene-core %{clucene_core_major} %package -n %libclucene_core Summary: Shared libraries for %{name} Group: System/Libraries Obsoletes: %{_lib}clucene-core2 < 2.3.3.4-10 %description -n %libclucene_core CLucene is a C++ port of Lucene: the high-performance, full-featured text search engine written in Java. CLucene is faster than lucene as it is written in C++. This package contains shared libraries for clucene. %files -n %libclucene_core %_libdir/libclucene-core.so.%{clucene_core_major} %_libdir/libclucene-core.so.%{version} #------------------------------------------------------------------------------ %define clucene_shared_major 1 %define libclucene_shared %mklibname clucene-shared %{clucene_shared_major} %package -n %libclucene_shared Summary: Shared libraries for %{name} Group: System/Libraries Obsoletes: %{_lib}clucene_shared2 < 2.3.3.4-10 %description -n %libclucene_shared CLucene is a C++ port of Lucene: the high-performance, full-featured text search engine written in Java. CLucene is faster than lucene as it is written in C++. This package contains shared libraries for clucene. %files -n %libclucene_shared %_libdir/libclucene-shared.so.%{clucene_shared_major} %_libdir/libclucene-shared.so.%{version} #------------------------------------------------------------------------------ %define clucene_contribs_lib_major 1 %define libclucene_contribs_lib %mklibname clucene-contribs-lib %{clucene_contribs_lib_major} %package -n %libclucene_contribs_lib Summary: Shared libraries for %{name} Group: System/Libraries Obsoletes: %{_lib}clucene-contribs-lib2 < 2.3.3.4-10 %description -n %libclucene_contribs_lib CLucene is a C++ port of Lucene: the high-performance, full-featured text search engine written in Java. CLucene is faster than lucene as it is written in C++. This package contains shared libraries for clucene. %files -n %libclucene_contribs_lib %_libdir/libclucene-contribs-lib.so.%{clucene_contribs_lib_major} %_libdir/libclucene-contribs-lib.so.%{version} #------------------------------------------------------------------------------ %package -n %{develname} Summary: Static library and header files for the %{name} library Group: Development/C++ Provides: %{name}-devel = %version-%release Provides: lib%{name}-devel = %version-%release Requires: %libclucene_shared = %version-%release Requires: %libclucene_core = %version-%release Requires: %libclucene_contribs_lib = %version-%release %description -n %{develname} CLucene is a C++ port of Lucene: the high-performance, full-featured text search engine written in Java. CLucene is faster than lucene as it is written in C++. This package contains static libraries and development headers for clucene. %files -n %{develname} %{_includedir}/CLucene.h %{_includedir}/CLucene %_libdir/pkgconfig/libclucene-core.pc %_libdir/CLuceneConfig.cmake/CLuceneConfig.cmake %_libdir/libclucene-shared.so %_libdir/libclucene-core.so %_libdir/libclucene-contribs-lib.so %_libdir/CLucene #------------------------------------------------------------------------------ %prep %autosetup -n %name-core-%version -p1 # build with system libs rm -rf src/ext %build %cmake -DBUILD_CONTRIBS_LIB=BOOL:ON \ -DLUCENE_SYS_INCLUDES:PATH=%{_libdir} \ -DLIB_DESTINATION:PATH=%{_libdir} %cmake_build %install %cmake_install