Summary: 	Remote Desktop Connection utility for GNOME
Summary(ja): 	GNOME 用リモートデスクトップ接続ユーティリティ
Name: 		remmina
Version: 	0.9.3
Release:        1%{?_dist_release}

Source0: 	%{name}-%{version}.tar.gz
Source10:	remmina-0.7.4-ja.po
Patch10:	remmina-0.7.4-ja.patch

License: 	GPLv2+
Group: 		Applications/Internet
URL: 		http://sourceforge.net/projects/grdc/

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  glib2-devel
BuildRequires:  intltool
BuildRequires:  gtk2-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libssh-devel
BuildRequires:  avahi-ui-devel
BuildRequires:  vte-devel
BuildRequires:  unique-devel
BuildRequires:  desktop-file-utils

Obsoletes: grdc < 0.7.0
Provides: grdc = %{version}


%description
Grdc is a remote desktop connection client that can view and control a
desktop session running on another system. It can connect to a VNC platform
(using libvncserver0) as well windows terminal servers (with rdesktop).


%package devel
Summary:        Development tools for remmina
Summary(ja):    remmina の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description devel
Header files and libraries for building a extension library for the
remmina.


%prep
%setup -q
#%patch10 -p1

#cp -f %{SOURCE10} po/ja.po

%build
autoreconf -f -i
%configure
%__make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%__make DESTDIR=$RPM_BUILD_ROOT install

desktop-file-install --vendor="" \
  --add-category="RemoteAccess" \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  $RPM_BUILD_ROOT%{_datadir}/applications/*

%find_lang %name

%clean
rm -rf $RPM_BUILD_ROOT

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

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

%files -f %name.lang
%defattr(-,root,root)
%doc ChangeLog NEWS README AUTHORS COPYING
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/icons/hicolor
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/applications/*.desktop

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/*.h


%changelog
* Thu Aug 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.3-1
- new upstream release
- add BuildRequires: avahi-ui-devel, vte-devel, unique-devel, desktop-file-utils
- create devel sub package

* Wed Mar 17 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4-1
- new upstream release with new name 'remmina'
- add Obsoletes/Provides: grdc

* Tue Sep 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.0-1
- initial build for Vine Linux

* Tue Jul 07 2009 slick50 <lxgator@gmail.com> 0.6.0-1pclos2009 
- new version 0.6.0

* Sun May 17 2009 don_crissti <don_crissti@gmx.com> 0.5.1-1pclos2009
- build for PCLOS

