Blob Blame History Raw
%define _default_patch_fuzz 2

Name:		strigi
Version:	0.5.11
Release:	1%{?dist}
Summary:	A desktop search program for KDE
Group:		Applications/Productivity
License:	LGPLv2+
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
Patch0:		strigi-multilib-fix.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	cmake >= 2.4.5
BuildRequires:	clucene-core-devel qt4-devel dbus-devel
BuildRequires:	libxml2-devel expat-devel bzip2-devel zlib-devel
BuildRequires:	cppunit-devel exiv2-devel
BuildRequires:  bison
BuildRequires:	desktop-file-utils

%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	devel
Summary:	Development files for the strigi desktop search engine
Group:		Development/Libraries
Requires:	%name-libs = %version-%release
Requires:	pkgconfig

%description	devel
Development files for the strigi desktop search engine

%package	libs
Summary:	Strigi libraries
Group:		Development/Libraries

%description	libs
Strigi search engine libraries

%prep
%setup -q
%patch0 -p0 -b .multilibs

%build
mkdir fedora
cd fedora
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} ..
make VERBOSE=1 %{?_smp_mflags}

%install
rm -rf %{buildroot}
cd fedora
make DESTDIR=%{buildroot} install

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

# Add an autostart desktop file for the strigi daemon
mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart
cp -pr %{SOURCE2} %{buildroot}%{_sysconfdir}/xdg/autostart/

#%check
#cd fedora
#make test

find %{buildroot}%{_libdir} -type f -name "*.so*" -exec chmod 755 {} ';'

%clean
rm -rf %{buildroot}

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

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

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

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

%changelog
* Sun Jul 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.5.11-1
- Update to 0.5.11
- Drop compile-fix and lucenetest_fix patches (fixed upstream)

* Sat May 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.5.9-2
- Disable 'make test' for now, seems the buildroot cannot find java

* Sat May 03 2008 Deji Akingunola <dakingun@gmail.com> - 0.5.9-1
- Update to 0.5.9 (bugfix release)

* Thu Mar 06 2008 Deji Akingunola <dakingun@gmail.com> - 0.5.8-2
- Use upstream's default build options (disable inotify support, #436096)

* Thu Feb 21 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.5.8-1
- Update to 0.5.8
- Fix LIB_DESTINATION (#433627)
- Drop GCC 4.3 patch (fixed upstream)

* Sat Feb 09 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.5.7-4
- Rebuild for GCC 4.3

* Fri Jan 11 2008 Deji Akingunola <dakingun@gmail.com> - 0.5.7-3
- Fix build failure with gcc-4.3

* Tue Nov 13 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.5.7-2
- Rebuild for new exiv2

* Tue Oct 30 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.7-1
- Update to 0.5.7 release
- Fix multilibs conflict (Bug #343221, patch by Kevin Kofler) 

* Sun Sep 09 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.5-2
- Rebuild for BuildID changes

* Sat Aug 11 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.5-1
- Update to 0.5.5 release

* Mon Aug 06 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.4-1
- Update to 0.5.4 proper
- License tag update

* Sun Jul 29 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.4-0.1.svn20070729
- New KDE SVN snapshot version for KDE 4.0 beta 1 (bz#20015)

* 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