[rubygem-gettext] Clean up old stuff
Mamoru Tasaka
mtasaka at fedoraproject.org
Wed Jan 2 08:35:50 UTC 2013
commit e4e649e800cb06eac81c92b4513e96cb05fd0dde
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Wed Jan 2 17:35:39 2013 +0900
Clean up old stuff
rubygem-gettext.spec | 64 +++++++++++++++++++------------------------------
1 files changed, 25 insertions(+), 39 deletions(-)
---
diff --git a/rubygem-gettext.spec b/rubygem-gettext.spec
index f999f77..350ed4f 100644
--- a/rubygem-gettext.spec
+++ b/rubygem-gettext.spec
@@ -1,11 +1,5 @@
-%if %{?fedora:0%{fedora} < 17}%{?rhel:0%{rhel} < 7}
-%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
-%global rubyabi 1.8
-%global ruby19 0
-%else
%global rubyabi 1.9.1
%global ruby19 1
-%endif
%global gem_name gettext
@@ -15,7 +9,7 @@
Name: rubygem-%{gem_name}
Version: 2.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: RubyGem of Localization Library and Tools for Ruby
Group: Development/Languages
@@ -38,10 +32,8 @@ Requires: rubygem(locale) >= %{locale_ver}
Requires: irb
Provides: rubygem(%{gem_name}) = %{version}-%{release}
-%if 0%{?ruby19} > 0
-Obsoletes: ruby-gettext-package = %{version}-%{release}
+Obsoletes: ruby-gettext-package <= %{version}-%{release}
Provides: ruby-gettext-package = %{version}-%{release}
-%endif
BuildArch: noarch
@@ -61,32 +53,31 @@ Requires: %{name} = %{version}-%{release}
This package contains documentation for %{name}.
-%package -n ruby-gettext-package
-Summary: Localization Library and Tools for Ruby
-Group: Development/Languages
-Requires: %{name} = %{version}-%{release}
-Requires: ruby(locale) >= %{locale_ver}
-Provides: ruby(gettext-package) = %{version}-%{release}
+%prep
+%setup -q -c -T
-%description -n ruby-gettext-package
-Ruby-GetText-Package is a Localization(L10n) Library and Tools
-which is modeled after GNU gettext package.
+TOPDIR=$(pwd)
+mkdir tmpunpackdir
+pushd tmpunpackdir
-The library converts the messages to localized messages properly
-using client-side locale information. And the tools for developers
-support to create, use, and modify localized message files
-(message catalogs) easily.
+gem unpack %{SOURCE0}
+cd %{gem_name}-%{version}
+gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
+gem build %{gem_name}.gemspec
+mv %{gem_name}-%{version}.gem $TOPDIR
-%prep
-%setup -q -T -c
+popd
+rm -rf tmpunpackdir
+%build
+mkdir -p .%{gem_dir}
gem install \
--local \
--install-dir .%{gem_dir} \
--force \
--rdoc \
-V \
- %{SOURCE0}
+ %{gem_name}-%{version}.gem
#%%{__rm} -f .%{gem_instdir}/Rakefile
%{__rm} -f .%{gem_instdir}/%{gem_name}.gemspec
@@ -106,10 +97,9 @@ done
# fix timestamps
find . -type f -print0 | xargs -0 touch -r %{SOURCE0}
-%build
-
%install
-%{__rm} -rf %{buildroot}
+rm -f *.lang
+
%{__mkdir_p} %{buildroot}%{gem_dir}
%{__cp} -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
@@ -171,10 +161,8 @@ popd
}
-%if 0%{?ruby19} < 1
-create_symlink_rec %{gem_instdir}/lib %{ruby_sitelib}
-%endif
create_symlink_rec %{gem_instdir}/bin %{_bindir}
+
%if 0%{?ruby19} < 1
create_symlink_rec %{gem_instdir}/data/locale %{_datadir}/locale
%endif
@@ -182,11 +170,6 @@ create_symlink_rec %{gem_instdir}/data/locale %{_datadir}/locale
# For --short-circult
%{__rm} -f *.lang
-%if 0%{?ruby19} < 1
-%find_lang rgettext
-%{__cat} *.lang >> %{name}.lang
-%endif
-
# modify find-lang.sh to deal with gettext .mo files under
# %%{gem_instdir}/data/locale
%{__sed} -e 's|/share/locale/|/data/locale/|' \
@@ -230,14 +213,14 @@ done
%{gem_instdir}/lib/
%{gem_instdir}/src/
-%{gem_cache}
+%exclude %{gem_cache}
%{gem_spec}
%files doc
%defattr(-,root,root,-)
%{gem_docdir}/
%{gem_instdir}/samples/
-%{gem_instdir}/test/
+%exclude %{gem_instdir}/test/
%if 0%{?ruby19} < 1
%files -n ruby-gettext-package -f %{name}.lang
@@ -248,6 +231,9 @@ done
%changelog
+* Wed Jan 2 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 2.2.1-3
+- Clean up old stuff
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list