Summary:	Advanced dock application written in Mono
Summary(ja): 	Mono で作成された高度なドックアプリケーション
Name:		docky
Version:	2.2.0
Release: 	1%{?_dist_release}

License:	GPLv3
Group:		User Interface/Desktops
URL:		http://www.go-docky.com/

Source0:	http://launchpad.net/docky/2.1/2.2.0/+download/%{name}-%{version}.tar.xz
Source1:	docky-2.2.0-ja.po

Patch1:		docky-2.0.5-clock-date-format.patch
# Vine Patch
# ad-hoc patch to build with dbus-sharp 0.8.0
Patch100:       docky-2.1.2-dbussharp2.patch

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

Distribution:	Vine Linux
Vendor:		Project Vine
Packager:	kazutaka

%description
Docky is an advanced shortcut bar that sits at the bottom, top, and/or sides
of your screen. It provides easy access to some of the files, folders,
and applications on your computer, displays which applications are
currently running, holds windows in their minimized state, and more.

%description -l ja
Docky はスクリーンの下部、上部、側面に配置できる高度なショートカットバーです。
コンピュータ内のファイル、フォルダ、アプリケーションへの簡単なアクセスを提供
すると共に、アプリケーションの現在の実行状態を表示します。

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

%build
autoreconf -fiv

%configure \
    --libdir=%{_prefix}/lib \
    --disable-schemas-install

%{__make} %{?_smp_mflags}


%install
%{__rm} -rf $RPM_BUILD_ROOT

export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1

%{__make} install \
   DESTDIR=$RPM_BUILD_ROOT \
   libdir=%{_prefix}/lib \
   pkgconfigdir=%{_datadir}/pkgconfig

unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

%find_lang %{name}

%post
update-desktop-database %{_datadir}/applications >& /dev/null ||:
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
    %{_sysconfdir}/gconf/schemas/docky.schemas > /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

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

%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 AUTHORS COPYING COPYRIGHT NEWS
%{_sysconfdir}/gconf/schemas/%{name}.schemas
%{_bindir}/%{name}
%{_prefix}/lib/%{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*
# devel
%{_datadir}/pkgconfig/%{name}.*


%changelog
* Wed Apr  1 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.2.0-1
- updated to 2.2.0
- built with mono 3.12.1
- changed BuildArch to noarch
- fixed spec file to execute gconftool-2 at install/uninstall

* Fri Dec 19 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.1.2-3
- added Patch100 to build with dbus-sharp 0.8.1 and dbus-shar-glib 0.6.0
- moved to User Interface/Desktops Group

* 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

