rpms/rubygem-gettext_rails/devel rubygem-gettext_rails.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Mamoru Tasaka
mtasaka at fedoraproject.org
Sat Jun 27 04:01:08 UTC 2009
- Previous message: rpms/rubygem-gettext_rails/F-11 rubygem-gettext_rails.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message: rpms/freedoom/devel .cvsignore, 1.4, 1.5 freedoom.spec, 1.7, 1.8 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mtasaka
Update of /cvs/extras/rpms/rubygem-gettext_rails/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15927/devel
Modified Files:
.cvsignore sources
Added Files:
rubygem-gettext_rails.spec
Log Message:
Initial commit
--- NEW FILE rubygem-gettext_rails.spec ---
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%global gemname gettext_rails
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global rubyabi 1.8
%global gettext_req 2.0.4
%global locale_req 2.0.4
%global rails_req 2.3.2
%global do_check 0
%if 0%{?fedora} >= 12
%global do_check 1
%endif
Summary: Localization support for Ruby on Rails by Ruby-GetText-Package
Name: rubygem-%{gemname}
Version: 2.0.4
Release: 4%{?dist}
Group: Development/Languages
License: GPLv2 or Ruby
URL: http://www.yotabanana.com/hiki/ruby-gettext-rails.html
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: ruby(rubygems)
BuildRequires: rubygem(allison)
BuildRequires: rubygem(gettext)
BuildRequires: rubygem(gettext_activerecord) >= %{gettext_req}
BuildRequires: rubygem(rake)
BuildRequires: rubygem(rails) >= %{rails_req}
%if %{do_check}
BuildRequires(check): ruby(sqlite3)
BuildRequires(check): rubygem(locale_rails) >= %{locale_req}
%endif
Requires: rubygem(gettext_activerecord) >= %{gettext_req}
Requires: rubygem(locale_rails) >= %{locale_req}
Requires: rubygem(rails) >= %{rails_req}
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}-%{release}
%description
gettext_rails provides the localization for Ruby on Rails
using Ruby-GetText-Package.
* Autodetect client locale using locale/locale_rails.
* Easy maintenance of translations to use powerful tools for gettext family.
* Model translation using gettext_activerecord.
* Localization for some helpers.
* Works with other Rails I18n backend.
* Note that gettext_rails is not the one of I18n backend.
* Thread safe.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation for %{name}.
%prep
%setup -q -c -T
%build
mkdir -p .%{gemdir}
gem install \
--local \
--install-dir $(pwd)%{gemdir} \
--force \
--rdoc \
-V \
%{SOURCE0}
pushd .%{geminstdir}
# Recreate gettext .mo files
find . -name \*.mo | xargs rm -f
rake --trace makemo
# For now remove COPYING (says LGPL, actually not)
rm -f COPYING
popd
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
# %%find_lang treatment
# 1. data/locale
%{__sed} -e 's|/share/locale/|/data/locale/|' \
/usr/lib/rpm/find-lang.sh \
> find-lang-modified.sh
sh find-lang-modified.sh %{buildroot} %{gemname} %{gemname}.lang
find %{buildroot}%{geminstdir}/data -type d | while read dir
do
echo "%%dir ${dir#%{buildroot}}" >> %{gemname}.lang
done
# 2. sample/locale
%{__sed} -e 's|/share/locale/|/sample/locale/|' \
/usr/lib/rpm/find-lang.sh \
> find-lang-modified.sh
sh find-lang-modified.sh %{buildroot} blog blog.lang
# 3. sample/vendor/plugins/lang_helper/locale
%{__sed} -e 's|/share/locale/|/lang_helper/locale/|' \
/usr/lib/rpm/find-lang.sh \
> find-lang-modified.sh
sh find-lang-modified.sh %{buildroot} lang_helper lang_helper.lang
# Unify, and add rest directories/files under sample/
cat blog.lang lang_helper.lang > sample.files
find %{buildroot}%{geminstdir}/sample -type d | while read dir
do
echo "%%dir ${dir#%{buildroot}}" >> sample.files
done
find %{buildroot}%{geminstdir}/sample -type f -not -name \*.mo | \
while read f
do
echo "${f#%{buildroot}}" >> sample.files
done
# 4. Also for %%{geminstdir}/test/locale
sed -e 's|/share/locale/|/test/locale/|' \
/usr/lib/rpm/find-lang.sh \
> find-lang-modified.sh
sh find-lang-modified.sh %{buildroot} rails_test doc.lang
find %{buildroot}%{geminstdir}/test/locale -type d | while read dir
do
echo "%%dir ${dir#%{buildroot}}" >> doc.lang
done
cat doc.lang >> sample.files
%clean
rm -rf %{buildroot}
%check
[ %{do_check} = 0 ] && exit 0
export GEM_PATH=$(pwd)/%{gemdir}
cd .%{geminstdir}/test
# Observes test failure, need check later
export TZ="Asia/Tokyo"
rake test || :
%files -f %{gemname}.lang
%defattr(-,root,root,-)
%dir %{geminstdir}
%doc %{geminstdir}/[A-Z]*
%exclude %{geminstdir}/Rakefile
%{geminstdir}/lib/
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%files doc -f sample.files
%defattr(-,root,root,-)
%{geminstdir}/Rakefile
%{geminstdir}/po/
%{gemdir}/doc/%{gemname}-%{version}/
%dir %{geminstdir}/test/
%{geminstdir}/test/[A-Z]*
%{geminstdir}/test/[a-km-z]*/
%changelog
* Fri Jun 26 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.0.4-4
- Fix BRs
- Cleanup Summary and so on
* Tue Jun 16 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.0.4-3
- Remove COPYING for now
- Recreate gettext .mo file
* Fri Jun 12 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.0.4-2
- Also mark gettext mo files under test/ directory with %%lang
* Tue Jun 9 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.0.4-1
- Initial package
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rubygem-gettext_rails/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 27 Jun 2009 00:34:09 -0000 1.1
+++ .cvsignore 27 Jun 2009 04:00:37 -0000 1.2
@@ -0,0 +1 @@
+gettext_rails-2.0.4.gem
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rubygem-gettext_rails/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 27 Jun 2009 00:34:09 -0000 1.1
+++ sources 27 Jun 2009 04:00:37 -0000 1.2
@@ -0,0 +1 @@
+e7c9561ca68c72e76b04352be3d3361c gettext_rails-2.0.4.gem
- Previous message: rpms/rubygem-gettext_rails/F-11 rubygem-gettext_rails.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message: rpms/freedoom/devel .cvsignore, 1.4, 1.5 freedoom.spec, 1.7, 1.8 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list