Summary:	Simple, powerful and moeful twitter client
Summary(ja):	至高の Twitter Client
Name:		mikutter
Version:	3.2.5
Release:	1%{?_dist_release}
License:	GPLv3
Group:		System Environment/Libraries
URL:		http://mikutter.hachune.net/
Source:		http://mikutter.hachune.net/bin/%{name}.%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:	noarch

Requires:	ruby >= 1.9.3
Requires:	ruby-gtk2 >= 1.5.0
Requires:	rcairo >= 1.10.0
Requires:	openssl

Requires(postun,posttrans):	desktop-file-utils

%description
mikutter - simple, powerful and moeful twitter client

%description -l ja
全てのミク廃、そして Twitter 中毒者へ贈る、至高の Twitter Client。


%prep
%setup -q -n %{name}


%build


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -r core $RPM_BUILD_ROOT%{_datadir}/%{name}/
cp -r data $RPM_BUILD_ROOT%{_datadir}/%{name}/
cp -r devel $RPM_BUILD_ROOT%{_datadir}/%{name}/
cp -r plugin $RPM_BUILD_ROOT%{_datadir}/%{name}/
cp -r vendor $RPM_BUILD_ROOT%{_datadir}/%{name}/
install -m 0755 %{name}.rb $RPM_BUILD_ROOT%{_datadir}/%{name}/
install -m 0644 Gemfile $RPM_BUILD_ROOT%{_datadir}/%{name}/

rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/core/skin/data/icon.png
cp $RPM_BUILD_ROOT%{_datadir}/%{name}/core/skin/data/icon_alternative.png \
   $RPM_BUILD_ROOT%{_datadir}/%{name}/core/skin/data/icon.png
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/core/skin/data/sounds/*

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=mikutter
Name[ja]=mikutter
Comment=simple, powerful and moeful twitter client
Comment[ja]=至高の Twitter クライアント
Icon=/usr/share/mikutter/core/skin/data/icon.png
Exec=/usr/bin/ruby /usr/share/mikutter/mikutter.rb %U
Type=Application
StartupNotify=true
Categories=Network;InstantMessaging;
Terminal=false
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%postun
if [ $1 -eq 0 ] ; then
	update-desktop-database -q > /dev/null || :
fi

%posttrans
update-desktop-database -q &> /dev/null || :


%files
%defattr(-,root,root,-)
%doc LICENSE README
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}


%changelog
* Sat Aug 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.5-1
- new upstream release

* Sat Jul 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.4-1
- new upstream release

* Sun May 03 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Sun Oct 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.7-1
- new upstream release

* Tue Sep 23 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.6-1
- new upstream release

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.5-1
- new upstream release

* Sun Jul 13 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.3-1
- new upstream release

* Sun Jun 15 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.0-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.2.1537-1
- new upstream release

* Wed Jan 15 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.2.1476-1
- new upstream release

* Tue Dec 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.2.1430-1
- new upstream release

* Sun Nov 10 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.2.1410-1
- initial build

