Name:		tasque
Version:	0.1.12
Release:	1%{?_dist_release}
Summary:	A simple task management app
Summary(ja):	シンプルなタスク管理アプリケーション

Group:		Applications/Productivity
License:	MIT
URL:		http://live.gnome.org/Tasque
Source0:	http://ftp.gnome.org/pub/GNOME/sources/tasque/0.1/%{name}-%{version}.tar.xz

# Vine Patches
Patch70:	tasque-0.1.12-dbussharp2.patch
Patch71:	tasque-0.1.12-smaller-font.patch

BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  dbus-sharp-devel dbus-sharp-glib-devel
BuildRequires:  desktop-file-utils
BuildRequires:	gettext-devel intltool pkgconfig 
BuildRequires:	gnome-sharp2-devel
BuildRequires:	gtk-sharp2-devel
BuildRequires:	mono-core mono-data-sqlite mono-devel
BuildRequires:	notify-sharp-devel
# to avoid autoreconf error...
BuildRequires:	glib2-devel

Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
Requires:	mono-core gnome-sharp2 gtk-sharp2 mono-data-sqlite
Requires:	notify-sharp

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	kazutaka

%description
Tasque is a simple task management app (TODO list) for the Linux Desktop. 

%description -l ja
Tasque は Linux デスクトップ向けのシンプルなタスク管理 (TODO リスト) アプリケーションです。

%package    devel
Summary:    Development files for tasque 
Summary(ja): tasque の開発用ファイル
Group: Documentation
Requires: %{name} = %{version}-%{release} pkgconfig

%description devel
Development files for tasque 

%description devel -l ja
tasque の開発用ファイルです。


%prep
%setup -q
%patch70 -p1 -b .dbussharp2
%patch71 -p1 -b .smaller-font
sed -i.nosuse -e 's|X-SuSE-Core-Office;||' data/tasque.desktop.in

%build
autoreconf -f -i 
%configure --disable-appindicator
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

mkdir -p $RPM_BUILD_ROOT%{_datadir}/pkgconfig
mv $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/*.pc $RPM_BUILD_ROOT%{_datadir}/pkgconfig

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

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor
update-desktop-database %{_datadir}/applications &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor
    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README TODO
%{_bindir}/%{name}
%{_prefix}/lib/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/org.gnome.Tasque.service
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/pixmaps/*

%files devel
%defattr (-,root,root,-)
%{_datadir}/pkgconfig/%{name}.pc

%changelog
* Sun Apr 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.1.12-1
- updated to 0.1.12
- dropt Source1 (upsteream is newer)
- added Patch70 to build with dbus-sharp 0.8 series
- updated Patch1 and renumberd as Patch71
- added BR: dbus-sharp-devel and dbus-sharp-glib-devel instead of ndesk-dbus and ndesk-dbus-glib respectively

* Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 0.1.9-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sat Mar 13 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 0.1.9-1
- new upstream release
- drop Patch0 & Patch2
- update Patch1
- add configure option --disable-standard-backends
- add Source1 for updated japanese translation

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

* Wed Jun 17 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.1.8-1
- initial build for Vine Linux based of fedora development
- add Patch1&2 to slightly change apperance and translation

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Dec 29 2008 David Kaylor<dkaylor@gmail.com> - 0.1.8-1
- Update to version 0.1.8
- libdir bug is partially fixed.  Create a patch for the remaining files.

* Mon Dec 22 2008 David Kaylor<dkaylor@gmail.com> - 0.1.7-5
- Add mono-data-sqlite dep for sqlite backend

* Mon Dec 22 2008 Maxime Carron <mxcarron@fedoraproject.org> - 0.1.7-4
- Enable sqlite backend for standalone mode

* Tue Oct 22 2008 David Kaylor<dkaylor@gmail.com> - 0.1.7-3
- Add NEWS and TODO doc files
- Add notify-sharp deps for Fedora 10+

* Tue Oct 20 2008 David Kaylor<dkaylor@gmail.com> - 0.1.7-2
- Put link to upstream bug in patch file 

* Tue Sep 16 2008 David Kaylor<dkaylor@gmail.com> - 0.1.7-1
- Update to 0.1.7

* Mon Jul 30 2008 David Kaylor<dkaylor@gmail.com> - 0.1.6-4
- Properly install .desktop file

* Mon Jul 16 2008 David Kaylor<dkaylor@gmail.com> - 0.1.6-3
- Remove "X-SuSE-Core-Office" from groups in desktop file
- Add ndesk-dbus-glib dependency

* Mon Jul 14 2008 David Kaylor<dkaylor@gmail.com> - 0.1.6-2
- Replace hardcoded /usr/lib paths with libdir
- Add gtk2-sharp to Requires
- Add docs files
- Stop generating debug package

* Wed Jul  3 2008 David Kaylor<dkaylor@gmail.com> - 0.1.6-1
- Update to 0.1.6
- Incorporate suggested improvements from https://bugzilla.redhat.com/show_bug.cgi?id=449869

* Wed Jun  2 2008 David Kaylor<dkaylor@gmail.com> - 0.1.5-1
- Initial package

