65 lines
1.6 KiB
RPMSpec
65 lines
1.6 KiB
RPMSpec
|
|
%global gem_name builder
|
||
|
|
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Version: 3.2.3
|
||
|
|
Release: 1
|
||
|
|
Summary: Builders for MarkUp
|
||
|
|
License: MIT
|
||
|
|
URL: http://onestepback.org
|
||
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest)
|
||
|
|
BuildArch: noarch
|
||
|
|
%description
|
||
|
|
Builder provides a number of builder objects that make creating structured
|
||
|
|
data simple to do. Currently the following builder objects are supported:
|
||
|
|
* XML Markup
|
||
|
|
* XML Events
|
||
|
|
|
||
|
|
%package doc
|
||
|
|
Summary: Documentation for %{name}
|
||
|
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
BuildArch: noarch
|
||
|
|
%description doc
|
||
|
|
Documentation for %{name}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -c -T
|
||
|
|
%gem_install -n %{SOURCE0}
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{gem_dir}
|
||
|
|
cp -a .%{gem_dir}/* \
|
||
|
|
%{buildroot}%{gem_dir}/
|
||
|
|
# Fix anything executable that does not have a shebang.
|
||
|
|
for file in `find %{buildroot}/%{gem_instdir} -name "*.rb"`; do
|
||
|
|
[ ! -z "`head -n 1 $file | grep \"^#!\"`" ] && chmod +x $file
|
||
|
|
done
|
||
|
|
chmod -x %{buildroot}%{gem_instdir}/doc/releases/builder-2.1.1.rdoc
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
ruby -Ilib:test -e 'Dir.glob "./test/test_*.rb", &method(:require)'
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%license %{gem_instdir}/MIT-LICENSE
|
||
|
|
%{gem_libdir}
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%doc %{gem_instdir}/CHANGES
|
||
|
|
%doc %{gem_instdir}/README.md
|
||
|
|
%{gem_instdir}/Rakefile
|
||
|
|
%doc %{gem_instdir}/doc
|
||
|
|
%{gem_instdir}/rakelib
|
||
|
|
%{gem_instdir}/test
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Jul 25 2020 wangxiao <wangxiao65@huawei.com> - 3.2.3-1
|
||
|
|
- package init
|