%define build_vine5 0

%if "%{?_dist_release}" == "vl5"
%define build_vine5 1
%endif

Summary:	Dock application for GNOME
Summary(ja): 	GNOME 向けのドックアプリケーション
Name:		docky
Version:	2.1.2
Release: 	2%{?_dist_release}
Source0:	http://launchpad.net/docky/2.1/2.1.0/+download/%{name}-%{version}.tar.bz2
Source1:	docky-2.1.0-ja.po
Patch1:		docky-2.0.5-clock-date-format.patch
License:	GPLv3
Group:		Applications/Accessories
URL:		http://www.go-docky.com/

Requires:	gconf-sharp2
Requires:	gnome-keyring-sharp
Requires:	mono-web
Requires:	rsvg2-sharp
Requires:	dockmanager
Requires(post):	 desktop-file-utils
Requires(postun):desktop-file-utils
BuildRequires:	python
BuildRequires:	gtk2-devel
BuildRequires:	GConf2-devel
BuildRequires:	dbus-sharp-devel
BuildRequires:	dbus-sharp-glib-devel
BuildRequires:	gtk-sharp2-gapi
BuildRequires:	gconf-sharp2
BuildRequires:	gio-sharp-devel
BuildRequires:	gtk-sharp2
BuildRequires:	gnome-desktop-sharp2
BuildRequires:	gnome-keyring-sharp-devel
BuildRequires:	gnome-sharp2
BuildRequires:	gnome-vfs-sharp2
BuildRequires:	rsvg2-sharp
BuildRequires:	notify-sharp-devel
BuildRequires:	wnck-sharp
BuildRequires:	mono-addins-devel
BuildRequires:	mono-core
BuildRequires:	mono-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Distribution:	Vine Linux
Vendor:		Project Vine
Packager:	kazutaka

%description
Docky is a full fledged dock application that makes opening common applications
and managing windows easier and quicker. Docky is fully integrated into the GNOME
Desktop and features a no non-sense approach to configuration and usage. 

%description -l ja
Docky はアプリケーションの実行やウィンドウの操作を簡単かつ素早く実行できる、
十分な機能を備えたドックアプリケーションです。Docky は GNOME デスクトップ
環境と密接に統合されており、直感的に使えるようにデザインされています。


%prep
%setup -q
%patch1 -p1 -b .clock-date-format
%{__cp} %{SOURCE1} po/ja.po


%build
%configure
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}

%post
update-desktop-database %{_datadir}/applications >& /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor ||:
fi

%postun
update-desktop-database %{_datadir}/applications >& /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor ||:
fi


%clean
%{__rm} -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root)
%doc
#%{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_sysconfdir}/gconf/schemas/%{name}.schemas
%{_bindir}/%{name}
%{_libdir}/%{name}
%{_libdir}/pkgconfig/%{name}.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/16x16/apps/%{name}.svg
%{_datadir}/icons/hicolor/22x22/apps/%{name}.svg
%{_datadir}/icons/hicolor/24x24/apps/%{name}.svg
%{_datadir}/icons/hicolor/32x32/apps/%{name}.svg
%{_datadir}/icons/hicolor/48x48/apps/%{name}.svg
%{_datadir}/icons/hicolor/48x48/mimetypes/extension.svg
%{_datadir}/icons/hicolor/64x64/apps/%{name}.svg
%{_datadir}/icons/hicolor/128x128/apps/%{name}.svg
%{_datadir}/icons/hicolor/128x128/apps/gmail.png
%{_mandir}/man1/%{name}.1*


%changelog
* Tue Jan  1 2013 IWAI, Masaharu <iwai@alib.jp> 2.1.2-2
- build with mono-addins 0.6.2-2
- add BuildRequires: mono-addins-devel
- add Vendor and Distribution tags

* Thu Apr 14 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.2-1
- new upstream release.

* Wed Apr 13 2011 Shu KONNO <owa@bg.wakwak.com> 2.1.1-2
- rebuilt with new dbus-sharp, dbus-sharp-glib

* Mon Mar 14 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 2.1.1-1
- new upstream release
- drop /etc/xdg/autostart/docky.desktop (upstream change)
- Requires: dockmanager

* Thu Feb 17 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 2.1.0-1
- new upstream release
- add BuildRequires: gio-sharp-devel, dbu-sharp-devel, 
  dbus-sharp-glib2-devel
- drop BuildRequires: ndesk-dbus, ndesk-dbus-glib
- drop python dependencies (upstream change)
- update Source1 (japanese translation)

* Mon Jan 03 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 2.0.9-1
- new upstream release
- update Source1 (japanese translation)
- drop patch2 (fixed in upstream)

* Wed Oct 13 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 2.0.7-2
- add build_vine5 conditional macro (don't apply patch2 on Vine 5)
- add Requires: gconf-sharp2, gnome-keyring-sharp, mono-web, rsvg2-sharp

* Mon Oct 11 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 2.0.7-1
- new upstream release
- build with mono-2.8 (VineSeed)
- add Patch2 to drop dependency mono.getoptions (VineSeed)

* Thu Sep 09 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 2.0.6-1
- new upstream release

* Fri Aug 13 2010 Shu KONNO <owa@bg.wakwak.com> 2.0.5-2
- fixed python2.6/site-package path in %%files

* Sat Aug 07 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 2.0.5-1
- initial build for Vine Linux
- add Patch1: modify date/time format to make them translatable
- add Source1: updated japanese translation

