!1 Package init

Merge pull request !1 from lyn/master
This commit is contained in:
openeuler-ci-bot 2020-08-21 16:08:58 +08:00 committed by Gitee
commit a6f7dc82a6
3 changed files with 93 additions and 0 deletions

88
rubygem-unf.spec Normal file
View File

@ -0,0 +1,88 @@
%global gem_name unf
%global rubyabi 1.9.1
%undefine __brp_mangle_shebangs
Name: rubygem-%{gem_name}
Version: 0.1.4
Release: 1
License: BSD
Summary: Wrapper library to bring Unicode Normalization Form support to Ruby/JRuby
URL: https://github.com/knu/ruby-unf
Source0: http://rubygems.org/gems/unf-%{version}.gem
Requires: ruby(release) ruby(rubygems) rubygem(unf_ext)
BuildRequires: ruby(release) rubygems-devel rubygem(minitest) rubygem(shoulda) rubygem(unf_ext)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}-%{release}
%description
This is a wrapper library to bring Unicode Normalization Form support
to Ruby/JRuby.
%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}/
pushd %{buildroot}%{gem_instdir}
rm -rf \
Gemfile \
Rakefile \
*.gemspec \
.gitignore \
.travis.yml \
test/ \
%{nil}
popd
%check
pushd .%{gem_instdir}
sed -i.orig \
-e '/begin/,/end/d' \
-e '/bundler/d' \
test/helper.rb
sed -i.minitest \
-e 's|Test::Unit::TestCase|Minitest::Test|' \
test/*.rb
cat > test/unit.rb << EOF
gem "minitest"
require "minitest/autorun"
EOF
for f in test/test_*.rb
do
ruby -Ilib:test:. $f
done
popd
%files
%dir %{gem_instdir}
%doc %{gem_instdir}/[A-Z]*
%{gem_libdir}/
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%changelog
* Sat Aug 8 2020 yanan li <liyanan032@huawei.com> - 0.1.4-1
- Package init

5
rubygem-unf.yaml Normal file
View File

@ -0,0 +1,5 @@
git_url: https://github.com/knu/ruby-unf.git
version_control: github
src_repo: knu/ruby-unf
tag_prefix: "^v"
seperator: "."

BIN
unf-0.1.4.gem Normal file

Binary file not shown.