%define gtk3_version 3.0.9
%define gconf2_version 2.32.0
%define libgcrypt_version 1.4.6
%define avahi_version 0.6.25

Summary: A remote desktop system for GNOME
Summary(ja): GNOME 用リモートデスクトップシステム
Name: vino
Version: 3.2.2
Release: 1%{?_dist_release}
URL: http://www.gnome.org
License: GPL
Group: User Interface/Desktops

Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.2/%{name}-%{version}.tar.xz

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

Requires: GConf2 >= %{gconf2_version}

Requires: gtk3 >= %{gtk3_version}
Requires: GConf2 >= %{gconf2_version}
Requires: libgcrypt >= %{libgcrypt_version}
Requires: avahi >= %{avahi_version}
Requires: avahi-glib >= %{avahi_version}
Requires: NetworkManager >= 0.8

BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: GConf2-devel >= %{gconf2_version}
BuildRequires: dbus-devel >= 1.4.0
BuildRequires: libsoup-devel >= 2.32.0
BuildRequires: libnotify-devel >= 0.4.5
BuildRequires: libgcrypt-devel >= %{libgcrypt_version}
BuildRequires: avahi-devel >= %{avahi_version}
BuildRequires: avahi-glib-devel >= %{avahi_version}
BuildRequires: libgnome-keyring-devel >= 2.32
BuildRequires: NetworkManager-glib-devel >= 0.8
BuildRequires: unique3-devel >= 3.0.0
BuildRequires: libSM-devel
BuildRequires: libXtst-devel
BuildRequires: desktop-file-utils

Vendor: Project Vine
Distribution: Vine Linux

%description
Vino is a VNC server for GNOME. It allows remote users to
connect to a running GNOME session using VNC.

%description -l ja
Vine は GNOME 用の VNC サーバです。Vino によりリモートユーザが
VNC を利用して稼働中のGNOME セッション接続することができるよう
になります。

%prep
%setup -q

%build
%configure \
	--disable-schemas-install \
	--enable-avahi \
	--disable-gnutls \
	--disable-session-support \
	--disable-telepathy \
	--enable-libnotify \
	--enable-network-manager \
	--enable-gnome-keyring \
	--disable-http-server \
	--enable-libunique=yes
%__make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

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

#desktop-file-install --vendor gnome --delete-original                   \
#  --dir $RPM_BUILD_ROOT%{_datadir}/applications			        \
#  --add-only-show-in GNOME                                              \
#  $RPM_BUILD_ROOT%{_datadir}/applications/vino-preferences.desktop

# stuff we don't want
rm -rf $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor

%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
fi
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

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



%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README docs/TODO docs/remote-desktop.txt
%{_sysconfdir}/xdg/autostart/vino-server.desktop
%{_bindir}/*
%{_libexecdir}/*
%{_datadir}/GConf/gsettings/org.gnome.Vino.convert
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/*
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/vino

%changelog
* Sun Nov 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Fri Oct 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release
- add BuildRequires: libXtst-devel

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- new upstream release
- change BuildRequires: unique3-devel instead of unique-devel

* Thu May 05 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.2-1
- new upstream release
- change BuildRequires: NetworkManager-glib-devel instead of NetworkManager-devel

* Sun Dec 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1-1
- new upstream release

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release

* Sun Apr 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.28.2-1
- new upstream release
- add BuildRequires: libSM-devel, desktop-file-utils
- change BuildRequires: gnome-keyring-devel -> libgnome-keyring-devel

* Sun Nov  8 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.1-1
- new upstream release

* Thu May 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.2-1
- new upstream release

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-1
- new upstream release

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-1
- new upstream release

* Wed Oct 28 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.1-1
- new upstream release

* Sat Sep 27 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-1
- new upstream release

* Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.22.2-1
- new upstream release

* Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 2.18.1-1vl5
- applied new versioning policy, spec in utf-8

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl1
- new upstream release

* Sat Apr 01 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.5-0vl3
- run gtk-update-icon-cache in %%post script.

* Mon Mar 13 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.5-0vl2
- enable avahi, add BuildRequires: avahi-devel

* Wed Mar 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.5-0vl1
- new upstream release

* Mon Sep 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.0-0vl1
- new upstream release

* Tue Mar 22 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.0-0vl1
- new upstream version

* Tue Nov 30 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.1-0vl1
- initial build for Vine Linux
- add japanese summary and description.

* Tue Oct 12 2004 Mark McLoughlin <markmc@redhat.com> 2.8.1-1
- Update to 2.8.1
- Remove backported fixes

* Thu Oct  7 2004 Mark McLoughlin <markmc@redhat.com> 2.8.0.1-1.1
- Don't hang with metacity's "reduced resources" mode (#134240) 
- Improve the key repeat rate situation a good deal (#134451)

* Wed Sep 29 2004 Mark McLoughlin <markmc@redhat.com> 2.8.0.1-1
- Update to 2.8.0.1

* Tue Sep 21 2004 Mark McLoughlin <markmc@redhat.com> 2.8.0-1
- Update to 2.8.0
- Remove upstreamed work-without-gnutls patch

* Tue Sep  7 2004 Matthias Clasen <mclasen@redhat.com> 2.7.92-3
- Disable help button until there is help (#131632)
 
* Wed Sep  1 2004 Mark McLoughlin <markmc@redhat.com> 2.7.92-2
- Add patch to fix hang without GNU TLS (bug #131354)

* Mon Aug 30 2004 Mark McLoughlin <markmc@redhat.com> 2.7.92-1
- Update to 2.7.92

* Tue Aug 17 2004 Mark McLoughlin <markmc@redhat.com> 2.7.91-1
- Update to 2.7.91

* Mon Aug 16 2004 Mark McLoughlin <markmc@redhat.com> 2.7.90-2
- Define libgcrypt_version

* Thu Aug 12 2004 Mark McLoughlin <markmc@redhat.com> 2.7.90-1
- Update to 2.7.90

* Wed Aug  4 2004 Mark McLoughlin <markmc@redhat.com> 2.7.4-1
- Update to 2.7.4

* Tue Jul 13 2004 Mark McLoughlin <markmc@redhat.com> 2.7.3.1-1
- Initial build.
