Name:		strigi
Summary:	A desktop search program
Summary(ja):	デスクトップ検索プログラム
Version:	0.7.8
Release:	3%{?_dist_release}

Group:		Applications/Productivity
License:	LGPLv2+
#URL:		http://strigi.sourceforge.net/
URL:            http://www.vandenoever.info/software/strigi/

Source0:	http://www.vandenoever.info/software/strigi/strigi-%{version}.tar.bz2
Source1:	strigiclient.desktop
Source2:	strigi-daemon.desktop

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:	bison
BuildRequires:	bzip2-devel
BuildRequires:	cmake >= 2.6.0
#BuildRequires:	clucene-core-devel
BuildRequires:	cppunit-devel
BuildRequires:	dbus-devel dbus-x11
BuildRequires:	desktop-file-utils
BuildRequires:	exiv2-devel
BuildRequires:	gamin-devel
BuildRequires:	libxml2-devel
BuildRequires:	qt4-devel
BuildRequires:	zlib-devel

%description
Strigi is a fast and light desktop search engine. It can handle a large range
of file formats such as emails, office documents, media files, and file
archives. It can index files that are embedded in other files. This means email
attachments and files in zip files are searchable as if they were normal files
on your harddisk.

Strigi is normally run as a background daemon that can be accessed by many
other programs at once. In addition to the daemon, Strigi comes with powerful
replacements for the popular unix commands 'find' and 'grep'. These are called
'deepfind' and 'deepgrep' and can search inside files just like the strigi
daemon can.

%package	libs
Summary:	Strigi libraries
Summary(ja):	Strigi 検索エンジンライブラリ
Group:		System Environment/Libraries

%description	libs
Strigi search engine libraries

%package	devel
Summary:	Development files for the strigi desktop search engine
Summary(ja):	Strigi デスクトップ検索エンジンの開発用ファイル
Group:		Development/Libraries
Requires:	%{name}-libs = %{version}-%{release}

%description	devel
Development files for the strigi desktop search engine


%prep
%setup -q

%build
mkdir build
cd build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export FFLAGS="%{optflags}"
%ifarch x86_64 ppc64
%define lib_suffix 64
%else
%define lib_suffix %{nil}
%endif
cmake \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DLIB_DESTINATION=%{_libdir} \
    -DLIB_SUFFIX=%{lib_suffix} \
    -DENABLE_CLUCENE:BOOL=OFF \
    -DENABLE_CLUCENE_NG:BOOL=OFF \
    -DENABLE_DBUS:BOOL=ON \
    -DENABLE_FAM:BOOL=ON \
    -DENABLE_FFMPEG:BOOL=OFF \
    -DENABLE_INOTIFY:BOOL=ON \
    %{?_cmake_skip_rpath} \
    ..
make VERBOSE=1 %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
cd build
make DESTDIR=$RPM_BUILD_ROOT install

desktop-file-install \
	--vendor="" \
	--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
	%{SOURCE1}

# Add an autostart desktop file for the strigi daemon
install -p -m644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/strigi-daemon.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog
%{_sysconfdir}/xdg/autostart/strigi-daemon.desktop
%{_bindir}/*
%{_datadir}/applications/strigiclient.desktop
%{_datadir}/dbus-1/services/*
%{_datadir}/strigi

%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_libdir}/strigi

%files devel
%defattr(-,root,root,-)
%{_includedir}/strigi
%{_libdir}/*.so
%{_libdir}/pkgconfig/libstream*.pc
%{_libdir}/cmake/LibSearchClient
%{_libdir}/cmake/LibStreamAnalyzer
%{_libdir}/cmake/LibStreams
%{_libdir}/cmake/Strigi/

%changelog
* Fri Nov 06 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.8-3
- rebuild with exiv2-0.25

* Wed Dec 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.8-2
- rebuild with exiv2-0.24

* Wed Jun 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.8-1
- new upstream release
- remove Patch50 (strigi-0.7.5-static_convenience_libs.patch)

* Sun Jul 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.5-3
- rebuild with exiv2-0.23

* Mon May 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.5-2
- rebuild with exiv2-0.22

* Sun Sep 25 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.5-1
- updated to 0.7.5
- dropt clucene support

* Sun Jul 31 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.2-5
- rebuilt with exiv2-0.21.1

* Thu Sep 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.2-4
- rebuilt with rpm-4.8.1
- added Japanese summaries

* Wed May  5 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.2-3
- rebuilt with exiv2-0.19

* Sun Apr 11 2010 NAKAMURA Kenta <kenta@vinelinux.org> 0.7.2-2
- rebuilt to support strigiclient (x86_64)

* Fri Feb 12 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.2-1
- new upstream release
- built with new toolchain

* Sat Aug 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.0-1
- new upstream release

* Mon Apr 13 2009 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.4-2
- rebuild with exiv2-0.18.1-1

* Tue Feb 17 2009 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.4-1
- new upstream release
- update Patch0 and delete Patch1

* Wed Jan 21 2009 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.11-2
- add Patch0 and Patch1

* Sun Dec  7 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.11-1
- new upstream release

* Tue Aug  5 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.10-1
- new upstream release

* Sun May  4 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.9-1
- new upstream release

* Wed Nov 21 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.7-0vl1
- new upstream release

* Thu Sep  6 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.5-0vl1
- new upstream release

* Thu Aug 16 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.4-0vl1
- new upstream release

* Thu Jun 28 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.1-5vl2
- rebuild with qt4-4.3.0-0vl1

* Sun May 20 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.5.1-5vl1
- initial release for VineSeed

* Wed May 16 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.1-5
- Split out a strigi-libs subpackage as suggested in BZ#223586
_ Include a strigidaemon autostart desktop file

* Sat May 05 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.1-4
- Add dbus-devel BR.

* Sat May 05 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.1-3
- Misc. fixes from package review

* Fri May 04 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.1-2
- Updates from reviews:
-	Have the -devel subpackage require pkgconfig
-	Add a versioned dependency on cmake and remove dbus-qt buildrequire

* Fri May 04 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.1-1
- New release

* Wed May 02 2007 Deji Akingunola <dakingun@gmail.com> - 0.3.11-3
- Allow building on FC6

* Thu Feb 22 2007 Deji Akingunola <dakingun@gmail.com> - 0.3.11-2
- Assorted fixed arising from reviews

* Wed Jan 17 2007 Deji Akingunola <dakingun@gmail.com> - 0.3.11-1
- Initial packaging for Fedora Extras
