Summary: An object database, tag/metadata database, search tool and indexer
Summary(ja): オブジェクト/タグ/メタデータデータベースおよび検索ツール
Name: tracker
Version: 0.8.16
Release: 2%{?_dist_release}
License: GPL
Group: Applications/System
URL: http://www.gnome.org/projects/tracker/

Source0: http://ftp.gnome.org/pub/GNOME/sources/tracker/0.8/tracker-%{version}.tar.bz2

Patch0: tracker-ldfind.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glib2-devel >= 2.24.0
BuildRequires: gtk2-devel >= 2.20.0
BuildRequires: gnome-panel-devel 
BuildRequires: gmime-devel >= 2.4, poppler-devel, gettext, file
BuildRequires: gnome-desktop-devel, gamin-devel
BuildRequires: libexif-devel, libgsf-devel, totem-pl-parser-devel
BuildRequires: gstreamer-devel
BuildRequires: desktop-file-utils, intltool
BuildRequires: raptor-devel >= 1.4.18
BuildRequires: sqlite3-devel
BuildRequires: dbus-devel >= 1.0
BuildRequires: dbus-glib-devel >= 0.78
BuildRequires: libgnome-devel >= 2.13.2
BuildRequires: libgnomeui-devel >= 2.13.7
BuildRequires: libSM-devel
BuildRequires: libnotify-devel >= 0.4.3
BuildRequires: libuuid-devel
BuildRequires: vala-devel
BuildRequires: libgee-devel
BuildRequires: upower-devel
BuildRequires: gnome-applets
BuildRequires: libgee-devel >= 0.3
## BuildRequires: autoconf, automake

%description
Tracker is a powerful desktop-neutral first class object database,
tag/metadata database, search tool and indexer. 

It consists of a common object database that allows entities to have an
almost infinte number of properties, metadata (both embedded/harvested as
well as user definable), a comprehensive database of keywords/tags and
links to other entities.

It provides additional features for file based objects including context
linking and audit trails for a file object.

It has the ability to index, store, harvest metadata. retrieve and search  
all types of files and other first class objects

%package devel
Summary: Headers for developing programs that will use %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: dbus-glib-devel

%description devel
This package contains the static libraries and header files needed for
developing with tracker

%package search-tool
Summary: Tracker search tool(s)
Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}

%description search-tool
Graphical frontend to tracker search facilities. This has dependencies on
GNOME libraries

%prep
%setup -q
## %patch0 -p0 -b .ld

# remove shebangs from the python files as none should be executable scripts
## sed -e '/^#!\//,1 d' -i python/deskbar-handler/*.py

%build
## libtoolize --force --copy
## intltoolize --copy --force
## autoreconf -i -f
%configure --disable-static \
	   --enable-video-extractor=external \
	   --enable-tracker-search-tool=yes \
	   --enable-tracker-search-bar=yes

# Disable rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

# make %{?_smp_mflags} fails
# %__make
make %{?_smp_mflags}

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

mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/tracker-0.8"	\
	> %{buildroot}%{_sysconfdir}/ld.so.conf.d/tracker-%{_arch}.conf

desktop-file-install --delete-original               \
        --vendor=""                             \
        --dir=%{buildroot}%{_datadir}/applications   \
        %{buildroot}%{_datadir}/applications/%{name}-search-tool.desktop

rm -rf %{buildroot}%{_libdir}/*.{a,la}
rm -rf %{buildroot}%{_datadir}/tracker-tests

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
  
%postun
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
  
%files -f %{name}.lang
%defattr(-, root, root, -)
%doc AUTHORS ChangeLog COPYING NEWS README
### %doc %{_datadir}/gtk-doc/html/libtracker-common/
### %doc %{_datadir}/gtk-doc/html/libtracker-module/
%{_bindir}/tracker*
%exclude %{_bindir}/tracker-search-tool
%exclude %{_bindir}/tracker-preferences
### %exclude %{_bindir}/tracker-applet
%{_libexecdir}/tracker*
%{_libdir}/*.so.*
%{_libdir}/tracker-0.8/
%{_datadir}/tracker/
%{_datadir}/dbus-1/services/org.freedesktop.Tracker*
%{_sysconfdir}/ld.so.conf.d/tracker-%{_arch}.conf
%{_sysconfdir}/xdg/autostart/tracker*.desktop
%{_mandir}/*/tracker*.gz
%exclude %{_mandir}/man1/tracker-search-bar.1.gz
%exclude %{_mandir}/man1/tracker-preferences.1.gz
%exclude %{_mandir}/man1/tracker-search-tool.1.gz

%files devel
%defattr(-, root, root, -)
%{_includedir}/tracker-0.8/
### %{_includedir}/libtracker-gtk/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/vala/vapi/tracker*.vapi
%{_datadir}/vala/vapi/tracker*.deps

%files search-tool
%defattr(-, root, root, -)
%{_bindir}/tracker-search-tool
%{_bindir}/tracker-preferences
%{_libdir}/bonobo/servers/GNOME_Search_Bar_Applet.server
%{_datadir}/icons/*/*/apps/tracker.*
%{_datadir}/applications/*.desktop
%{_mandir}/man1/tracker-search-bar.1.gz
%{_mandir}/man1/tracker-preferences.1.gz
%{_mandir}/man1/tracker-search-tool.1.gz


%changelog
* Sat Oct 09 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.16-2
- rebuild with poppler-0.14.2

* Sun Aug 22 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.16-1
- new upstream release
- add BuildRequires: glib2-devel, gtk2-devel, gnome-panel-devel, libgee-devel
- add configure option (--enable-tracker-search-bar)

* Sun Jul 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.15-1
- new upstream release

* Sat Jun 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.13-1
- new upstream release
- fix URL of Source0

* Mon Jun 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.12-1
- new upstream release

* Sun Jun 13 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.11-1
- new upstream release

* Sun May 30 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.9-1
- new upstream release
- fix %install and %files (make /etc/ld.so.conf.d/tracker-%{_arch}.conf)

* Sun May 16 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.6-1
- new upstream release

* Sun Apr 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.3-1
- new upstream release
- add BuildRequires: upower-devel, gnome-applets
- change BuildRequires: dbus-glib -> dbus-glib-devel

* Sun Mar 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.0-1
- new upstream release
- add BuildRequires: libgnome-devel, libgnomeui-devel, libSM-devel, libnotify-devel, libuuid-devel, libgee-devel
- fix BuildRequires: gmime-devel >= 2.4
- add configure option (--enable-tracker-search-tool)

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.91-1
- new upstream release

* Sun Dec 14 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6.6-2
- rebuild with poppler-0.10.2
- spec in UTF-8

* Mon Mar 31 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6.6-1
- new upstream release
- update Patch1
- drop Patch10 (no more necessary)
- add %%{_sysconfdir}/xdg/autostart/tracker-applet.desktop
- remove --enable-external-sqlite option (no more bundled sqlite exist)
- apply new versioning policy

* Mon Sep 10 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.2-0vl1
- new upstream release

* Sun Apr 29 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.4-0vl2
- add Patch10 to fix selecting video-extractor
- use external video extractor(totem) instead of gstreamer/xine

* Sun Apr 29 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.4-0vl1
- initial build for Vine Linux

* Fri Mar 30 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.4-6
- Ship both autostart desktop files in the main package (BZ #233323)

* Tue Feb 13 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.4-3
- Package the deskbar plugin properly (BZ #228308)

* Mon Jan 29 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.4-2
- Split out tracker-search-tool sub-packages, for the GUI facility
- Add proper requires for the -devel subpackage
- Deal with the rpmlint complaints on rpath

* Sat Jan 27 2007 Deji Akingunola <dakingun@gmail.com> - 0.5.4-1
- Update to 0.5.4

* Tue Dec 26 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.3-1
- Update to 0.5.3

* Mon Nov 27 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.2-2
- Apply patch on Makefile.am instead of Makefile.in
- Add libtool to BR

* Mon Nov 06 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.2-1
- Update to 0.5.2

* Mon Nov 06 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.1-1
- Update to new version

* Mon Nov 06 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-7
- Have the devel subpackage require pkgconfig
- Make the description field not have more than 76 characters on a line
- Fix up the RPM group

* Mon Nov 06 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-6
- Explicitly require dbus-devel and dbus-glib (needed for FC < 6) 

* Sun Nov 05 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-5
- Remove unneeded BRs (gnome-utils-devel and openssl-devel) 

* Sun Nov 05 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-4
- Add autostart desktop file.
- Edit the package description as suggested in review

* Sat Nov 04 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-3
- More cleaups to the spec file.

* Sat Nov 04 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-2
- Add needed BRs

* Sat Nov 04 2006 Deji Akingunola <dakingun@gmail.com> - 0.5.0-1
- Initial packaging for Fedora Extras
