Summary:	A graphical project management tool.
Summary(ja):	グラフィカルなプロジェクト管理ツール
Name:		planner
Version:	0.14.4
Release:	1%{?_dist_release}
URL:		http://live.gnome.org/Planner
Source0:	%{name}-%{version}.tar.bz2
License:	GPL
Group:		Applications/Productivity
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Obsoletes:	mrproject <= 0.11
Obsoletes:      libmrproject <= 0.11
Provides:       libplanner

Requires:       popt
Requires(post,postun): scrollkeeper >= 0.3.10
Requires(post,postun): shared-mime-info
Requires(post,postun): GConf2

BuildRequires:	gtk2-devel >= 2.6
BuildRequires:	libgnomecanvas-devel >= 2.10.0
BuildRequires:	libgnomeui-devel >= 2.10.0
BuildRequires:	libgnomeprintui-devel >= 2.10.0
BuildRequires:	gnome-vfs2-devel >= 2.10.0
BuildRequires:	libxml2-devel >= 2.6.0
BuildRequires:	libxslt-devel >= 1.1.23
BuildRequires:	GConf2-devel >= 2.10.0
BuildRequires:	libglade2-devel >= 2.4.0
BuildRequires:	pygtk2 >= 2.6.0
BuildRequires:	evolution-devel, evolution-data-server-devel
BuildRequires:	libgsf-devel >= 1.6
BuildRequires:	gtk-doc
#BuildRequires:  libgda-devel 

Packager:	inagaki

%description
Planner is a visual project management application which allows users to
manage several aspects of a project, including schedule tracking using
Gantt charts.

You should install Planner if you wish to manage schedules, allocate
resources, and track the progress of your projects.

%description -l ja
Planner はプロジェクトをさまざまな視点から管理することができる
グラフィカルなプロジェクト管理ツールで，ガントチャートを使った
スケジュール追跡などを行うことができます．


%package devel
Summary:     Header files, libraries for planner.
Summary(ja): Planner の開発用ファイル
Group:       Development/Libraries
Requires:    %{name} = %{version}
Obsoletes:   libmrproject-devel <= 0.11
Provides:    libplanner-devel = %{version}

%description devel
This package contains the header files, static libraries for %{name}. 
If you like to develop programs using %{name}, you will need to install
%{name}-devel.


#%package database
#Summary:     Planner database support
#Summary(ja): Planner データベースサポート
#Group:       Applications/Productivity
#Requires:    %{name} = %{version}
#Requires:    libgda
#
#%description database
#Database support for Planner, this plugin can be used to store 
#projects in a PostgreSQL database.
#
#%description -l ja database
#Planner のデータベースサポートです．このプラグインを使うことで
#プロジェクトを PostgreSQL データベースに保存することができます．


%package eds
Summary:    Planner integration with evolution
Summary(ja): Planner の evolution 用プラグイン
Group:      Applications/Productivity
Requires:  %{name} = %{version}-%{release}

%description eds
This package provides a plugin to integration planner and evolution.

%description eds -l ja
このパッケージは planner と evolution を連携できるようにする
プラグインを提供します。

%prep
%setup -q

%build
%configure --with-database=no \
           --enable-python \
           --enable-eds-backend \
           --disable-update-mimedb \
           --disable-schemas-install \
           --disable-static

make

%install
rm -rf $RPM_BUILD_ROOT

export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make DESTDIR=$RPM_BUILD_ROOT install
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

#desktop-file-install --vendor imendio --delete-original       \
#  --dir %{buildroot}%{_datadir}/applications             \
#  --add-category X-Red-Hat-Base                             \
#  %{buildroot}%{_datadir}/applications/planner.desktop

/bin/rm -rf %{buildroot}/var/scrollkeeper
/bin/rm %{buildroot}/%{_libdir}/*.la
/bin/rm %{buildroot}/%{_libdir}/planner/file-modules/*.la
/bin/rm %{buildroot}/%{_libdir}/planner/storage-modules/*.la
/bin/rm %{buildroot}/%{_libdir}/planner/plugins/*.la
#/bin/rm %{buildroot}/%{_libdir}/planner/views/*.la
/bin/rm %{buildroot}/%{_libdir}/python*/site-packages/*.la
/bin/rm -rf %{buildroot}/%{_datadir}/doc/planner
/bin/rm -f $RPM_BUILD_ROOT/%{_libdir}/evolution-data-server-1.2/extensions/*.la
/bin/rm -f $RPM_BUILD_ROOT/%{_libdir}/evolution/*/plugins/*.la

pushd $RPM_BUILD_ROOT/%{_libdir}/evolution-data-server-1.2/extensions
rm -f libecalbackendplanner.so
rm -f libecalbackendplanner.so.0
mv -f libecalbackendplanner.so.0.0.0 libecalbackendplanner.so
popd

%find_lang %{name}

%post 
scrollkeeper-update > /dev/null 2>&1 || :
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/planner.schemas > /dev/null
%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null

%postun
scrollkeeper-update > /dev/null 2>&1 || :
%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
%doc ChangeLog NEWS README COPYING examples/*.planner
%{_sysconfdir}/gconf/schemas/*.schemas
%{_bindir}/planner
%{_libdir}/planner
%{_libdir}/libplanner*.so.*
%{_libdir}/python*/site-packages/*.so
%{_datadir}/applications/*
#%{_datadir}/application-registry/*
%{_datadir}/mime/packages/*
#%{_datadir}/mime-info/*
%{_datadir}/pixmaps/*
%{_datadir}/icons/*
%{_datadir}/planner
%{_datadir}/gnome/help/planner
%{_datadir}/omf/planner
%{_mandir}/man1/planner*
#%exclude %{_libdir}/planner/storage-modules/libstorage-sql*
#%exclude %{_libdir}/planner/plugins/libsql-plugin*
%exclude %{_datadir}/planner/glade/sql.glade
%exclude %{_datadir}/planner/ui/sql-plugin.ui
%exclude %{_datadir}/planner/sql

%files devel
%defattr(-, root, root, 0755)
%{_includedir}/*
%{_libdir}/libplanner*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gtk-doc/html/libplanner

#%files database
#%defattr(-,root,root)
#%doc docs/sql/README.sql
#%{_libdir}/planner/storage-modules/libstorage-sql*
#%{_libdir}/planner/plugins/libsql-plugin*
#%{_datadir}/planner/glade/sql.glade
#%{_datadir}/planner/ui/sql-plugin.ui
#%{_datadir}/planner/sql

%files eds
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}/plugins
%dir %{_libdir}/evolution-data-server-1.2
%dir %{_libdir}/evolution-data-server-1.2/extensions
%{_libdir}/evolution-data-server-1.2/extensions/libecalbackendplanner.so
%{_libdir}/evolution/*/plugins/liborg-gnome-planner-source.so
%{_libdir}/evolution/*/plugins/org-gnome-planner-source.eplug

%changelog
* Mon May 25 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.14.4-1
- new upstream release
- update URL
- update configure option
  change --enable-eds to --enable-eds-backend (upstream change)
  change --enable-database to --with-database (upstream change)
  set --with-database=no (drop database support)
  add --disable-static
- add BuildRequies: evolution-devel

* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 0.14.3-2
- rebuilt with python-2.5.2

* Mon Jun 23 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.14.3-1
- new upstream release
- using --enable-eds
- spec in UTF-8

* Wed Sep 27 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.14.1-0vl1
- new upstream release
- using --enable-database 

* Sat Apr 16 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.14-0vl1
- new upstream release
- using --disable-database 
- run update-mime-database on %post and %postun

* Sat Apr 16 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.13-0vl1
- new upstream release
- added examples
- split devel package

* Sat Feb 12 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.12.1-0vl2
- rebuild with new libgdb

* Wed Oct  6 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.12.1-0vl1
- new upstream release
- add Japanese summary and description
- update URL

* Sat Jul 10 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.12-0vl1
- new upstream release
- new planner-database subpackage 
- fixed typo at changelog

* Tue Apr 27 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.11-1vl1
- rebuild for Vine
- disable postgres option

* Thu Apr 8 2004 Dan Williams <dcbw@redhat.com> 0.11-1
- Initial Release of 0.11 RPMs
