File strigi.spec of Package strigi

#
# spec file for package strigi
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%bcond_with ffmpeg

Name:           strigi
Version:        0.7.8
Release:        0
Summary:        Lightweight and fast desktop search engine
License:        GPL-2.0+ and LGPL-2.1+
Group:          Productivity/Other
Url:            http://www.vandenoever.info/software/strigi/
Source0:        http://www.vandenoever.info/software/strigi/%{name}-%{version}.tar.bz2
Source100:      baselibs.conf
# PATCH-FIX-OPENSUSE add_missing_lib.diff adds missing clucene-shared as target link library
Patch1:         add_missing_lib.diff
# PATCH-FIX-UPSTREAM: bug_304439.diff fixes indexing of jpegs with 'wrong' isoSpeedRatings, pending upstream
Patch2:         bug_304439.diff
# PATCH-FIX-UPSTREAM strigi-gcc48.patch -- Add STREAMS_EXPORT to class decl., fixes build with gcc48
Patch3:         strigi-gcc48.patch
BuildRequires:  bison
BuildRequires:  c++_compiler
BuildRequires:  clucene-core-devel
BuildRequires:  cmake
BuildRequires:  dbus-1-x11
BuildRequires:  file-devel
%if 0%{?suse_version} > 1210
BuildRequires:  gamin-devel
%else
BuildRequires:  fam-devel
%endif
BuildRequires:  kde4-filesystem
BuildRequires:  libcppunit-devel
BuildRequires:  libexiv2-devel
BuildRequires:  libexpat-devel
%if %{with ffmpeg}
BuildRequires:  libffmpeg-devel
%endif
BuildRequires:  libbz2-devel
BuildRequires:  libqt4-devel
BuildRequires:  zlib-devel
%if !0%{?sles_version}
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(libxml-2.0)
%else
BuildRequires:  dbus-1-devel
BuildRequires:  libxml2-devel
%endif
Requires:       libstreamanalyzer0 = %{version}
Requires:       libstrigi0 = %{version}
Provides:       strigi-ui = 0.5.8
Obsoletes:      strigi-ui < 0.5.8
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
strigi is a very fast crawling, very small memory footprint, no
hammering of the system with pluggable backend desktop search engine.

%package devel
Summary:        Development files for the strigi desktop search engine
Group:          Development/Libraries/C and C++
Requires:       libstreamanalyzer0 = %{version}
Requires:       libstrigi0 = %{version}

%description devel
This package contains development files for the strigi desktop search engine.

%package -n libstrigi0
Summary:        Strigi desktop search engine libraries
Group:          System/Libraries
%requires_ge    libqt4

%description -n libstrigi0
This package contains the strigi desktop search engine libraries.

%package -n libstreamanalyzer0
Summary:        Strigi desktop stream analyzer library
Group:          System/Libraries
%requires_ge    libqt4

%description -n libstreamanalyzer0
This package contains the strigi desktop stream analyzer engine library.

%prep
%setup -q
%if 0%{?suse_version} > 1210
%patch1 -p0
%endif
%patch2 -p1
%patch3 -p1

%build
%cmake_kde4 -d build -- -DENABLE_REGENERATEXSD=off
%make_jobs

%install
%kde4_makeinstall -C build

%post   -n libstrigi0 -p /sbin/ldconfig

%postun -n libstrigi0 -p /sbin/ldconfig

%post   -n libstreamanalyzer0 -p /sbin/ldconfig

%postun -n libstreamanalyzer0 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog
%{_bindir}/deepfind
%{_bindir}/deepgrep
%if 0%{?suse_version} > 1210
%{_bindir}/lucene2indexer
%else
%{_bindir}/luceneindexer
%endif
%{_bindir}/rdfindexer
%{_bindir}/strigiclient
%{_bindir}/strigicmd
%{_bindir}/strigidaemon
%{_bindir}/xmlindexer
%dir %{_libdir}/strigi
%{_libdir}/strigi/strigiea_jpeg.so
%{_libdir}/strigi/strigiea_riff.so
%{_libdir}/strigi/strigiea_digest.so
%if 0%{?suse_version} > 1210
%{_libdir}/strigi/strigiindex_cluceneng.so
%else
%{_libdir}/strigi/strigiindex_clucene.so
%endif
%{_libdir}/strigi/strigila_cpp.so
%{_libdir}/strigi/strigila_deb.so
%{_libdir}/strigi/strigila_namespaceharvester.so
%{_libdir}/strigi/strigila_txt.so
%{_libdir}/strigi/strigila_xpm.so
%{_libdir}/strigi/strigita_au.so
%{_libdir}/strigi/strigita_avi.so
%{_libdir}/strigi/strigita_dds.so
%{_libdir}/strigi/strigita_gif.so
%{_libdir}/strigi/strigita_ico.so
%{_libdir}/strigi/strigita_pcx.so
%{_libdir}/strigi/strigita_rgb.so
%{_libdir}/strigi/strigita_sid.so
%{_libdir}/strigi/strigita_wav.so
%{_libdir}/strigi/strigita_xbm.so
%if %{with ffmpeg}
%{_libdir}/strigi/strigiea_ffmpeg.so
%endif
%{_datadir}/dbus-1/services/org.freedesktop.xesam.searcher.service
%{_datadir}/dbus-1/services/vandenoever.strigi.service
%{_datadir}/strigi/

%files devel
%defattr(-,root,root,-)
%{_includedir}/strigi/
%{_libdir}/libsearchclient.so
%{_libdir}/libstreamanalyzer.so
%{_libdir}/libstreams.so
%{_libdir}/libstrigihtmlgui.so
%{_libdir}/libstrigiqtdbusclient.so
%dir %{_libdir}/cmake/LibSearchClient/
%{_libdir}/cmake/LibSearchClient/LibSearchClientConfig.cmake
%dir %{_libdir}/cmake/LibStreamAnalyzer/
%{_libdir}/cmake/LibStreamAnalyzer/LibStreamAnalyzerConfig.cmake
%{_libdir}/cmake/LibStreamAnalyzer/LibStreamAnalyzerConfigVersion.cmake
%dir %{_libdir}/cmake/LibStreams/
%{_libdir}/cmake/LibStreams/LibStreamsConfig.cmake
%{_libdir}/cmake/LibStreams/LibStreamsConfigVersion.cmake
%{_libdir}/cmake/LibStreams/LibStreamsTargets-release.cmake
%{_libdir}/cmake/LibStreams/LibStreamsTargets.cmake
%{_libdir}/pkgconfig/libstreamanalyzer.pc
%{_libdir}/pkgconfig/libstreams.pc
%dir %{_libdir}/cmake/Strigi/
%{_libdir}/cmake/Strigi/StrigiConfig.cmake
%{_libdir}/cmake/Strigi/StrigiConfigVersion.cmake

%files -n libstrigi0
%defattr(-,root,root,-)
%{_libdir}/libsearchclient.so.0*
%{_libdir}/libstrigihtmlgui.so.0*
%{_libdir}/libstrigiqtdbusclient.so.0*

%files -n libstreamanalyzer0
%defattr(-,root,root,-)
%{_libdir}/libstreamanalyzer.so.0*
%{_libdir}/libstreams.so.0*

%changelog
openSUSE Build Service is sponsored by