%{?mingw_package_header} %global _pkg_name clucene Summary: MinGW build of a C++ port of Lucene Name: mingw-%{_pkg_name} Version: 2.3.3.4 Release: 5%{?dist} License: LGPLv2+ or ASL 2.0 URL: http://www.sourceforge.net/projects/clucene Source0: http://downloads.sourceforge.net/clucene/clucene-core-%{version}.tar.gz BuildRequires: gawk cmake BuildRequires: mingw32-zlib mingw64-zlib BuildRequires: mingw32-boost mingw64-boost BuildRequires: mingw32-gcc-c++ mingw64-gcc-c++ BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw64-filesystem >= 95 BuildArch: noarch ## 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 Patch52: mingw-clucene-core-2.3.3.4-fix-threads.patch %description 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 -n mingw32-%{_pkg_name} Summary: %{summary} %description -n mingw32-%{_pkg_name} 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 -n mingw64-%{_pkg_name} Summary: %{summary} %description -n mingw64-%{_pkg_name} 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. %{?mingw_debug_package} %prep %setup -qn %{_pkg_name}-core-%{version} %patch50 -p1 -b .pkgconfig %patch51 -p1 -b .install_contribs_lib %patch52 -p1 -b .threads rm -rf src/ext/{boost,zlib} %build # Also for 64-bit MINGW32_CMAKE_ARGS=" -DLIB_DESTINATION:PATH=%{mingw32_libdir}" MINGW64_CMAKE_ARGS=" -DLIB_DESTINATION:PATH=%{mingw64_libdir} -DDISABLE_MULTITHREADING:BOOL=ON" %mingw_cmake -DBUILD_STATIC_LIBRARIES:BOOLEAN=FALSE \ -D_CL_HAVE_GCC_ATOMIC_FUNCTIONS_EXITCODE=0 \ -D_CL_HAVE_TRY_BLOCKS_EXITCODE=0 \ -D_CL_HAVE_NAMESPACES_EXITCODE=0 \ -D_CL_HAVE_NO_SNWPRINTF_BUG_EXITCODE=0 \ -DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE=1 \ -D_CL_HAVE_GCCVISIBILITYPATCH=0 \ -D_CL_HAVE_FUNCTION_SNPRINTF:INTERNAL=0 %mingw_make %{?_smp_mflags} %install %mingw_make install/fast DESTDIR=$RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT%{mingw32_libdir}/CLuceneConfig.cmake rm -rf $RPM_BUILD_ROOT%{mingw64_libdir}/CLuceneConfig.cmake mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir} mv $RPM_BUILD_ROOT%{mingw32_libdir}/libclucene-core.dll \ $RPM_BUILD_ROOT%{mingw32_libdir}/libclucene-shared.dll \ $RPM_BUILD_ROOT%{mingw32_bindir} mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir} mv $RPM_BUILD_ROOT%{mingw64_libdir}/libclucene-core.dll \ $RPM_BUILD_ROOT%{mingw64_libdir}/libclucene-shared.dll \ $RPM_BUILD_ROOT%{mingw64_bindir} %files -n mingw32-%{_pkg_name} %doc APACHE.license AUTHORS ChangeLog COPYING LGPL.license README %{mingw32_libdir}/libclucene-core.dll.a %{mingw32_bindir}/libclucene-core.dll %{mingw32_libdir}/libclucene-shared.dll.a %{mingw32_bindir}/libclucene-shared.dll %{mingw32_includedir}/CLucene/ %{mingw32_includedir}/CLucene.h %files -n mingw64-%{_pkg_name} %doc APACHE.license AUTHORS ChangeLog COPYING LGPL.license README %{mingw64_libdir}/libclucene-core.dll.a %{mingw64_bindir}/libclucene-core.dll %{mingw64_libdir}/libclucene-shared.dll.a %{mingw64_bindir}/libclucene-shared.dll %{mingw64_includedir}/CLucene/ %{mingw64_includedir}/CLucene.h %changelog * Fri Nov 16 2012 Greg Hellings <greg.hellings@gmail.com> 2.3.3.4-5 - Fixed remaining Summary values * Fri Nov 16 2012 Greg Hellings <greg.hellings@gmail.com> 2.3.3.4-4 - Added back boost dependency - Removed bundled library copies - Removed extraneous Provides lines - Eliminated length warnings on descriptions from rpmlint - Eliminated "setup not quiet" warning from rpmlint - Removed unused "Group:" directives * Wed Nov 14 2012 Greg Hellings <greg.hellings@gmail.com> 2.3.3.4-3 - Renamed packages to avoid unnecessary confusion - Removed unused BuildRequires - Removed conflicting dependency on pthreads in favor of native Win32 threading - Removed duplicate configure flags - Eliminated unsupported configure flags * Wed Aug 08 2012 Greg Hellings <greg.hellings@gmail.com> 2.3.3.4-2 - Bumped version as requested - Updated file lists from review request feedback * Fri Jul 06 2012 Greg Hellings <greg.hellings@gmail.com> 2.3.3.4-1 - Removed redundant files - Removed extra files yielding warnings - Removed clean section which is superfluous. * Fri May 25 2012 Greg Hellings <greg.hellings@gmail.com> 2.3.3.4-0 - Initial package for MinGW