d73fd1
d73fd1
%global git_long  e8e3d20f20da5ee3e37d347207b01890829a5475
d73fd1
%global git_short e8e3d20
d73fd1
%global snap 20130812
d73fd1
d73fd1
Summary:	A C++ port of Lucene
d73fd1
Name:		clucene
d73fd1
Version:	2.3.3.4
d73fd1
Release:	42.%{snap}.%{git_short}git%{?dist}
d73fd1
License:	LGPLv2+ or ASL 2.0
d73fd1
URL:		http://www.sourceforge.net/projects/clucene
d73fd1
%if 0%{?snap}
d73fd1
#  git archive e8e3d20f20da5ee3e37d347207b01890829a5475 --prefix=clucene-core-2.3.3.4/ | xz -9 > ../clucene-core-2.3.3.4-e8e3d20.tar.xz
d73fd1
Source0:	clucene-core-2.3.3.4-%{git_short}.tar.xz
d73fd1
d73fd1
%else
d73fd1
Source0:	http://downloads.sourceforge.net/clucene/clucene-core-%{version}.tar.gz
d73fd1
%endif
d73fd1
d73fd1
BuildRequires:	boost-devel
d73fd1
BuildRequires:	cmake
d73fd1
BuildRequires:	gawk
d73fd1
BuildRequires:	gcc-c++
d73fd1
BuildRequires:	zlib-devel
d73fd1
BuildRequires: make
d73fd1
d73fd1
## upstreamable patches
d73fd1
# include LUCENE_SYS_INCLUDES in pkgconfig --cflags output
d73fd1
# https://bugzilla.redhat.com/748196
d73fd1
# and
d73fd1
# https://sourceforge.net/tracker/?func=detail&aid=3461512&group_id=80013&atid=558446
d73fd1
# pkgconfig file is missing clucene-shared
d73fd1
Patch50: clucene-core-2.3.3.4-pkgconfig.patch
d73fd1
# https://bugzilla.redhat.com/794795
d73fd1
# https://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446
d73fd1
# contribs-lib is not built and installed even with config
d73fd1
Patch51: clucene-core-2.3.3.4-install_contribs_lib.patch  
d73fd1
# Don't install CLuceneConfig.cmake twice
d73fd1
Patch52: clucene-core-2.3.3.4-CLuceneConfig.patch
d73fd1
# Fix tests for undefined usleep
d73fd1
Patch53: clucene-core-2.3.3.4-usleep.patch
d73fd1
# Upstream at <https://sourceforge.net/p/clucene/bugs/232/> "Patches for
d73fd1
# TestIndexSearcher failures":
d73fd1
Patch54: 0001-Make-sure-to-return-value-from-non-void-function.patch
d73fd1
Patch55: 0002-Avoid-deadlock-in-TestIndexSearcher.patch
d73fd1
d73fd1
%description
d73fd1
CLucene is a C++ port of the popular Apache Lucene search engine
d73fd1
(http://lucene.apache.org/java). 
d73fd1
CLucene aims to be a high-speed alternative to Java Lucene, its API is very
d73fd1
similar to that of the Java version. CLucene has recently been brought up to
d73fd1
date with Lucene 2.3.2. It contains most of the same functionality as the Java version.
d73fd1
d73fd1
%package core
d73fd1
Summary:	Core clucene module
d73fd1
Provides:	clucene = %{version}-%{release}
d73fd1
#Requires: %{name} = %{version}-%{release}
d73fd1
%description core
d73fd1
CLucene is a C++ port of the popular Apache Lucene search engine
d73fd1
(http://lucene.apache.org/java).
d73fd1
CLucene aims to be a high-speed alternative to Java Lucene, its API is very
d73fd1
similar to that of the Java version. CLucene has recently been brought up to
d73fd1
date with Lucene 2.3.2. It contains most of the same functionality as the Java version.
d73fd1
d73fd1
%package core-devel
d73fd1
Summary:	Headers for developing programs that will use %{name}
d73fd1
Requires:	%{name}-core%{?_isa} = %{version}-%{release}
d73fd1
Requires:	%{name}-contribs-lib%{?_isa} = %{version}-%{release}
d73fd1
%description core-devel
d73fd1
This package contains the libraries and header files needed for
d73fd1
developing with clucene
d73fd1
d73fd1
%package contribs-lib
d73fd1
Summary:	Language specific text analyzers for %{name}
d73fd1
Requires:	%{name}-core%{?_isa} = %{version}-%{release}
d73fd1
%description contribs-lib
d73fd1
%{summary}.
d73fd1
d73fd1
d73fd1
%prep
d73fd1
%setup -n %{name}-core-%{version}
d73fd1
d73fd1
%patch50 -p1 -b .pkgconfig
d73fd1
%patch51 -p1 -b .install_contribs_lib
d73fd1
%patch52 -p1 -b .CLuceneConfig
d73fd1
%patch53 -p1 -b .usleep
d73fd1
%patch54 -p1 -b .return-value
d73fd1
%patch55 -p1 -b .avoid-deadlock
d73fd1
d73fd1
# nuke bundled code
d73fd1
rm -rfv src/ext/{boost/,zlib/}
d73fd1
d73fd1
d73fd1
%build
d73fd1
%{cmake} \
d73fd1
  -DBUILD_CONTRIBS_LIB:BOOL=ON \
d73fd1
  -DLIB_DESTINATION:PATH=%{_libdir} \
d73fd1
  -DLUCENE_SYS_INCLUDES:PATH=%{_libdir}
d73fd1
d73fd1
%cmake_build
d73fd1
d73fd1
d73fd1
%install
d73fd1
%cmake_install
d73fd1
d73fd1
d73fd1
%check
d73fd1
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
d73fd1
test "$(pkg-config --modversion libclucene-core)" = "%{version}"
d73fd1
# FIXME: make tests non-fatal for ppc and s390 (big endian 32 bit archs) until we have a proper fix
d73fd1
#ifnarch ppc s390
d73fd1
export CTEST_OUTPUT_ON_FAILURE=1
d73fd1
# needing the 'touch' here seems an odd workaroudn for missing dependency, race condition or cache requirement
d73fd1
touch src/test/CMakeLists.txt && \
d73fd1
make -C %{_target_platform} cl_test && \
d73fd1
time make -C %{_target_platform} test ARGS="--timeout 300 --output-on-failure" ||:
d73fd1
#endif
d73fd1
d73fd1
%ldconfig_scriptlets core
d73fd1
d73fd1
%files core
d73fd1
%doc AUTHORS ChangeLog README
d73fd1
%license APACHE.license COPYING LGPL.license
d73fd1
%{_libdir}/libclucene-core.so.1*
d73fd1
%{_libdir}/libclucene-core.so.%{version}
d73fd1
%{_libdir}/libclucene-shared.so.1*
d73fd1
%{_libdir}/libclucene-shared.so.%{version}
d73fd1
d73fd1
%ldconfig_scriptlets contribs-lib
d73fd1
d73fd1
%files contribs-lib
d73fd1
%{_libdir}/libclucene-contribs-lib.so.1*
d73fd1
%{_libdir}/libclucene-contribs-lib.so.%{version}
d73fd1
d73fd1
%files core-devel
d73fd1
%dir %{_libdir}/CLucene
d73fd1
%{_includedir}/CLucene/
d73fd1
%{_includedir}/CLucene.h
d73fd1
%{_libdir}/libclucene*.so
d73fd1
%{_libdir}/CLucene/clucene-config.h
d73fd1
%{_libdir}/CLucene/CLuceneConfig.cmake
d73fd1
%{_libdir}/pkgconfig/libclucene-core.pc
d73fd1
d73fd1
d73fd1
%changelog
d73fd1
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.3.3.4-42.20130812.e8e3d20git
d73fd1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
d73fd1
  Related: rhbz#1991688
d73fd1
d73fd1
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.3.3.4-41.20130812.e8e3d20git
d73fd1
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
d73fd1
d73fd1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-40.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d73fd1
d73fd1
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-39.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d73fd1
d73fd1
* Tue Jul 21 2020 Rex Dieter <rdieter@fedoraproject.org> - 2.3.3.4-38.20130812.e8e3d20.git
d73fd1
- pull in some upstream fixes (PR, previous commit)
d73fd1
- use latest %%cmake macros
d73fd1
- s/define/global/
d73fd1
d73fd1
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 2.3.3.4-37.20130812.e8e3d20git
d73fd1
- Use make macros
d73fd1
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
d73fd1
d73fd1
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-36.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d73fd1
d73fd1
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-35.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d73fd1
d73fd1
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-34.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d73fd1
d73fd1
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-33.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d73fd1
d73fd1
* Tue Feb 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.3.3.4-3220130812.e8e3d20git
d73fd1
- BR: gcc-c++, .spec cleanup
d73fd1
d73fd1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-31.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d73fd1
d73fd1
* Sun Feb 04 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.3.3.4-30.20130812.e8e3d20git
d73fd1
- Switch to %%ldconfig_scriptlets
d73fd1
d73fd1
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-29.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
d73fd1
d73fd1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-28.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d73fd1
d73fd1
* Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 2.3.3.4-27.20130812.e8e3d20git
d73fd1
- Rebuilt for Boost 1.64
d73fd1
d73fd1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-26.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d73fd1
d73fd1
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 2.3.3.4-25.20130812.e8e3d20git
d73fd1
- Rebuilt for Boost 1.63
d73fd1
d73fd1
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-24.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d73fd1
d73fd1
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 2.3.3.4-23.20130812.e8e3d20git
d73fd1
- Rebuilt for Boost 1.60
d73fd1
d73fd1
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 2.3.3.4-22.20130812.e8e3d20git
d73fd1
- Rebuilt for Boost 1.59
d73fd1
d73fd1
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-21.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
d73fd1
d73fd1
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 2.3.3.4-20.20130812.e8e3d20git
d73fd1
- rebuild for Boost 1.58
d73fd1
d73fd1
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-19.20130812.e8e3d20git
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d73fd1
d73fd1
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.3.3.4-18.20130812.e8e3d20git
d73fd1
- Rebuilt for GCC 5 C++11 ABI change
d73fd1
d73fd1
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 2.3.3.4-17.20130812.e8e3d20git
d73fd1
- Rebuild for boost 1.57.0
d73fd1
d73fd1
* Thu Oct 09 2014 Rex Dieter <rdieter@fedoraproject.org> 2.3.3.4-16.20130812.e8e3d20git
d73fd1
- %%check: more love
d73fd1
d73fd1
* Thu Oct 09 2014 Rex Dieter <rdieter@fedoraproject.org> 2.3.3.4-15.20130812.e8e3d20git
d73fd1
- fix minor cmake macro syntax error
d73fd1
d73fd1
* Tue Oct 07 2014 Rex Dieter <rdieter@fedoraproject.org> - 2.3.3.4-14.20130812.e8e3d20git
d73fd1
- 20130812 git snapshot
d73fd1
- fix tests
d73fd1
- %%prep: explicitly delete bundled boost,zlib
d73fd1
d73fd1
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-13
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
d73fd1
d73fd1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-12
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d73fd1
d73fd1
* Thu May 22 2014 Petr Machata <pmachata@redhat.com> - 2.3.3.4-11
d73fd1
- Rebuild for boost 1.55.0
d73fd1
d73fd1
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-10
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d73fd1
d73fd1
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 2.3.3.4-9
d73fd1
- Rebuild for boost 1.54.0
d73fd1
d73fd1
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-8
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d73fd1
d73fd1
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-7
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d73fd1
d73fd1
* Mon Mar 19 2012 Rex Dieter <rdieter@fedoraproject.org> 2.3.3.4-6
d73fd1
- contribs-lib is not built and installed even with config (#794795, upstream ID: 3392466)
d73fd1
- pkgconfig file is missing clucene-shared (upstream ID: 3461512)
d73fd1
- non-descriptive descripton (#757319)
d73fd1
d73fd1
* Sat Feb 25 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 2.3.3.4-5
d73fd1
- Temporarily disable make check as it fails on all arches
d73fd1
d73fd1
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3.4-4
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d73fd1
d73fd1
* Sun Oct 23 2011 Rex Dieter <rdieter@fedoraproject.org> 2.3.3.4-3
d73fd1
- include LUCENE_SYS_INCLUDES in pkgconfig --cflags output (#748196)
d73fd1
d73fd1
* Wed Jun 08 2011 Rex Dieter <rdieter@fedoraproject.org> 2.3.3.4-2
d73fd1
- cleanup cmake usage
d73fd1
- fix scriptlets
d73fd1
- track sonames
d73fd1
d73fd1
* Thu Jun 02 2011 Deji Akingunola <dakingun@gmail.com> - 2.3.3.4-1
d73fd1
- Update to version 2.3.3.4
d73fd1
d73fd1
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.21b-3
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d73fd1
d73fd1
* Thu Jul 08 2010 Deji Akingunola <dakingun@gmail.com> 0.9.21b-2
d73fd1
- Include the license text in the -core subpackage.
d73fd1
d73fd1
* Sun Jun 06 2010 Robert Scheck <robert@fedoraproject.org> 0.9.21b-1
d73fd1
- Update to 0.9.21b
d73fd1
d73fd1
* Wed Nov 04 2009 Dennis Gilmore <dennis@ausil.us> - 0.9.21-5
d73fd1
- disable 'make check on sparc64 along with ppc64 and s390x
d73fd1
d73fd1
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.21-4
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d73fd1
d73fd1
* Tue Apr 14 2009 Karsten Hopp <karsten@redhat.com> 0.9.21-3
d73fd1
- bypass 'make check' on s390x, similar to ppc64
d73fd1
d73fd1
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.21-2
d73fd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d73fd1
d73fd1
* Wed Aug 27 2008 Deji Akingunola <dakingun@gmail.com> - 0.9.21-1
d73fd1
- Update to version 0.9.21
d73fd1
d73fd1
* Sun Feb 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.9.20-4
d73fd1
- Rebuild for gcc43
d73fd1
d73fd1
* Wed Oct 25 2007 Deji Akingunola <dakingun@gmail.com> - 0.9.20-3
d73fd1
- Fix a typo in the License field
d73fd1
d73fd1
* Wed Oct 25 2007 Deji Akingunola <dakingun@gmail.com> - 0.9.20-2
d73fd1
- Fix multiarch conflicts (BZ #340891)
d73fd1
- Bypass 'make check' for ppc64, its failing two tests there
d73fd1
d73fd1
* Tue Aug 21 2007 Deji Akingunola <dakingun@gmail.com> - 0.9.20-1
d73fd1
- Update to version 0.9.20
d73fd1
d73fd1
* Sat Aug 11 2007 Deji Akingunola <dakingun@gmail.com> - 0.9.19-1
d73fd1
- Latest release update
d73fd1
d73fd1
* Fri Aug 03 2007 Deji Akingunola <dakingun@gmail.com> - 0.9.16a-2
d73fd1
- License tag update
d73fd1
d73fd1
* Thu Feb 22 2007 Deji Akingunola <dakingun@gmail.com> - 0.9.16a-2
d73fd1
- Add -contrib subpackage 
d73fd1
d73fd1
* Thu Dec 07 2006 Deji Akingunola <dakingun@gmail.com> - 0.9.16a-1
d73fd1
- Update to latest stable release 
d73fd1
- Run make check during build
d73fd1
d73fd1
* Mon Nov 20 2006 Deji Akingunola <dakingun@gmail.com> - 0.9.15-3
d73fd1
- Don't package APACHE.license since we've LGPL instead 
d73fd1
- Package documentation in devel subpackage
d73fd1
d73fd1
* Mon Nov 13 2006 Deji Akingunola <dakingun@gmail.com> - 0.9.15-2
d73fd1
- Fix a bunch of issues with the spec (#215258)
d73fd1
- Moved the header file away from lib dir
d73fd1
d73fd1
* Sat Nov 04 2006 Deji Akingunola <dakingun@gmail.com> - 0.9.15-1
d73fd1
- Initial packaging for Fedora Extras