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