%define ruby /usr/bin/ruby
%define rubylibdir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["rubylibdir"]')
%define archdir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["archdir"]')

Name: ruby-gettext-package
Version: 1.9.0
Release: 1%{?_dist_release}
License: GPL or Ruby
Group: Applications/Text
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://ponx.s5.xrea.com/hiki/ja/ruby-gettext.html
Requires: ruby >= 1.8
BuildRequires: ruby-devel
BuildRequires: racc irb
Summary: gettext extention for Ruby

Vendor: Project Vine
Distribution: Vine Linux

%description
Ruby GetText Package is a Native Language Support Library and Tools which modeled after GNU gettext package.

%description -l ja
Ruby GetText Package は GNU gettextによく似たライブラリです。
このライブラリを使うことであなたのRubyスクリプト中の文字列を簡単にローカライズでき、
国際化されたアプリケーションを作ることができます。基本的な考え方はGNU gettextと同じです。

%prep
rm -rf ${RPM_BUILD_ROOT}

%setup -q

%build
ruby setup.rb config --prefix=%{buildroot}/usr \
                       --siterubyver=%{buildroot}%{rubylibdir} \
		       --sodir=%{buildroot}%{archdir}
ruby setup.rb setup

%install
ruby setup.rb install

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc COPYING ChangeLog README NEWS samples/ test/
%{_bindir}/*
%{rubylibdir}/gettext.rb
%{rubylibdir}/gettext/
%{archdir}/*
%{_datadir}/locale/es/LC_MESSAGES/*.mo
%{_datadir}/locale/fr/LC_MESSAGES/*.mo
%{_datadir}/locale/ja/LC_MESSAGES/*.mo
%{_datadir}/locale/sv/LC_MESSAGES/*.mo

%ChangeLog
* Fri Aug 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.0-1
- spec in utf8, new versioning policy

* Fri May 25 2007 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 1.9.0-0vl1
- source update

* Mon Feb 28 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.8.0-0vl1
- source update

* Wed Mar 03 2004 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp>
- (0.5.4-0vl1)
-- source update

* Sun Dec 07 2003 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp>
- (0.5.3-0vl1)
-- source update

* Wed Nov 12 2003 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp>
- (0.5.2-0vl1)
-- source update

* Thu Nov 11 2003 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp>
- (0.5.1-0vl3)
-- delate BuildArch: i386

* Sat Nov 08 2003 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp>
- (0.5.1-0vl2)
-- compile for ruby-1.8.0

* Sun Oct 19 2003 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp>
- (0.5.1-0vl1)
- initial package creation
