Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > a760318f5e2032f0a91d686ec4da5d10 > files > 2

rubygem-domain_name-0.5.14-1.fc18.src.rpm

%global	gem_name	domain_name
%global	rubyabi	1.9.1

Summary:	Domain Name manipulation library for Ruby
Name:		rubygem-%{gem_name}
Version:	0.5.14
Release:	1%{?dist}

Group:		Development/Languages
# See LICENSE.txt
# data/effective_tld_names.dat is not included in binary rpm
License:	BSD and (MPLv1.1 or GPLv2+ or LGPLv2+)
URL:		https://github.com/knu/ruby-domain_name
Source0:	https://rubygems.org/gems/%{gem_name}-%{version}.gem

%if 0%{?fedora} >= 19
Requires:	ruby(release)
BuildRequires:	ruby(release)
%else
Requires:	ruby(abi) = %{rubyabi}
Requires:	ruby
BuildRequires:	ruby(abi) = %{rubyabi}
BuildRequires:	ruby
%endif

Requires:	ruby(rubygems) 
Requires:	rubygem(unf)
BuildRequires:	rubygems-devel 
# %%check
BuildRequires:	rubygem(minitest)
BuildRequires:	rubygem(shoulda)
BuildRequires:	rubygem(unf)
BuildArch:	noarch
Provides:	rubygem(%{gem_name}) = %{version}-%{release}

%description
This is a Domain Name manipulation library for Ruby.
It can also be used for cookie domain validation based on the Public
Suffix List.


%package	doc
Summary:	Documentation for %{name}
Group:		Documentation
Requires:	%{name} = %{version}-%{release}
BuildArch:	noarch

%description	doc
Documentation for %{name}

%prep
%setup -q -c -T

TOPDIR=$(pwd)
mkdir tmpunpackdir
pushd tmpunpackdir

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

popd
rm -rf tmpunpackdir

%build
%gem_install

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
	%{buildroot}%{gem_dir}/

# Clean up
rm -f %{buildroot}%{gem_instdir}/{.document,.gitignore}

%check
pushd .%{gem_instdir}
sed -i.orig \
	-e '/begin/,/end/d' \
	-e '/bundler/d' \
	test/helper.rb
for f in test/test_*.rb
do
	ruby -Ilib:test $f
done
popd


%files
%dir	%{gem_instdir}
%doc	%{gem_instdir}/[A-Z]*
%exclude	%{gem_instdir}/Gemfile*
%exclude	%{gem_instdir}/Rakefile
%exclude	%{gem_instdir}/*.gemspec
%exclude	%{gem_instdir}/.travis.yml

%{gem_libdir}
%exclude	%{gem_cache}
%{gem_spec}

%files doc
%doc	%{gem_docdir}
%exclude	%{gem_instdir}/test/
%exclude	%{gem_instdir}/tool/
%exclude	%{gem_instdir}/data/

%changelog
* Tue Oct 22 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.14-1
- 0.5.14

* Fri Oct 11 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.13-2
- Remove redundant BR

* Tue Oct  8 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.13-1
- 0.5.13

* Mon Apr 29 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.11-1
- 0.5.11

* Fri Mar 22 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.9-1
- 0.5.9

* Sun Jan 27 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.7-2
- A bit clean up

* Sun Jan 27 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.7-1
- Initial package