[packages/clucene-core] - up to 2.3.3.4 (now the question is if we need to have clucene-core 0.9 packaged in parallel?)
arekm
arekm at pld-linux.org
Thu Aug 9 07:53:29 CEST 2012
commit ebd4cf82901e349b2587688dcf457ef3e95e1ff0
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Aug 9 07:53:25 2012 +0200
- up to 2.3.3.4 (now the question is if we need to have clucene-core 0.9 packaged in parallel?)
clucene-core-2.3.3.4-install_contribs_lib.patch | 42 ++++++++++++++++++++++
clucene-core.spec | 47 +++++++++++++++----------
2 files changed, 70 insertions(+), 19 deletions(-)
---
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.spec b/clucene-core.spec
index a45640c..f02ec3f 100644
--- a/clucene-core.spec
+++ b/clucene-core.spec
@@ -1,16 +1,15 @@
-# TODO: 0.9.x branch is quite old, build Java Lucene 2.3.2 compatable unstable branch
Summary: An indexing and searching API
Summary(pl.UTF-8): API do indeksowania i wyszukiwania
Name: clucene-core
-Version: 0.9.21b
+Version: 2.3.3.4
Release: 1
License: LGPL or Apache v2.0
Group: Libraries
-Source0: http://downloads.sourceforge.net/clucene/clucene-core-stable/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: ba1a8f764a2ca19c66ad907dddd88352
+Source0: http://downloads.sourceforge.net/clucene/%{name}-%{version}.tar.gz
+# Source0-md5: 48d647fbd8ef8889e5a7f422c1bfda94
+Patch0: %{name}-2.3.3.4-install_contribs_lib.patch
URL: http://clucene.sourceforge.net/
-BuildRequires: autoconf >= 2.57
-BuildRequires: automake
+BuildRequires: cmake
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:1.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -50,20 +49,23 @@ Statyczna biblioteka CLucene.
%prep
%setup -q
+%patch0 -p1
%build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure
+install -d build
+cd build
+%cmake \
+ -DBUILD_STATIC_LIBRARIES=ON \
+ -DBUILD_CONTRIBS=ON \
+ -DBUILD_CONTRIBS_LIB=ON \
+ ..
+
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
%clean
@@ -75,17 +77,24 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS COPYING ChangeLog NEWS README
-%attr(755,root,root) %{_libdir}/libclucene.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libclucene.so.0
+%attr(755,root,root) %{_libdir}/libclucene-contribs-lib.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libclucene-contribs-lib.so.1
+%attr(755,root,root) %{_libdir}/libclucene-core.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libclucene-core.so.1
+%attr(755,root,root) %{_libdir}/libclucene-shared.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libclucene-shared.so.1
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libclucene.so
-%{_libdir}/libclucene.la
+%attr(755,root,root) %{_libdir}/libclucene-contribs-lib.so
+%attr(755,root,root) %{_libdir}/libclucene-core.so
+%attr(755,root,root) %{_libdir}/libclucene-shared.so
%{_includedir}/CLucene.h
%{_includedir}/CLucene
-%{_libdir}/CLucene
+%{_libdir}/CLuceneConfig.cmake
+%{_pkgconfigdir}/libclucene-core.pc
%files static
%defattr(644,root,root,755)
-%{_libdir}/libclucene.a
+%{_libdir}/libclucene-core-static.a
+%{_libdir}/libclucene-shared-static.a
More information about the pld-cvs-commit
mailing list