%define tomboy_dir %{_prefix}/lib
%define pkgconfigdir %{_datadir}/pkgconfig

Summary:	Tomboy is a desktop note-taking application for Linux and Unix.
Summary(ja): 	Linux 向けのデスクトップ用ノートテーカー(メモ)アプリケーション
Name:		tomboy
Version:	1.4.2
Release: 	2%{?_dist_release}
Source0:	http://download.gnome.org/sources/%{name}/1.4/%{name}-%{version}.tar.bz2
License:	LGPL
Group:		User Interface/Desktops
URL:		http://www.gnome.org/projects/tomboy/

Requires:	gtkspell
Requires:	gconf-sharp2
Requires:	gnome-panel-sharp
Requires:	ndesk-dbus
Requires:	ndesk-dbus-glib
Requires:	mono-addins
BuildRequires:	gtk2-devel >= 2.16.0
BuildRequires:	atk-devel >= 1.2.4
BuildRequires:	gtkspell-devel
BuildRequires:	gtk-sharp2, dbus-devel
BuildRequires:	mono-core, ndesk-dbus, ndesk-dbus-glib
BuildRequires:	mono-addins, mono-devel
BuildRequires:	gnome-sharp2, gconf-sharp2, gnome-panel-sharp >= 2.26.0
BuildRequires:	art-sharp2, gnome-vfs-sharp2
BuildRequires:	gnome-doc-utils >= 0.3.2, docbook-dtds
BuildRequires:	libSM-devel

Requires(post):	shared-mime-info
Requires(postun):	shared-mime-info

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Packager:	kazutaka

%description
Tomboy is a desktop note-taking application for Linux and Unix. Simple and easy
to use, but with potential to help you organize the ideas and information you
deal with every day.  The key to Tomboy's usefulness lies in the ability to
relate notes and ideas together.  Using a WikiWiki-like linking system,
organizing ideas is as simple as typing a name.  Branching an idea off is easy
as pressing the Link button. And links between your ideas won't break, even when
renaming and reorganizing them.

%description -l ja
Tomboy は Linux と Unix 向けのデスクトップ用ノートテーカー(メモ)アプリ
ケーションです。シンプルで使い易いですが、あなたが毎日扱うアイディアや
情報を整理するのに役に立つ能力を持っています。Tomboy の使い易さのキー
ポイントは、ノートとアイディアを関連付ける点です。WikiWiki ライクなリン
クシステムを使うことで、アイデアは名前を入力するだけで整理され、リンク
ボタンを押すだけでアイデア同士をつなげることができます。また名前を変え
たり整理し直してもアイデア間のリンクが切れることはありません。

%prep

%setup -q


%build
%configure \
	--disable-scrollkeeper \
	--disable-evolution \
	--disable-galago \
	--enable-dbus=yes \
	--disable-update-mimedb \
	--enable-panel-applet=yes \
	--libdir=%{_prefix}/lib

%{__make}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%{__make} install \
	DESTDIR=${RPM_BUILD_ROOT} \
	pkgdatadir=%{_datadir} \
	libdir=%{tomboy_dir} \
	pkgconfigdir=%{pkgconfigdir}

unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

%find_lang %{name}

%post
update-desktop-database &>/dev/null || :
update-mime-database >&/dev/null || :
scrollkeeper-update > /dev/null 2>&1 || :
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
    %{_sysconfdir}/gconf/schemas/tomboy.schemas > /dev/null
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi


%preun
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule \
    %{_sysconfdir}/gconf/schemas/tomboy.schemas >/dev/null;

%postun
update-desktop-database &>/dev/null || :
update-mime-database >&/dev/null || :
scrollkeeper-update > /dev/null 2>&1 || :


%clean
%__rm -rf ${RPM_BUILD_ROOT}


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/tomboy
%{_bindir}/tomboy-panel
%dir %{tomboy_dir}/tomboy
%dir %{tomboy_dir}/tomboy/addins
%{tomboy_dir}/tomboy/Tomboy.*
%{tomboy_dir}/tomboy/libtomboy.*
%{tomboy_dir}/tomboy/addins/*
%{tomboy_dir}/bonobo/servers/GNOME_TomboyApplet.server
%{_datadir}/dbus-1/services/org.gnome.Tomboy.service
%{_datadir}/applications/tomboy.desktop
%{_datadir}/gnome/help/tomboy
%{_datadir}/icons/hicolor/
##%{_datadir}/omf/tomboy/
%{_datadir}/mime/packages/%{name}.xml
%{_mandir}/man1/tomboy.1.gz
%{_sysconfdir}/gconf/schemas/tomboy.schemas
%{pkgconfigdir}/tomboy-addins.pc


%changelog
* Sun Apr 03 2011 Shu KONNO <owa@bg.wakwak.com> 1.4.2-2
- rebuilt with mono-2.10.1

* Sat Nov 20 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.2-1
- new upstream release

* Tue Oct 05 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release
- add BuildRequires: libSM-devel
- add Requires: gconf-sharp2, gnome-panel-sharp, ndesk-dbus, ndesk-dbus-glib, mono-addins
- add configure option (--enable-panel-applet=yes)
- fix %files

* Mon Jul 26 2010 Shu KONNO <owa@bg.wakwak.com> 1.2.0-2
- rebuilt with mono-addins-0.5

* Sat Apr 17 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.2.0-1
- new upstream release
- add --disable-update-mimedb configure option
- run update-mime-database at %%post and %%postun
- add Requires(post/postun): shared-mime-info
- add BuildRequires: gnome-doc-utils, docbook-dtds (<BTS:VineLinux:904>)

* Sat Oct 10 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.0-1
- new upstream release

* Sat Aug 15 2009  0.14.2-3
- add BuildRequires: mono-devel
- run update-desktop-database and gtk-update-icon-cache as %post & %postun

* Fri Jul 10 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.14.2-2
- rebuild with latest rpm to update mono-dependencies

* Tue May 19 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.14.2-1
- new upstream release

* Fri May 01 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.14.1-1
- new upstream release
- add BuildRequires: gnome-panel-sharp >= 2.26.0
- add Packager tag

* Thu Mar 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.13.6-1
- new upstream release
- remove unneeded Requires:
- add --enable-dbus=yes to configure option

* Fri Jan 30 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.12.2-1
- new upstream release

* Mon Nov 03 2008 Shu KONNO <owa@bg.wakwak.com> 0.12.0-2
- dropt %%{_libdir}/tomboy/Mono.Addins.* in %%files
- added BuildRequires: mono-addins
- added Requires: mono-addins
- added macro %%pkgconfigdir

* Thu Oct 09 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.12.0-1
- source update
- add BuildRequires: gnome-sharp2, gconf-sharp2, art-sharp2, gnome-vfs-sharp2

* Tue Apr 22 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.10.1-1
- source update.
- add BuildRequires:ndesk-dbus, ndesk-dbus-glib
- apply new versioning policy

* Sat Oct 27 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.8.1-0vl1
- source update.

* Sun Apr 29 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6.3-0vl1
- source update.

* Wed Oct 04 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.4.1-0vl2
- add mono-core in Requires and BuildRequres. <BTS:VineLinux:226>

* Sun Sep 24 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.4.1-0vl1
- source update.
- change Group to User Interface/Desktops.

* Sun Sep 24 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.3.5-0vl1
- initial build for Vine Linux

