82 lines
1.9 KiB
RPMSpec
82 lines
1.9 KiB
RPMSpec
%global gem_name domain_name
|
|
%global rubyabi 1.9.1
|
|
Summary: Domain Name manipulation library for Ruby
|
|
Name: rubygem-%{gem_name}
|
|
Version: 0.5.20190701
|
|
Release: 1
|
|
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
|
|
Requires: ruby(release)
|
|
BuildRequires: ruby(release)
|
|
Requires: ruby(rubygems) rubygem(unf)
|
|
BuildRequires: rubygems-devel rubygem(test-unit) 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}
|
|
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}/
|
|
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 Aug 18 2020 wanglin <wanglin175@huawei.com> - 0.5.20190701-1
|
|
- package init
|