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