diff --git a/clucene-core-2.3.3.4-install_contribs_lib.patch b/clucene-core-2.3.3.4-install_contribs_lib.patch new file mode 100644 index 0000000..8fbb3c7 --- /dev/null +++ b/clucene-core-2.3.3.4-install_contribs_lib.patch @@ -0,0 +1,42 @@ +diff -NaurpBb clucene-core-2.3.3.4/CMakeLists.txt clucene-core-2.3.3.4-mod/CMakeLists.txt +--- clucene-core-2.3.3.4/CMakeLists.txt 2011-03-17 03:21:07.000000000 +0300 ++++ clucene-core-2.3.3.4-mod/CMakeLists.txt 2011-08-16 16:56:55.968268152 +0400 +@@ -163,7 +163,7 @@ IF ( BUILD_CONTRIBS ) + SET(BUILD_CONTRIBS_LIB 1) + ENDIF ( BUILD_CONTRIBS ) + IF ( BUILD_CONTRIBS_LIB ) +- ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL) ++ ADD_SUBDIRECTORY (src/contribs-lib) + ENDIF ( BUILD_CONTRIBS_LIB ) + + +diff -NaurpBb clucene-core-2.3.3.4/src/contribs-lib/CMakeLists.txt clucene-core-2.3.3.4-mod/src/contribs-lib/CMakeLists.txt +--- clucene-core-2.3.3.4/src/contribs-lib/CMakeLists.txt 2011-03-17 03:21:07.000000000 +0300 ++++ clucene-core-2.3.3.4-mod/src/contribs-lib/CMakeLists.txt 2011-08-16 17:14:13.499275499 +0400 +@@ -106,9 +106,26 @@ add_library(clucene-contribs-lib SHARED + ) + TARGET_LINK_LIBRARIES(clucene-contribs-lib ${clucene_contrib_extra_libs}) + ++#install public headers. ++FOREACH(file ${HEADERS}) ++ get_filename_component(apath ${file} PATH) ++ get_filename_component(aname ${file} NAME) ++ file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath}) ++ IF ( NOT aname MATCHES "^_.*" ) ++ install(FILES ${file} ++ DESTINATION include/${relpath} ++ COMPONENT development) ++ ENDIF ( NOT aname MATCHES "^_.*" ) ++ENDFOREACH(file) ++ + #set properties on the libraries + SET_TARGET_PROPERTIES(clucene-contribs-lib PROPERTIES + VERSION ${CLUCENE_VERSION} + SOVERSION ${CLUCENE_SOVERSION} + COMPILE_DEFINITIONS_DEBUG _DEBUG + ) ++ ++#and install library ++install(TARGETS clucene-contribs-lib ++ DESTINATION ${LIB_DESTINATION} ++ COMPONENT runtime ) diff --git a/clucene-core-2.3.3.4-pkgconfig.patch b/clucene-core-2.3.3.4-pkgconfig.patch new file mode 100644 index 0000000..aff20d7 --- /dev/null +++ b/clucene-core-2.3.3.4-pkgconfig.patch @@ -0,0 +1,12 @@ +diff -up clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake.pkgconfig_sys_includes clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake +--- clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake.pkgconfig_sys_includes 2011-03-16 19:21:07.000000000 -0500 ++++ clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake 2012-03-19 09:01:00.689263954 -0500 +@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/i + Name: libclucene + Description: CLucene - a C++ search engine, ported from the popular Apache Lucene + Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@ +-Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core +-Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext ++Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared ++Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext -I@LUCENE_SYS_INCLUDES@ + ~ diff --git a/clucene-core-2.3.3.4-pkgconfig_sys_includes.patch b/clucene-core-2.3.3.4-pkgconfig_sys_includes.patch deleted file mode 100644 index e426cb4..0000000 --- a/clucene-core-2.3.3.4-pkgconfig_sys_includes.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake.sys_includes clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake ---- clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake.sys_includes 2011-03-16 19:21:07.000000000 -0500 -+++ clucene-core-2.3.3.4/src/core/libclucene-core.pc.cmake 2011-10-23 14:43:05.325553889 -0500 -@@ -7,5 +7,5 @@ Name: libclucene - Description: CLucene - a C++ search engine, ported from the popular Apache Lucene - Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@ - Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core --Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext -+Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext -I@LUCENE_SYS_INCLUDES@ - ~ diff --git a/clucene.spec b/clucene.spec index bf964e8..9c0c56e 100644 --- a/clucene.spec +++ b/clucene.spec @@ -1,17 +1,24 @@ Summary: A C++ port of Lucene Name: clucene Version: 2.3.3.4 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ or ASL 2.0 Group: Development/System URL: http://www.sourceforge.net/projects/clucene -Source0: http://downloads.sourceforge.net/clucene/clucene-core-2.3.3.4.tar.gz +Source0: http://downloads.sourceforge.net/clucene/clucene-core-%{version}.tar.gz BuildRequires: gawk cmake zlib-devel boost-devel ## upstreamable patches # include LUCENE_SYS_INCLUDES in pkgconfig --cflags output # https://bugzilla.redhat.com/748196 -Patch50: clucene-core-2.3.3.4-pkgconfig_sys_includes.patch +# 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 the popular Apache Lucene search engine @@ -23,30 +30,44 @@ date with Lucene 2.3.2. It contains most of the same functionality as the Java v %package core Summary: Core clucene module Group: Development/System -Provides: clucene +Provides: clucene = %{version}-%{release} #Requires: %{name} = %{version}-%{release} - %description core -The core clucene module +CLucene is a C++ port of the popular Apache Lucene search engine +(http://lucene.apache.org/java). +CLucene aims to be a high-speed alternative to Java Lucene, its API is very +similar to that of the Java version. CLucene has recently been brought up to +date with Lucene 2.3.2. It contains most of the same functionality as the Java version. %package core-devel Summary: Headers for developing programs that will use %{name} Group: Development/Libraries -Requires: %{name}-core = %{version}-%{release} - +Requires: %{name}-core%{?_isa} = %{version}-%{release} +Requires: %{name}-contribs-lib%{?_isa} = %{version}-%{release} %description core-devel This package contains the libraries and header files needed for developing with clucene +%package contribs-lib +Summary: Language specific text analyzers for %{name} +Group: Development/System +Requires: %{name}-core%{?_isa} = %{version}-%{release} +%description contribs-lib +%{summary}. + + %prep %setup -n %{name}-core-%{version} -%patch50 -p1 -b .pkgconfig_sys_includes +%patch50 -p1 -b .pkgconfig +%patch51 -p1 -b .install_contribs_lib + %build mkdir -p %{_target_platform} pushd %{_target_platform} %{cmake} \ + -DBUILD_CONTRIBS_LIB=BOOL:ON \ -DLIB_DESTINATION:PATH=%{_libdir} \ -DLUCENE_SYS_INCLUDES:PATH=%{_libdir} \ .. @@ -54,11 +75,13 @@ popd make %{?_smp_mflags} -C %{_target_platform} + %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake + %check # FIXME: do not run tests for ppc and s390 (big endian 32 bit archs) until # we have a proper fix @@ -68,8 +91,8 @@ rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake #make test -C %{_target_platform} %endif -%post core -p /sbin/ldconfig +%post core -p /sbin/ldconfig %postun core -p /sbin/ldconfig %files core @@ -80,6 +103,14 @@ rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake %{_libdir}/libclucene-shared.so.1* %{_libdir}/libclucene-shared.so.%{version} +%post contribs-lib -p /sbin/ldconfig +%postun contribs-lib -p /sbin/ldconfig + +%files contribs-lib +%defattr(-, root, root, -) +%{_libdir}/libclucene-contribs-lib.so.1* +%{_libdir}/libclucene-contribs-lib.so.%{version} + %files core-devel %defattr(-, root, root, -) %dir %{_libdir}/CLucene @@ -90,7 +121,13 @@ rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake %{_libdir}/CLucene/CLuceneConfig.cmake %{_libdir}/pkgconfig/libclucene-core.pc + %changelog +* Mon Mar 19 2012 Rex Dieter 2.3.3.4-6 +- contribs-lib is not built and installed even with config (#794795, upstream ID: 3392466) +- pkgconfig file is missing clucene-shared (upstream ID: 3461512) +- non-descriptive descripton (#757319) + * Sat Feb 25 2012 Peter Robinson - 2.3.3.4-5 - Temporarily disable make check as it fails on all arches