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