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

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

Patch0:	tracker-0.12.3-sched.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glib2-devel >= 2.24.0
BuildRequires: gtk3-devel >= 3.0.0
BuildRequires: gnome-panel-devel 
BuildRequires: gmime-devel >= 2.4
BuildRequires: gstreamer-devel >= 0.10.31
BuildRequires: gstreamer-plugins-base-devel >= 0.10.31
BuildRequires: poppler-devel
BuildRequires: gettext
BuildRequires: 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: NetworkManager-glib-devel
BuildRequires: vala-devel
BuildRequires: libgee-devel
BuildRequires: upower-devel
BuildRequires: gnome-applets
BuildRequires: libgee-devel >= 0.3
BuildRequires: nautilus-devel
BuildRequires: libicu-devel
## BuildRequires: autoconf, automake

Vendor: Project Vine
Distribution: Vine Linux

%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 doc
Summary: Documentation for tracker
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
This package contains documentation for 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 -p1 -b .sched

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

sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure

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


make %{?_smp_mflags}

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

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

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

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

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &> /dev/null ||:

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
  
%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null ||:
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:
    glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
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-needle
%exclude %{_bindir}/tracker-preferences
### %exclude %{_bindir}/tracker-applet
%{_libexecdir}/tracker*
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib
%{_libdir}/tracker-0.12/
%{_datadir}/tracker/
%{_datadir}/dbus-1/services/org.freedesktop.Tracker*
%{_datadir}/dbus-1/services/org.gnome.panel.applet.SearchBarFactory.service
%{_datadir}/glib-2.0/schemas/org.freedesktop.Tracker.*.xml
%{_datadir}/gnome-panel/4.0/applets/org.gnome.panel.SearchBar.panel-applet
%{_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-needle.1.gz

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

%files doc
%defattr(-, root, root, -)
%{_datadir}/gtk-doc/html/libtracker-extract
%{_datadir}/gtk-doc/html/libtracker-miner
%{_datadir}/gtk-doc/html/libtracker-sparql

%files search-tool
%defattr(-, root, root, -)
%{_bindir}/tracker-needle
%{_bindir}/tracker-preferences
%{_libdir}/nautilus/extensions-3.0/*.so
%{_datadir}/icons/*/*/apps/tracker.*
%{_datadir}/applications/*.desktop
%{_mandir}/man1/tracker-search-bar.1.gz
%{_mandir}/man1/tracker-preferences.1.gz
%{_mandir}/man1/tracker-needle.1.gz


%changelog
* Wed Dec 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12.9-1
- new upstream release

* Thu Nov 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12.7-1
- new upstream release

* Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12.4-1
- new upstream release
- create %%{name}-doc sub package

* Fri Sep 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12.3-1
- new upstream release
- add Patch0 (tracker-0.12.3-sched.patch)

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12.2-1
- new upstream release
- add BuildRequires: gstreamer-devel, gstreamer-plugins-base-devel, NetworkManager-glib-devel
- drop Patch0

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.25-1
- new upstream release

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.23-1
- new upstream release

* Wed Jul 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.22-1
- new upstream release
- add BuildRequires: libicu-devel

* Thu May 05 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.18-1
- new upstream release
- add Patch0 (tracker-0.8.18-tracker_spawn.patch)
- delete Patch1

* Sat Mar 12 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.16-3
- rebuilt with poppler-0.16.3

* 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
